Code::Blocks
SVN r11506
|
#include <infopane.h>
Classes | |
struct | Page |
Public Member Functions | |
InfoPane (wxWindow *parent) | |
virtual | ~InfoPane () |
void | Show (size_t index) |
void | Show (Logger *logger) |
void | Hide (Logger *logger) |
void | ShowNonLogger (wxWindow *p) |
void | HideNonLogger (wxWindow *p) |
int | GetPageIndexByWindow (wxWindow *win) |
int | GetCurrentPage (bool &is_logger) |
Logger * | GetLogger (int index) |
wxWindow * | GetWindow (int index) |
void | UpdateEffectiveTabOrder () |
void | LoadTabOrder (wxString layout) |
wxString | SaveTabOrder () |
bool | AddLogger (Logger *logger, wxWindow *p, const wxString &title, wxBitmap *icon=nullptr) |
bool | DeleteLogger (Logger *l) |
bool | AddNonLogger (wxWindow *p, const wxString &title, wxBitmap *icon=nullptr) |
bool | RemoveNonLogger (wxWindow *p) |
bool | DeleteNonLogger (wxWindow *p) |
Public Member Functions inherited from cbAuiNotebook | |
cbAuiNotebook (wxWindow *pParent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxAUI_NB_DEFAULT_STYLE) | |
cbAuiNotebook constructor More... | |
~cbAuiNotebook () override | |
cbAuiNotebook destructor More... | |
void | AdvanceSelection (bool forward=true) |
Advances the selection. More... | |
wxString | SavePerspective (const wxString projectTitle=wxEmptyString) |
Save layout of the notebook. More... | |
bool | LoadPerspective (const wxString &layout, bool mergeLayouts=false) |
Loads serialized notebook layout. More... | |
int | GetTabIndexFromTooltip (const wxString &text) |
Get the tab index from tooltiptext. More... | |
int | GetTabPositionFromIndex (int index) |
Get the tab position. More... | |
void | MinimizeFreeSpace () |
Minmize free horizontal page. More... | |
bool | DeletePage (size_t page) |
Delete Page. More... | |
bool | RemovePage (size_t page) |
Remove Page. More... | |
bool | MovePage (wxWindow *page, size_t new_idx) |
Move page. More... | |
bool | AddPage (wxWindow *page, const wxString &caption, bool select=false, const wxBitmap &bitmap=wxNullBitmap) |
Add Page. More... | |
bool | InsertPage (size_t page_idx, wxWindow *page, const wxString &caption, bool select=false, const wxBitmap &bitmap=wxNullBitmap) |
Insert Page. More... | |
void | SetZoom (int zoom) |
Set zoomfactor for builtin editors. More... | |
void | FocusActiveTabCtrl () |
Set Focus on the tabCtrl belonging to the active tab. More... | |
wxAuiTabCtrl * | GetTabCtrl (wxWindow *page) |
Returns a pointer to the page's tab control or nullptr. More... | |
void | GetPagesInTabCtrl (std::vector< wxWindow *> &result, wxWindow *page) |
Return a vector containing all pages that are in the same tab control as the page passed as parameter. More... | |
Public Member Functions inherited from wxAuiNotebook | |
wxAuiNotebook () | |
wxAuiNotebook (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxAUI_NB_DEFAULT_STYLE) | |
bool | AddPage (wxWindow *page, const wxString &caption, bool select=false, const wxBitmap &bitmap=wxNullBitmap) |
virtual bool | AddPage (wxWindow *page, const wxString &text, bool select, int imageId) |
void | AdvanceSelection (bool forward=true) |
virtual int | ChangeSelection (size_t n) |
bool | Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0) |
virtual bool | DeleteAllPages () |
wxAuiTabArt * | GetArtProvider () const |
wxWindow * | GetCurrentPage () const |
int | GetHeightForPageHeight (int pageHeight) |
wxWindow * | GetPage (size_t page_idx) const |
wxBitmap | GetPageBitmap (size_t page) const |
size_t | GetPageCount () const |
int | GetPageIndex (wxWindow *page_wnd) const |
wxString | GetPageText (size_t page) const |
wxString | GetPageToolTip (size_t pageIdx) const |
int | GetSelection () const |
int | GetTabCtrlHeight () const |
bool | InsertPage (size_t page_idx, wxWindow *page, const wxString &caption, bool select=false, const wxBitmap &bitmap=wxNullBitmap) |
virtual bool | InsertPage (size_t index, wxWindow *page, const wxString &text, bool select=false, int imageId=NO_IMAGE) |
void | SetArtProvider (wxAuiTabArt *art) |
virtual bool | SetFont (const wxFont &font) |
void | SetMeasuringFont (const wxFont &font) |
void | SetNormalFont (const wxFont &font) |
bool | SetPageBitmap (size_t page, const wxBitmap &bitmap) |
virtual bool | SetPageImage (size_t n, int imageId) |
bool | SetPageText (size_t page, const wxString &text) |
bool | SetPageToolTip (size_t page, const wxString &text) |
void | SetSelectedFont (const wxFont &font) |
size_t | SetSelection (size_t new_page) |
virtual void | SetTabCtrlHeight (int height) |
bool | ShowWindowMenu () |
virtual void | SetUniformBitmapSize (const wxSize &size) |
virtual void | Split (size_t page, int direction) |
wxBookCtrlBase () | |
wxBookCtrlBase (wxWindow *parent, wxWindowID winid, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxEmptyString) | |
bool | Create (wxWindow *parent, wxWindowID winid, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxEmptyString) |
virtual void | SetPageSize (const wxSize &size) |
virtual int | HitTest (const wxPoint &pt, long *flags=NULL) const |
virtual int | GetPageImage (size_t nPage) const=0 |
wxWindow * | GetCurrentPage () const |
void | AdvanceSelection (bool forward=true) |
int | FindPage (const wxWindow *page) const |
wxWindow * | GetPage (size_t page) const |
wxWithImages () | |
virtual | ~wxWithImages () |
void | AssignImageList (wxImageList *imageList) |
virtual void | SetImageList (wxImageList *imageList) |
wxImageList * | GetImageList () const |
Private Types | |
typedef int(* | CompareFunction) (Page **, Page **) |
Private Member Functions | |
void | ReorderTabs (CompareFunction cmp_f) |
WX_DEFINE_ARRAY (Page *, wxArrayOfPage) | |
void | Toggle (size_t index) |
void | Hide (size_t i) |
void | OnMenu (wxCommandEvent &event) |
void | OnCopy (wxCommandEvent &event) |
void | OnWrapMode (wxCommandEvent &event) |
void | OnClear (wxCommandEvent &event) |
void | ContextMenu (wxContextMenuEvent &event) |
void | OnTabContextMenu (wxAuiNotebookEvent &event) |
void | OnCloseClicked (wxAuiNotebookEvent &event) |
void | OnTabPosition (wxCommandEvent &event) |
void | DoShowContextMenu () |
int | AddPagePrivate (wxWindow *p, const wxString &title, wxBitmap *icon=nullptr) |
bool | InsertPagePrivate (wxWindow *p, const wxString &title, wxBitmap *icon=nullptr, int index=-1) |
Static Private Member Functions | |
static int | CompareIndexes (Page **p1, Page **p2) |
Private Attributes | |
wxBitmap | m_DefaultBitmap |
wxArrayOfPage | m_Pages |
Additional Inherited Members | |
Static Public Member Functions inherited from cbAuiNotebook | |
static void | UseToolTips (bool use=true) |
Enable or disable tabtooltips globally. More... | |
static void | AllowScrolling (bool allow=true) |
Enable or disable tab-scrolling with mousewheel. More... | |
static void | SetModKeys (wxString keys=_T("Strg")) |
Sets the modifier keys for scrolling. More... | |
static void | UseModToAdvance (bool use=false) |
Use modkey to advance through tabs with mousewheel. More... | |
static void | InvertAdvanceDirection (bool invert=false) |
Change direction of tab-advancing with mousewheel. More... | |
static void | InvertMoveDirection (bool invert=false) |
Change direction of tab-moving with mousewheel. More... | |
Protected Member Functions inherited from cbAuiNotebook | |
wxString | UniqueIdFromTooltip (const wxString &text) |
Create a unique id from the tooltip-text. More... | |
void | MinimizeFreeSpace (wxAuiTabCtrl *tabCtrl) |
Minmize free horizontal page of tabCtrl. More... | |
void | OnNavigationKeyNotebook (wxNavigationKeyEvent &event) |
Handle the navigation key event. More... | |
void | OnIdle (cb_unused wxIdleEvent &event) |
OnIdle. More... | |
void | OnTabCtrlDblClick (wxMouseEvent &event) |
Catch doubleclick-events from wxTabCtrl. More... | |
void | OnTabCtrlMouseWheel (wxMouseEvent &event) |
Catch mousewheel-events from wxTabCtrl. More... | |
void | OnResize (wxSizeEvent &event) |
Catch resize-events and call MinimizeFreeSpace() More... | |
void | OnDragDone (wxAuiNotebookEvent &event) |
Catch dragdone-events from wxTabCtrl. More... | |
void | OnEnterTabCtrl (wxMouseEvent &event) |
Catch mouseenter-events from wxTabCtrl. More... | |
void | OnLeaveTabCtrl (wxMouseEvent &event) |
Catch mouseleave-events from wxTabCtrl. More... | |
bool | IsFocusStored (wxWindow *page) |
Checks the old focus. More... | |
void | StoreFocus () |
Save old focus. More... | |
void | RestoreFocus () |
Restore old focus. More... | |
void | ResetTabCtrlEvents () |
Reset tabctrl events. More... | |
void | UpdateTabControlsArray () |
Updates the array, that holds the wxTabCtrls. More... | |
bool | CheckKeyModifier () |
Check for pressed modifier-keys. More... | |
Protected Member Functions inherited from wxAuiNotebook | |
bool | HasImageList () const |
wxIcon | GetImage (int iconIndex) const |
Protected Attributes inherited from cbAuiNotebook | |
cbAuiTabCtrlArray | m_TabCtrls |
Holds the wxTabCtrls used by the notebook. More... | |
int | m_LastSelected |
Last selected tab. More... | |
long | m_LastId |
Id of last focused window. More... | |
bool | m_SetZoomOnIdle |
If true, zoom for all editors is set in next OnIdle-call. More... | |
bool | m_MinimizeFreeSpaceOnIdle |
If true, MinimizeFreeSpace is called in next OnIdle-call. More... | |
wxSize | m_TabCtrlSize |
Holds the size of a tabCtrl after a resize event. More... | |
Static Protected Attributes inherited from cbAuiNotebook | |
static bool | s_UseTabTooltips |
Enable or disable tab tooltips. More... | |
static bool | s_AllowMousewheel = true |
Enable or disable scrolling tabs with mousewheel. More... | |
static cbAuiNotebookArray | s_cbAuiNotebookArray |
Holds an array of all existing cbAuiNotebooks. More... | |
static wxString | s_modKeys = _T("Ctrl") |
Holds the modifier keys for scrolling. More... | |
static bool | s_modToAdvance = false |
Use modkey to advance through tabs with mousewheel. More... | |
static int | s_moveDirection = 1 |
Mousewheel move direction: negative => invert. More... | |
static int | s_advanceDirection = 1 |
Mouseweheel advance direction: negative => invert. More... | |
Definition at line 25 of file infopane.h.
Definition at line 41 of file infopane.h.
InfoPane::InfoPane | ( | wxWindow * | parent | ) |
Definition at line 56 of file infopane.cpp.
References _T, cbLoadBitmap(), ConfigManager::GetDataFolder(), and wxBITMAP_TYPE_PNG.
|
virtual |
Definition at line 61 of file infopane.cpp.
References m_Pages.
bool InfoPane::AddLogger | ( | Logger * | logger, |
wxWindow * | p, | ||
const wxString & | title, | ||
wxBitmap * | icon = nullptr |
||
) |
Definition at line 448 of file infopane.cpp.
References AddPagePrivate(), InfoPane::Page::eventID, InfoPane::Page::icon, InfoPane::Page::indexInNB, InfoPane::Page::islogger, InfoPane::Page::logger, m_Pages, InfoPane::Page::title, InfoPane::Page::window, and wxNewId().
Definition at line 468 of file infopane.cpp.
References AddPagePrivate(), InfoPane::Page::eventID, InfoPane::Page::icon, InfoPane::Page::indexInNB, InfoPane::Page::islogger, m_Pages, InfoPane::Page::title, InfoPane::Page::window, and wxNewId().
|
private |
Definition at line 152 of file infopane.cpp.
References cbAuiNotebook::AddPage(), wxAuiNotebook::GetPageCount(), and m_DefaultBitmap.
Referenced by AddLogger(), AddNonLogger(), ReorderTabs(), and Toggle().
Definition at line 116 of file infopane.cpp.
Referenced by DoShowContextMenu(), LoadTabOrder(), and SaveTabOrder().
|
private |
Definition at line 343 of file infopane.cpp.
References DoShowContextMenu().
bool InfoPane::DeleteLogger | ( | Logger * | l | ) |
Definition at line 490 of file infopane.cpp.
References LogManager::DeleteLog(), cbAuiNotebook::DeletePage(), LogManager::FindIndex(), Manager::Get(), Manager::GetLogManager(), wxAuiNotebook::GetPageIndex(), and m_Pages.
bool InfoPane::DeleteNonLogger | ( | wxWindow * | p | ) |
Definition at line 533 of file infopane.cpp.
References _T, cbThrow, cbAuiNotebook::DeletePage(), wxAuiNotebook::GetPageIndex(), and m_Pages.
|
private |
Definition at line 368 of file infopane.cpp.
References _(), _T, Logger::Feature::Additional, wxMenu::Append(), Logger::AppendAdditionalMenuItems(), wxMenu::AppendCheckItem(), wxMenu::AppendSeparator(), wxMenu::AppendSubMenu(), Logger::Feature::CanClear, Logger::Feature::CanCopy, wxMenu::Check(), CompareIndexes(), Manager::Get(), wxMenu::GetMenuItemCount(), wxAuiNotebook::GetPage(), wxAuiNotebook::GetPageCount(), GetPageIndexByWindow(), wxAuiNotebook::GetSelection(), Logger::GetWrapMode(), Logger::HasFeature(), Logger::Feature::IsWrappable, m_Pages, UpdateEffectiveTabOrder(), wxEmptyString, and wxITEM_CHECK.
Referenced by ContextMenu(), and OnTabContextMenu().
int InfoPane::GetCurrentPage | ( | bool & | is_logger | ) |
Definition at line 209 of file infopane.cpp.
References wxAuiNotebook::GetPage(), GetPageIndexByWindow(), wxAuiNotebook::GetSelection(), and m_Pages.
Logger * InfoPane::GetLogger | ( | int | index | ) |
Definition at line 216 of file infopane.cpp.
int InfoPane::GetPageIndexByWindow | ( | wxWindow * | win | ) |
Definition at line 199 of file infopane.cpp.
References m_Pages.
Referenced by DoShowContextMenu(), GetCurrentPage(), OnClear(), OnCloseClicked(), OnCopy(), and OnWrapMode().
wxWindow * InfoPane::GetWindow | ( | int | index | ) |
Definition at line 223 of file infopane.cpp.
|
private |
void InfoPane::Hide | ( | Logger * | logger | ) |
Definition at line 241 of file infopane.cpp.
void InfoPane::HideNonLogger | ( | wxWindow * | p | ) |
Definition at line 269 of file infopane.cpp.
|
private |
Definition at line 160 of file infopane.cpp.
References cbAuiNotebook::InsertPage(), and m_DefaultBitmap.
Referenced by Toggle().
void InfoPane::LoadTabOrder | ( | wxString | layout | ) |
Definition at line 88 of file infopane.cpp.
References _T, wxString::AfterFirst(), wxString::AfterLast(), wxString::BeforeFirst(), CompareIndexes(), wxString::Find(), wxStringTokenizer::GetNextToken(), wxStringTokenizer::HasMoreTokens(), m_Pages, wxString::Remove(), ReorderTabs(), wxAuiNotebook::SetSelection(), and wxString::ToLong().
|
private |
Definition at line 320 of file infopane.cpp.
References wxAuiNotebook::GetPage(), GetPageIndexByWindow(), wxAuiNotebook::GetSelection(), and m_Pages.
|
private |
Definition at line 357 of file infopane.cpp.
References wxAuiNotebook::GetPage(), GetPageIndexByWindow(), wxAuiNotebookEvent::GetSelection(), and Toggle().
|
private |
Definition at line 298 of file infopane.cpp.
References wxAuiNotebook::GetPage(), GetPageIndexByWindow(), wxAuiNotebook::GetSelection(), and m_Pages.
|
private |
Definition at line 327 of file infopane.cpp.
|
private |
Definition at line 348 of file infopane.cpp.
References DoShowContextMenu(), wxAuiNotebookEvent::GetSelection(), and wxAuiNotebook::SetSelection().
|
private |
Definition at line 435 of file infopane.cpp.
References _T, Manager::Get(), Manager::GetConfigManager(), and ConfigManager::Write().
|
private |
Definition at line 310 of file infopane.cpp.
References wxAuiNotebook::GetPage(), GetPageIndexByWindow(), wxAuiNotebook::GetSelection(), Logger::Feature::IsWrappable, m_Pages, and TextCtrlLogger::ToggleWrapMode().
bool InfoPane::RemoveNonLogger | ( | wxWindow * | p | ) |
Definition at line 515 of file infopane.cpp.
References _T, cbThrow, wxAuiNotebook::GetPageIndex(), m_Pages, and cbAuiNotebook::RemovePage().
|
private |
Definition at line 123 of file infopane.cpp.
References AddPagePrivate(), wxAuiNotebook::GetPageIndex(), m_Pages, cbAuiNotebook::MovePage(), and cbAuiNotebook::RemovePage().
Referenced by LoadTabOrder().
wxString InfoPane::SaveTabOrder | ( | ) |
Definition at line 70 of file infopane.cpp.
References _T, CompareIndexes(), wxAuiNotebook::GetSelection(), m_Pages, and UpdateEffectiveTabOrder().
void InfoPane::Show | ( | size_t | index | ) |
Definition at line 230 of file infopane.cpp.
References wxAuiNotebook::GetPageIndex(), m_Pages, wxAuiNotebook::SetSelection(), and Toggle().
void InfoPane::Show | ( | Logger * | logger | ) |
Definition at line 254 of file infopane.cpp.
References wxAuiNotebook::GetPageIndex(), m_Pages, wxAuiNotebook::SetSelection(), and Toggle().
void InfoPane::ShowNonLogger | ( | wxWindow * | p | ) |
Definition at line 282 of file infopane.cpp.
References wxAuiNotebook::GetPageIndex(), m_Pages, wxAuiNotebook::SetSelection(), and Toggle().
|
private |
Definition at line 178 of file infopane.cpp.
References AddPagePrivate(), wxAuiNotebook::GetPageIndex(), InsertPagePrivate(), m_Pages, cbAuiNotebook::RemovePage(), and UpdateEffectiveTabOrder().
Referenced by Hide(), HideNonLogger(), OnCloseClicked(), OnMenu(), Show(), and ShowNonLogger().
void InfoPane::UpdateEffectiveTabOrder | ( | ) |
Definition at line 167 of file infopane.cpp.
References wxAuiNotebook::GetPageIndex(), cbAuiNotebook::GetTabPositionFromIndex(), and m_Pages.
Referenced by DoShowContextMenu(), SaveTabOrder(), and Toggle().
|
private |
|
private |
Definition at line 45 of file infopane.h.
Referenced by AddPagePrivate(), and InsertPagePrivate().
|
private |
Definition at line 48 of file infopane.h.
Referenced by AddLogger(), AddNonLogger(), DeleteLogger(), DeleteNonLogger(), DoShowContextMenu(), GetCurrentPage(), GetLogger(), GetPageIndexByWindow(), GetWindow(), Hide(), HideNonLogger(), LoadTabOrder(), OnClear(), OnCopy(), OnMenu(), OnWrapMode(), RemoveNonLogger(), ReorderTabs(), SaveTabOrder(), Show(), ShowNonLogger(), Toggle(), UpdateEffectiveTabOrder(), and ~InfoPane().