Antares Simulator
Power System Simulator
notebook.hxx
1 /*
2  * Copyright 2007-2025, 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 
24 namespace Antares::Component
25 {
27 {
28  return pNotebook;
29 }
30 
31 inline const Notebook& Notebook::Page::notebook() const
32 {
33  return pNotebook;
34 }
35 
36 inline const wxString& Notebook::Page::caption() const
37 {
38  return pCaption;
39 }
40 
41 inline const wxString& Notebook::Page::name() const
42 {
43  return pName;
44 }
45 
46 inline const wxString& Notebook::caption() const
47 {
48  return pCaption;
49 }
50 
51 inline Notebook::Tabs::~Tabs()
52 {
53 }
54 
56 {
57  new Page(*this, NULL, wxEmptyString);
58 }
59 
60 inline void Notebook::Page::name(const wxString& s)
61 {
62  pName = s;
63 }
64 
65 inline void Notebook::Page::visible(const bool v)
66 {
67  pVisible = v;
68  pNotebook.Refresh();
69 }
70 
71 inline Notebook::Page* Notebook::add(wxWindow* ctnrl, const wxString& caption)
72 {
73  return new Page(*this, ctnrl, caption);
74 }
75 
76 inline Notebook::Page* Notebook::add(wxWindow* ctnrl, const wxString& name, const wxString& caption)
77 {
78  return new Page(*this, ctnrl, name, caption);
79 }
80 
81 inline bool Notebook::alwaysDisplayTabs() const
82 {
83  return pAlwaysDisplayTab;
84 }
85 
86 inline void Notebook::alwaysDisplayTabs(const bool v)
87 {
89 }
90 
91 inline bool Notebook::tabsVisible() const
92 {
93  return pTabsVisible;
94 }
95 
96 inline void Notebook::tabsVisible(bool v)
97 {
98  pTabsVisible = v;
99 }
100 
101 inline bool Notebook::displayTitle() const
102 {
103  return pDisplayTitle;
104 }
105 
106 inline void Notebook::displayTitle(const bool v)
107 {
108  pDisplayTitle = v;
109 }
110 
111 inline Notebook::Orientation Notebook::orientation() const
112 {
113  return pOrientation;
114 }
115 
116 inline wxWindow* Notebook::titlePanelControl() const
117 {
118  return pTabs;
119 }
120 
121 inline bool Notebook::HasMultiplePages() const
122 {
123  return true;
124 }
125 
126 } // namespace Antares::Component
127 
128 #endif // __ANTARES_TOOLBOX_COMPONENT_NOTEBOOK_HXX__
Definition: notebook.h:61
Notebook & notebook()
Get the attached notebook.
Definition: notebook.hxx:26
const wxString & name() const
Get the name of the page.
Definition: notebook.hxx:41
const wxString & caption() const
Get the caption of the page.
Definition: notebook.hxx:36
Notebook.
Definition: notebook.h:36
Tabs * pTabs
The tab component.
Definition: notebook.h:403
Orientation orientation() const
Get the orientation of the notebook.
Definition: notebook.hxx:111
bool pTabsVisible
Can display tabs.
Definition: notebook.h:407
bool pAlwaysDisplayTab
Always display tabs.
Definition: notebook.h:409
const wxString & caption() const
Get the caption of the notebook.
Definition: notebook.hxx:46
const Orientation pOrientation
Orientation.
Definition: notebook.h:397
bool pDisplayTitle
Display the title.
Definition: notebook.h:411
Page * add(wxWindow *ctnrl, const wxString &caption)
Add a new page.
Definition: notebook.hxx:71
wxWindow * titlePanelControl() const
Get the controls of the main bar.
Definition: notebook.hxx:116
bool tabsVisible() const
Get if the tabs are visible.
Definition: notebook.hxx:91
void addSeparator()
Add a separator.
Definition: notebook.hxx:55
bool alwaysDisplayTabs() const
Get if the tabs must always be displayed, even if a single one is available.
Definition: notebook.hxx:81
wxString pCaption
The caption of the notebook.
Definition: notebook.h:405