Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
notebook.hxx
1/*
2** Copyright 2007-2024, RTE (https://www.rte-france.com)
3** See AUTHORS.txt
4** SPDX-License-Identifier: MPL-2.0
5** This file is part of Antares-Simulator,
6** Adequacy and Performance assessment for interconnected energy networks.
7**
8** Antares_Simulator is free software: you can redistribute it and/or modify
9** it under the terms of the Mozilla Public Licence 2.0 as published by
10** the Mozilla Foundation, either version 2 of the License, or
11** (at your option) any later version.
12**
13** Antares_Simulator is distributed in the hope that it will be useful,
14** but WITHOUT ANY WARRANTY; without even the implied warranty of
15** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16** Mozilla Public Licence 2.0 for more details.
17**
18** You should have received a copy of the Mozilla Public Licence 2.0
19** along with Antares_Simulator. If not, see <https://opensource.org/license/mpl-2-0/>.
20*/
21#ifndef __ANTARES_TOOLBOX_COMPONENT_NOTEBOOK_HXX__
22#define __ANTARES_TOOLBOX_COMPONENT_NOTEBOOK_HXX__
23
24namespace Antares
25{
26namespace Component
27{
29{
30 return pNotebook;
31}
32
33inline const Notebook& Notebook::Page::notebook() const
34{
35 return pNotebook;
36}
37
38inline const wxString& Notebook::Page::caption() const
39{
40 return pCaption;
41}
42
43inline const wxString& Notebook::Page::name() const
44{
45 return pName;
46}
47
48inline const wxString& Notebook::caption() const
49{
50 return pCaption;
51}
52
53inline Notebook::Tabs::~Tabs()
54{
55}
56
58{
59 new Page(*this, NULL, wxEmptyString);
60}
61
62inline void Notebook::Page::name(const wxString& s)
63{
64 pName = s;
65}
66
67inline void Notebook::Page::visible(const bool v)
68{
69 pVisible = v;
70 pNotebook.Refresh();
71}
72
73inline Notebook::Page* Notebook::add(wxWindow* ctnrl, const wxString& caption)
74{
75 return new Page(*this, ctnrl, caption);
76}
77
78inline Notebook::Page* Notebook::add(wxWindow* ctnrl, const wxString& name, const wxString& caption)
79{
80 return new Page(*this, ctnrl, name, caption);
81}
82
83inline bool Notebook::alwaysDisplayTabs() const
84{
85 return pAlwaysDisplayTab;
86}
87
88inline void Notebook::alwaysDisplayTabs(const bool v)
89{
91}
92
93inline bool Notebook::tabsVisible() const
94{
95 return pTabsVisible;
96}
97
98inline void Notebook::tabsVisible(bool v)
99{
100 pTabsVisible = v;
101}
102
103inline bool Notebook::displayTitle() const
104{
105 return pDisplayTitle;
106}
107
108inline void Notebook::displayTitle(const bool v)
109{
110 pDisplayTitle = v;
111}
112
113inline Notebook::Orientation Notebook::orientation() const
114{
115 return pOrientation;
116}
117
118inline wxWindow* Notebook::titlePanelControl() const
119{
120 return pTabs;
121}
122
123inline bool Notebook::HasMultiplePages() const
124{
125 return true;
126}
127
128} // namespace Component
129} // namespace Antares
130
131#endif // __ANTARES_TOOLBOX_COMPONENT_NOTEBOOK_HXX__
Definition notebook.h:62
Notebook & notebook()
Get the attached notebook.
Definition notebook.hxx:28
const wxString & name() const
Get the name of the page.
Definition notebook.hxx:43
const wxString & caption() const
Get the caption of the page.
Definition notebook.hxx:38
Notebook.
Definition notebook.h:38
Tabs * pTabs
The tab component.
Definition notebook.h:394
Orientation orientation() const
Get the orientation of the notebook.
Definition notebook.hxx:113
bool pTabsVisible
Can display tabs.
Definition notebook.h:398
bool pAlwaysDisplayTab
Always display tabs.
Definition notebook.h:400
const wxString & caption() const
Get the caption of the notebook.
Definition notebook.hxx:48
const Orientation pOrientation
Orientation.
Definition notebook.h:388
bool pDisplayTitle
Display the title.
Definition notebook.h:402
Page * add(wxWindow *ctnrl, const wxString &caption)
Add a new page.
Definition notebook.hxx:73
wxWindow * titlePanelControl() const
Get the controls of the main bar.
Definition notebook.hxx:118
bool tabsVisible() const
Get if the tabs are visible.
Definition notebook.hxx:93
void addSeparator()
Add a separator.
Definition notebook.hxx:57
bool alwaysDisplayTabs() const
Get if the tabs must always be displayed, even if a single one is available.
Definition notebook.hxx:83
wxString pCaption
The caption of the notebook.
Definition notebook.h:396