2#ifndef __CXNOTEBOOK_H__
3#define __CXNOTEBOOK_H__
65 int pRow = 0,
int pCol = 0,
68 bool pLabelsOnTop =
true,
69 bool pLeftLabelSpace =
true,
70 bool pRightLabelSpace =
true,
73 cxWindow *pExtStatusWindow =
nullptr,
74 bool pTabNavWrap =
true);
184 virtual long show(
bool pBringToTop =
false,
bool pShowSubwindows =
true)
override;
199 virtual long showModal(
bool pShowSelf =
true,
bool pBringToTop =
true,
200 bool pShowSubwindows =
true)
override;
208 virtual void hide(
bool pHideSubwindows =
true)
override;
216 virtual void unhide(
bool pUnhideSubwindows =
true)
override;
223 virtual std::string
cxTypeStr()
const override;
249 virtual std::shared_ptr<cxPanel>
append(
const std::string& pLabel,
const std::string& pPanelName =
"");
294 virtual bool move(
int pNewRow,
int pNewCol,
bool pRefresh =
true)
override;
319 bool pIsLabel =
true);
367 virtual void showSubwindows(
bool pBringToTop =
true,
bool pShowSubwindows =
true)
override;
377 virtual std::string
getLabel(
unsigned int pIndex)
const;
387 virtual std::string
getLabel(
const std::string& pName)
const;
400 virtual bool setLabel(
unsigned int pIndex,
const std::string& pLabel,
bool pRefresh =
false);
415 virtual bool setLabel(
const std::string& pID,
const std::string& pLabel,
416 bool pIsLabel =
true,
bool pRefresh =
false);
423 virtual void setEnabled(
bool pEnabled)
override;
434 virtual void setEnabled(
unsigned int pIndex,
bool pEnabled)
override;
449 virtual void setEnabled(
const std::string& pID,
bool pEnabled,
bool pIsTitle =
true)
override;
563 virtual std::shared_ptr<cxWindow>
removeWindow(
unsigned int pIndex)
override;
583 virtual void removeWindow(
const std::shared_ptr<cxWindow>& pWindow)
override;
593 virtual void delWindow(
unsigned int pIndex)
override;
610 virtual void delWindow(
const std::shared_ptr<cxWindow>& pWindow)
override;
679 virtual bool windowIsInPanel(
const std::shared_ptr<cxWindow>& pWindow)
const override;
702 virtual bool swap(
int pWindow1Index,
int pWindow2Index)
override;
715 virtual bool swap(
const std::shared_ptr<cxWindow>& pWindow1,
const std::shared_ptr<cxWindow>& pWindow2)
override;
737 typedef std::vector<std::shared_ptr<cxWindow> > labelWinContainer;
738 labelWinContainer mLabels;
740 bool mLeftLabelSpace;
741 bool mRightLabelSpace;
742 int mCurrentPanelIndex = 0;
746 std::string mAllDisabledMsg;
747 std::string mNoWindowsMsg;
748 std::string mWindowDisabledMsg;
750 int mLastClickTabIndex = -1;
761 long doInputLoop(
bool& pRunOnLeaveFunction);
770 void showCurrentWindow(
bool pApplyLabelAttr =
true,
bool pBringToTop =
true);
780 void setLabelWinSpecialChars(
unsigned int pIndex);
783 inline void setAllLabelWinSpecialChars();
790 void alignLabelWindows(
bool pRefresh =
false);
794 bool getExitOnLeaveLast()
const override;
795 void setExitOnLeaveLast(
bool pExitOnLeaveLast)
override;
796 bool getExitOnLeaveFirst()
const override;
797 void setExitOnLeaveFirst(
bool pExitOnLeaveFirst)
override;
799 bool append(
const std::shared_ptr<cxWindow>& pWindow)
override;
800 bool append(
const std::shared_ptr<cxWindow>& pWindow,
int pRow,
int pCol,
bool pRefresh =
false)
override;
817 void setupLabelBorder(
int pIndex,
bool pClear =
false);
821 static void removeSpaceStrings(std::map<int, std::string>& pStringMap);
This class represents a notebook control, which manages multiple.
Definition cxNotebook.h:33
virtual bool getShowPanelWindow() const override
Returns whether or not the panel window will be shown.
Definition cxNotebook.cpp:661
virtual std::shared_ptr< cxPanel > append(const std::string &pLabel, const std::string &pPanelName="")
Appends a new panel & tab to the notebook. Returns a pointer.
virtual void hide(bool pHideSubwindows=true) override
Hides the notebook.
Definition cxNotebook.cpp:313
virtual void showSubwindows(bool pBringToTop=true, bool pShowSubwindows=true) override
Shows the subwindows for the notebook. This is overidden here.
Definition cxNotebook.cpp:756
virtual std::string cxTypeStr() const override
Returns the class type as a string ("cxNotebook")
Definition cxNotebook.cpp:345
void setNoWindowsMsg(const std::string &pNoWindowsMsg)
Sets the message to be displayed when there are no panels in.
Definition cxNotebook.cpp:1064
virtual cxPanel * getPanel(const std::string &pID, bool pIsLabel=true) const
Returns a pointer to one of the panels in the notebook (by.
bool getLeftLabelSpace() const
Returns the currently-set option of having a space to the left.
Definition cxNotebook.cpp:126
virtual bool windowIsInPanel(const std::shared_ptr< cxWindow > &pWindow) const override
Returns whether a cxWindow object is contained in the notebook.
Definition cxNotebook.cpp:1967
void setWindowDisabledMsg(const std::string &pMsg)
Sets the message to be displayed when a window is disabled.
Definition cxNotebook.cpp:1074
void setTabNavKey(int pKey)
Sets the key that is used for bringing up a tab selection menu.
Definition cxNotebook.cpp:1029
virtual bool setCurrentWindow(const std::string &pID, bool pIsLabel) override
Sets which window will get focus in the next call to.
int getTabSpacing() const
Returns the number of spaces being used for horizontal tab.
Definition cxNotebook.cpp:192
int getTabNavKey() const
Returns the key currently used for bringing up the tab.
Definition cxNotebook.cpp:1049
virtual bool move(int pNewRow, int pNewCol, bool pRefresh=true) override
Changes the notebok's position, based on a new upper-left.
Definition cxNotebook.cpp:592
virtual bool windowIsInNotebook(cxWindow *pWindow) const
Returns whether a window exists in the notebook.
Definition cxNotebook.cpp:350
virtual bool setCurrentWindow(unsigned int pIndex) override
Sets which panel will get focus in the next call to.
Definition cxNotebook.cpp:1150
virtual void setEnabled(const std::string &pID, bool pEnabled, bool pIsTitle=true) override
Enables or disables a window in the panel (by title/name).
const std::string & getWindowDisabledMsg() const
Returns the message that is displayed when one of the panels in.
Definition cxNotebook.cpp:1069
virtual int lastClickTabIndex() const
Returns the index of the tab (label window) that was clicked.
Definition cxNotebook.cpp:1248
bool selectNextWin()
Selects the next available (enabled) window (moving forward),.
Definition cxNotebook.cpp:1277
bool selectPrevWin()
Selects the previous available (enabled) window (moving.
Definition cxNotebook.cpp:1330
virtual long showModal(bool pShowSelf=true, bool pBringToTop=true, bool pShowSubwindows=true) override
Shows the notebook and allows the user to interact with the.
Definition cxNotebook.cpp:262
virtual std::string getLabel(const std::string &pName) const
Returns the label forone of the panels (by panel name).
virtual cxPanel * getCurrentPanelPtr() const
Returns a pointer to the current panel, or nullptr if there is.
Definition cxNotebook.cpp:579
virtual bool getShowPanelWindow(const std::string &pID, bool pIsLabel=true) const
Returns whether or not one of the panels in the notebook will.
virtual std::string getLabel(unsigned int pIndex) const
Returns the label for one of the panels (by index).
Definition cxNotebook.cpp:784
virtual void delWindow(unsigned int pIndex) override
Removes a panel from the notebook (by index) and frees up its.
Definition cxNotebook.cpp:1130
const std::string & getNoWindowsMsg() const
Returns the message that is displayed when there are no panels.
Definition cxNotebook.cpp:1079
virtual cxPanel * getPanel(unsigned int pIndex) const
Returns a pointer to one of the panels in the notebook (by.
Definition cxNotebook.cpp:504
const std::string & getAllDisabledMsg() const
Returns the message that is displayed when all the panels in.
Definition cxNotebook.cpp:1059
virtual void setShowPanelWindow(const std::string &pID, bool pShowPanelWindow, bool pIsLabel=true)
Sets whether one of the panels in the notebook should show.
void setLeftLabelSpace(bool pLeftLabelSpace)
Toggles the option to have a space to the left of label text.
Definition cxNotebook.cpp:121
virtual bool mouseEvtWasInTitle() const override
Returns whether the current mouse information's coordinates.
Definition cxNotebook.cpp:1084
void setNextTabKey(int pKey)
Sets the key to be used for navigation to the next tab.
Definition cxNotebook.cpp:978
bool getRightLabelSpace() const
Returns the currently-set option of having a space to the right.
Definition cxNotebook.cpp:136
virtual bool setCurrentWindowByPtr(cxWindow *pWindow) override
Sets which window will get focus in the next.
Definition cxNotebook.cpp:1224
virtual bool swap(int pWindow1Index, int pWindow2Index) override
Swaps the order of 2 panels (by index). If both indexes are.
Definition cxNotebook.cpp:1253
virtual bool setLabel(const std::string &pID, const std::string &pLabel, bool pIsLabel=true, bool pRefresh=false)
Sets the label for one of the panels (by label/name). If the.
virtual long show(bool pBringToTop=false, bool pShowSubwindows=true) override
Shows the notebook.
Definition cxNotebook.cpp:207
void setPrevTabKey(int pKey)
Sets the key to be used for navigation to the previous tab.
Definition cxNotebook.cpp:1003
int getNextTabKey() const
Returns the key that is used for navigation to the next tab.
Definition cxNotebook.cpp:998
virtual bool setCurrentWindow(const std::string &pTitle)
Sets which panel will get focus in the next call to.
virtual void setEnabled(bool pEnabled) override
Enables or disables the notebook.
Definition cxNotebook.cpp:949
void setAllDisabledMsg(const std::string &pAllDisabledMsg)
Sets the message to be displayed when all the panels in the.
Definition cxNotebook.cpp:1054
void setRightLabelSpace(bool pRightLabelSpace)
Toggles the option to have a space to the right of label text.
Definition cxNotebook.cpp:131
virtual void setShowPanelWindow(unsigned int pIndex, bool pShowPanelWindow)
Sets whether one of the panels in the notebook should show.
Definition cxNotebook.cpp:600
void setTabNavWrap(bool pTabNavWrap)
Sets whether or not the user will be able to wrap from the.
Definition cxNotebook.cpp:197
bool getLabelsOnTop() const
Returns whether the labels are set to appear on top.
Definition cxNotebook.cpp:116
virtual void unhide(bool pUnhideSubwindows=true) override
Un-hides the notebook.
Definition cxNotebook.cpp:329
int getPrevTabKey() const
Returns the key that is used for navigation to the previous tab.
Definition cxNotebook.cpp:1024
virtual bool setLabel(unsigned int pIndex, const std::string &pLabel, bool pRefresh=false)
Sets the label for one of the panels (by index). If the new.
void setLabelsOnTop(bool pLabelsOnTop, bool pRefresh=false)
Toggles whether the labels should be on the top or bottom.
Definition cxNotebook.cpp:50
virtual std::shared_ptr< cxWindow > removeWindow(unsigned int pIndex) override
Removes a panel from the notebook. This returns a cxWindow.
Definition cxNotebook.cpp:1094
virtual ~cxNotebook()
Definition cxNotebook.cpp:46
bool getTabNavWrap() const
Returns whether or not wrapping is allowed between the first.
Definition cxNotebook.cpp:202
bool setTabSpacing(int pTabSpacing, bool pRefresh=false)
Sets the number of spaces to use for horizontal alignment of.
Definition cxNotebook.cpp:141
cxPanel is a window that contains other windows. When showModal()
Definition cxPanel.h:46
Represents a text-based window on the screen. Can contain a title, status, and a message to appear wi...
Definition cxWindow.h:195
#define PAGE_DOWN
Definition cxKeyDefines.h:23
#define PAGE_UP
Definition cxKeyDefines.h:22
#define DEFAULT_HEIGHT
Definition cxWindow.h:68
#define DEFAULT_WIDTH
Definition cxWindow.h:69
cxBorderChars.h - Defines border characters to be used in drawing a box (i.e., in cxWindow and all it...
Definition cxApp.cpp:5