Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
Antares::Component::Notebook Class Reference

Notebook. More...

#include <notebook.h>

Inheritance diagram for Antares::Component::Notebook:
Antares::Component::Panel Antares::Component::MapNotebook

Classes

class  Page
 
class  Tabs
 

Public Types

enum  Orientation { orLeft , orTop }
 
enum  Theme { themeDefault , themeLight }
 
enum  Alignment { alignRight , alignLeft }
 

Public Member Functions

Constructor & Destructor
 Notebook (wxWindow *parent, Orientation orientation=orLeft)
 Default constructor.
 
virtual ~Notebook ()
 Destructor.
 
Orientation
Orientation orientation () const
 Get the orientation of the notebook.
 
void clear ()
 Delete all pages.
 
Pageadd (wxWindow *ctnrl, const wxString &caption)
 Add a new page.
 
Pageadd (wxWindow *ctnrl, const wxString &name, const wxString &caption)
 Add a new page.
 
void addSeparator ()
 Add a separator.
 
Graphical behavior
bool tabsVisible () const
 Get if the tabs are visible.
 
void tabsVisible (bool v)
 Set if the tabs are visible.
 
bool alwaysDisplayTabs () const
 Get if the tabs must always be displayed, even if a single one is available.
 
void alwaysDisplayTabs (const bool v)
 Set if the tabs must always be displayed.
 
bool displayTitle () const
 
void displayTitle (const bool v)
 
void addCommonControl (Toolbox::InputSelector::AInput *input, const int border=0)
 
void addCommonControl (wxWindow *ctrnl, const int border=0, const wxPoint &recommendedSize=wxPoint(20, 20))
 
void addCommonControlTop (Toolbox::InputSelector::AInput *input, const int border=0)
 
void addCommonControlTop (wxWindow *ctrnl, const int border=0, const wxPoint &recommendedSize=wxPoint(20, 20))
 
Caption of the notebook
const wxString & caption () const
 Get the caption of the notebook.
 
void caption (const wxString &s)
 Set the caption.
 
bool select (const wxString &name, bool triggerEvents=true)
 Select a page by its name.
 
Pageselected ()
 
const Pageselected () const
 
Pagefind (const wxString &name)
 Find a page by its name.
 
void set_page_visibility (const wxString &name, bool visible)
 
- Public Member Functions inherited from Antares::Component::Panel
 Panel (wxWindow *parent)
 Constructor.
 
virtual ~Panel ()
 Destructor.
 
virtual void onMouseDown (wxMouseEvent &)
 Click down.
 
virtual void onMouseUp (wxMouseEvent &)
 Click up.
 
virtual void onMouseClick ()
 The panel has been clicked (delayed)
 
virtual void onMouseEnter ()
 The mouse has entered.
 
virtual void onMouseLeave ()
 The mouse has leaved.
 
virtual void onMouseMoved (int, int)
 The mouse has moved.
 

Friends

class Page
 

Theme

using Pages = std::vector<Page*>
 All pages.
 
class Tabs
 
Yuni::Event< void(Page &, bool &)> onPageAccept
 Event: Page changing.
 
Yuni::Event< void(Page &)> onPageChanged
 Event: Page changing.
 
const Orientation pOrientation
 Orientation.
 
Pages pPages
 All pages.
 
TabspTabs
 The tab component.
 
wxString pCaption
 The caption of the notebook.
 
bool pTabsVisible
 Can display tabs.
 
bool pAlwaysDisplayTab
 Always display tabs.
 
bool pDisplayTitle
 Display the title.
 
wxSizer * pSizerForPages
 
wxSizer * pTopSizer
 
wxSizer * pLeftSizer
 
PagepLastSelected
 
std::vector< wxWindow * > pExtraControls
 The complete list of extra controls.
 
Theme pTheme
 
Alignment pAlignment
 
wxString pCacheTitle
 
wxColour pOriginalColor
 
wxColour pOriginalColorDark
 
void theme (Theme t)
 Set the current theme.
 
Theme theme () const
 
void alignment (Alignment a)
 
wxWindow * titlePanelControl () const
 Get the controls of the main bar.
 
void enableRefreshForAllDatagrid (bool enabled)
 Enable / Disable the refresh for all datagrid.
 
virtual bool HasMultiplePages () const
 
void forceRefresh ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Antares::Component::Panel
static void OnMouseMoveFromExternalComponent ()
 Event triggered by any other component (not derived from Panel)
 
- Protected Member Functions inherited from Antares::Component::Panel
virtual bool triggerMouseClickEvent () const
 

Detailed Description

Constructor & Destructor Documentation

◆ Notebook()

Antares::Component::Notebook::Notebook ( wxWindow * parent,
Notebook::Orientation orientation = orLeft )

Default constructor.

Parameters
parentThe parent window

Member Data Documentation

◆ onPageAccept

Yuni::Event<void(Page&, bool&)> Antares::Component::Notebook::onPageAccept

Event: Page changing.

Prototype :

// page : The new selected page
// accept : True to accept the selection, false for a veto
void eventReceiverOnPageChanged(Page& page, bool& accept);
Definition notebook.h:62

◆ onPageChanged

Yuni::Event<void(Page&)> Antares::Component::Notebook::onPageChanged

Event: Page changing.

Prototype :

// page : The new selected page
// accept : True to accept the selection, false for a veto
void eventReceiverOnPageChanged(Page& page, bool& accept);

The documentation for this class was generated from the following files: