21#ifndef __ANTARES_TOOLBOX_COMPONENT_NOTEBOOK_H__
22#define __ANTARES_TOOLBOX_COMPONENT_NOTEBOOK_H__
24#include <ui/common/component/panel.h>
27#include "../../input/input.h"
28#include "../refresh.h"
87 const wxString&
caption()
const;
89 void caption(
const wxString& s);
95 const wxString&
name()
const;
97 void name(
const wxString& s);
119 void visible(
const bool v);
124 bool displayExtraControls()
const
126 return pDisplayExtraControls;
128 void displayExtraControls(
bool v)
130 pDisplayExtraControls = v;
141 RefreshAllControls(pControl);
155 std::vector<Page*> subPages;
177 bool pDisplayExtraControls;
209 Page*
add(wxWindow* ctnrl,
const wxString&
caption);
214 Page*
add(wxWindow* ctnrl,
const wxString& name,
const wxString&
caption);
233 bool displayTitle()
const;
234 void displayTitle(
const bool v);
238 void addCommonControl(wxWindow* ctrnl,
239 const int border = 0,
240 const wxPoint& recommendedSize = wxPoint(20, 20));
243 void addCommonControlTop(wxWindow* ctrnl,
244 const int border = 0,
245 const wxPoint& recommendedSize = wxPoint(20, 20));
250 const wxString&
caption()
const;
252 void caption(
const wxString& s);
258 bool select(
const wxString& name,
bool triggerEvents =
true);
262 return pLastSelected;
264 const Page* selected()
const
266 return pLastSelected;
272 Page*
find(
const wxString& name);
274 void set_page_visibility(
const wxString& name,
bool visible);
292 void alignment(Alignment a)
308 virtual bool HasMultiplePages()
const;
347 void drawItem(wxDC& dc,
Page* page,
int& pos);
348 virtual void drawItemTop(wxDC& dc,
Page* page,
int& pos, Alignment align);
349 void drawItemOnCanvasNotSelected(
Page* page,
353 const wxSize& textExtent);
354 void drawItemOnCanvasSelected(
Page* page,
358 const wxSize& textExtent);
363 virtual void onDraw(wxPaintEvent& evt);
364 void onEraseBackground(wxEraseEvent& evt);
365 void drawOrientationLeft(wxDC& dc);
366 void drawOrientationTop(wxDC& dc);
367 void onForceRefresh();
378 DECLARE_EVENT_TABLE()
383 void onForceRefresh();
404 wxSizer* pSizerForPages;
414 Alignment pAlignment;
416 wxString pCacheTitle;
417 wxColour pOriginalColor;
418 wxColour pOriginalColorDark;
425#include "notebook.hxx"
MapNotebook.
Definition mapnotebook.h:35
void refresh()
Refresh.
Definition notebook.h:139
Notebook & notebook()
Get the attached notebook.
Definition notebook.hxx:28
const wxString & name() const
Get the name of the page.
Definition notebook.hxx:43
void selectSubPage(Page *subPage)
Select a subpage of this page.
Definition notebook.cpp:824
void removeSubPage(Page *p)
Remove a subpage.
Definition notebook.cpp:806
~Page()
Destructor.
Definition notebook.cpp:764
const wxString & caption() const
Get the caption of the page.
Definition notebook.hxx:38
wxWindow * control() const
Get the control of the page.
Definition notebook.h:133
bool selected() const
Get if the page is currently selected.
Definition notebook.h:103
Page * select(bool force=false)
Select the page.
Definition notebook.cpp:816
Page * addSubPage(Page *p)
Add a page as subpage.
Definition notebook.cpp:799
Definition notebook.h:339
virtual void onMouseUp(wxMouseEvent &)
Click up.
Definition notebook.cpp:909
Notebook.
Definition notebook.h:38
void enableRefreshForAllDatagrid(bool enabled)
Enable / Disable the refresh for all datagrid.
Definition notebook.cpp:903
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
Pages pPages
All pages.
Definition notebook.h:392
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
virtual ~Notebook()
Destructor.
Definition notebook.cpp:96
void addSeparator()
Add a separator.
Definition notebook.hxx:57
bool select(const wxString &name, bool triggerEvents=true)
Select a page by its name.
Definition notebook.cpp:958
std::vector< wxWindow * > pExtraControls
The complete list of extra controls.
Definition notebook.h:411
Yuni::Event< void(Page &, bool &)> onPageAccept
Event: Page changing.
Definition notebook.h:323
Yuni::Event< void(Page &)> onPageChanged
Event: Page changing.
Definition notebook.h:335
void theme(Theme t)
Set the current theme.
Definition notebook.h:281
Page * find(const wxString &name)
Find a page by its name.
Definition notebook.cpp:1000
std::vector< Page * > Pages
All pages.
Definition notebook.h:390
Notebook(wxWindow *parent, Orientation orientation=orLeft)
Default constructor.
Definition notebook.cpp:47
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
void clear()
Delete all pages.
Definition notebook.cpp:665
Panel implementation.
Definition panel.h:36