71 int pRow = 0,
int pCol = 0,
74 const std::string& pTitle =
"",
75 const std::string& pMessage =
"",
76 const std::string& pStatus =
"",
79 cxWindow *pExtStatusWindow =
nullptr,
80 bool pMessageUnderlines =
false);
100 virtual long showModal(
bool pShowSelf =
true,
bool pBringToTop =
true,
101 bool pShowSubwindows =
true)
override;
167 virtual std::shared_ptr<cxWindow>
getWindow(
unsigned pIndex)
const;
182 virtual bool append(
const std::shared_ptr<cxWindow>& pWindow);
205 virtual bool append(
const std::shared_ptr<cxWindow>& pWindow,
int pRow,
int pCol,
bool pRefresh =
false);
225 virtual void delWindow(
const std::shared_ptr<cxWindow>& pWindow);
246 virtual std::shared_ptr<cxWindow>
removeWindow(
unsigned int pIndex);
281 virtual bool move(
int pNewRow,
int pNewCol,
bool pRefresh =
true)
override;
328 virtual bool setKeyFunction(
int pKey,
const std::shared_ptr<cxFunction>& pFunction)
override;
366 void *p1,
void *p2,
void *p3,
void *p4,
367 bool pUseReturnVal =
false,
368 bool pExitAfterRun =
false,
369 bool pRunOnLeaveFunction =
true)
override;
398 bool pUseReturnVal =
false,
399 bool pExitAfterRun =
false,
400 bool pRunOnLeaveFunction =
true)
override;
428 bool pUseReturnVal =
false,
429 bool pExitAfterRun =
false,
430 bool pRunOnLeaveFunction =
true)
override;
476 virtual long show(
bool pBringToTop =
false,
bool pShowSubwindows =
true)
override;
484 virtual void hide(
bool pHideSubwindows =
true)
override;
492 virtual void unhide(
bool pUnhideSubwindows =
true)
override;
564 virtual void enableWindow(
unsigned pIndex,
bool pEnabled =
true);
572 virtual void clear(
bool pRefresh =
false)
override;
590 virtual bool addQuitKey(
int pKey,
bool pRunOnLeaveFunction =
true,
591 bool pOverride =
false)
override;
616 virtual bool addExitKey(
int pKey,
bool pRunOnLeaveFunction =
true,
617 bool pOverride =
false)
override;
632 virtual void setEnabled(
bool pEnabled)
override;
653 virtual void setEnabled(
const std::string& pID,
bool pEnabled,
bool pIsTitle =
true);
665 virtual bool swap(
int pWindow1Index,
int pWindow2Index);
678 virtual bool swap(
const std::shared_ptr<cxWindow>& pWindow1,
const std::shared_ptr<cxWindow>& pWindow2);
697 virtual std::string
cxTypeStr()
const override;
703 virtual void quitNow()
override;
709 virtual void exitNow()
override;
731 virtual void setName(
unsigned pIndex,
const std::string& pName);
742 virtual void setName(
const std::string& pID,
const std::string& pName,
bool pIsTitle =
true);
751 virtual void setName(
const std::string& pName)
override;
757 virtual int top()
const override;
763 virtual int bottom()
const override;
809 cxWindowPtrCollection::iterator mWindowIter;
810 bool mExitOnLeaveLast =
false;
811 bool mExitOnLeaveFirst =
false;
812 bool mAllowExit =
true;
813 bool mAllowQuit =
true;
818 bool mShowPanelWindow =
true;
828 bool addWindowPtr(
const std::shared_ptr<cxWindow>& pWindow);
837 long doInputLoop(
bool pSubwinShow,
bool& pRunOnLeaveFunction);
854 inline void addExitKeyToWindow(std::shared_ptr<cxWindow>& pWindow,
int pKey,
855 bool pRunOnLeaveFunction,
bool pOverride);
872 inline void addQuitKeyToWindow(std::shared_ptr<cxWindow>& pWindow,
int pKey,
873 bool pRunOnLeaveFunction,
bool pOverride);
cxPanel is a window that contains other windows. When showModal()
Definition cxPanel.h:46
virtual ~cxPanel()
Definition cxPanel.cpp:41
virtual int bottom() const override
Returns the bottom row of the window.
Definition cxPanel.cpp:1024
virtual std::shared_ptr< cxWindow > getWindow(unsigned pIndex) const
Gets a pointer to one of the subwindows (by index).
Definition cxPanel.cpp:126
virtual bool append(const std::shared_ptr< cxWindow > &pWindow)
Adds a window to the panel. Note: The cxWindow.
virtual void setEnabled(unsigned pIndex, bool pEnabled)
Enables or disables a window in the panel (by index).
virtual bool getAllowQuit() const
Returns whether the user is allowed to quit out.
Definition cxPanel.cpp:657
std::vector< std::shared_ptr< cxWindow > > cxWindowPtrCollection
Definition cxPanel.h:766
virtual void setAllowQuit(bool pAllowQuit)
Sets whether the user is allowed to quit out of.
Definition cxPanel.cpp:662
const std::shared_ptr< cxWindow > & getLastWindow() const
Returns a pointer to the last window in the panel that was.
Definition cxPanel.cpp:974
virtual void setExitOnLeaveLast(bool pExitOnLeaveLast)
Sets whether the panel should exit focus.
Definition cxPanel.cpp:106
virtual void delAllWindows()
Removes all windows from the panel. Also frees the memory used.
Definition cxPanel.cpp:195
virtual long show(bool pBringToTop=false, bool pShowSubwindows=true) override
Shows the panel. If setShowPanelWindow(false) has been.
Definition cxPanel.cpp:568
virtual void setColor(e_WidgetItems pItem, e_cxColors pColor) override
Sets the color of one of the window items.
Definition cxPanel.cpp:881
virtual std::shared_ptr< cxWindow > removeWindow(unsigned int pIndex)
Removes a window from the panel, without freeing its memory.
Definition cxPanel.cpp:206
virtual int top() const override
Returns the top row of the window.
Definition cxPanel.cpp:1019
virtual bool append(const std::shared_ptr< cxWindow > &pWindow, int pRow, int pCol, bool pRefresh=false)
Adds a window to the panel with relative coordinates.
virtual bool windowIsInPanel(const std::shared_ptr< cxWindow > &pWindow) const
Returns whether a cxWindow object is contained.
virtual bool getExitOnLeaveLast() const
Returns whether or not the panel will exit focus.
Definition cxPanel.cpp:101
cxWindowPtrCollection mWindows
Definition cxPanel.h:767
virtual void setAllowExit(bool pAllowExit)
Sets whether the user is allowed to exit out of.
Definition cxPanel.cpp:652
virtual void quitNow() override
This causes the panel to stop its input loop with a code of.
Definition cxPanel.cpp:896
bool anyEnabledWindows() const
Returns whether any of the windows contained in mWindows are.
Definition cxPanel.cpp:1029
virtual bool getShowPanelWindow() const
Returns whether or not the panel window will be.
Definition cxPanel.cpp:637
virtual void clearKeyFunction(int pKey) override
Removes a function pointer for a keypress for the panel so that it will no.
Definition cxPanel.cpp:431
virtual bool getAllowExit() const
Returns whether the user is allowed to exit out.
Definition cxPanel.cpp:647
virtual bool swap(int pWindow1Index, int pWindow2Index)
Swaps the order of 2 subwindows (by index). If both indexes.
Definition cxPanel.cpp:818
virtual void removeQuitKey(int pKey) override
Removes a quit key.
Definition cxPanel.cpp:715
virtual unsigned int numWindows() const
Returns the number of windows that are contained.
Definition cxPanel.cpp:121
cxPanel(cxWindow *pParentWindow=nullptr, int pRow=0, int pCol=0, int pHeight=DEFAULT_HEIGHT, int pWidth=DEFAULT_WIDTH, const std::string &pTitle="", const std::string &pMessage="", const std::string &pStatus="", eBorderStyle pBorderStyle=eBS_NOBORDER, cxWindow *pExtTitleWindow=nullptr, cxWindow *pExtStatusWindow=nullptr, bool pMessageUnderlines=false)
Default constructor.
virtual bool setCurrentWindow(unsigned pIndex)
Sets which window will get focus in the next.
virtual long showModal(bool pShowSelf=true, bool pBringToTop=true, bool pShowSubwindows=true) override
Shows the panel and all of its subwindows and.
Definition cxPanel.cpp:45
virtual void removeExitKey(int pKey) override
Removes an exit key.
Definition cxPanel.cpp:747
virtual void setEnabled(const std::string &pID, bool pEnabled, bool pIsTitle=true)
Enables or disables a window in the panel (by title/name).
virtual void setShowPanelWindow(bool pShowPanelWindow)
Sets whether or not the panel window should be shown.
Definition cxPanel.cpp:642
std::shared_ptr< cxWindow > mLastWindow
Definition cxPanel.h:771
virtual bool setCurrentWindow(const std::string &pID, bool pIsTitle=true)
Sets which window will get focus in the next.
virtual std::string cxTypeStr() const override
Returns the name of the cxWidgets class. This can be used to.
Definition cxPanel.cpp:891
virtual void setName(const std::string &pName) override
Sets the name of the panel. The name is an alternative means.
bool lastEnabledWindow(int pIndex) const
Returns whether or not a window in the panel with a given index.
Definition cxPanel.cpp:1052
virtual void unhide(bool pUnhideSubwindows=true) override
Un-hides the panel, along with the windows in the panel.
Definition cxPanel.cpp:622
virtual void delWindow(const std::shared_ptr< cxWindow > &pWindow)
Removes a window from the panel (by pointer), and frees the.
virtual void setEnabled(bool pEnabled) override
Enables or disables the panel. Disabling/enabling a cxPanel.
Definition cxPanel.cpp:759
virtual bool setCurrentWindowByPtr(const std::shared_ptr< cxWindow > &pWindow)
Sets which window will get focus in the next.
virtual bool windowIsEnabled(unsigned pIndex) const
Returns whether or not one of the windows in the panel.
Definition cxPanel.cpp:667
virtual bool setKeyFunction(int pKey, const std::shared_ptr< cxFunction > &pFunction) override
Sets a function to be called when a key is pressed.
virtual bool getExitOnLeaveFirst() const
Returns whether the panel will exit focus.
Definition cxPanel.cpp:111
virtual void hide(bool pHideSubwindows=true) override
Hides the panel, along with the windows in the panel.
Definition cxPanel.cpp:607
bool mCycleWin
Definition cxPanel.h:768
virtual void clear(bool pRefresh=false) override
Clears all the window in the panel.
Definition cxPanel.cpp:687
virtual void setName(const std::string &pID, const std::string &pName, bool pIsTitle=true)
Sets the name of one of the windows in the panel (by title/name).
virtual void removeWindow(const std::shared_ptr< cxWindow > &pWindow)
Removes a window from the panel, without freeing its memory.
virtual bool addQuitKey(int pKey, bool pRunOnLeaveFunction=true, bool pOverride=false) override
Adds a key that will cause the window to quit its input loop.
Definition cxPanel.cpp:695
virtual int getWindowIndex(const std::shared_ptr< cxWindow > &pWindow) const
Given a cxWindow pointer, this function will return the index.
bool firstEnabledWindow(int pIndex) const
Returns whether or not a window in the panel with a given index.
Definition cxPanel.cpp:1078
virtual bool move(int pNewRow, int pNewCol, bool pRefresh=true) override
Changes the panel's position, based on a new upper-left corner.
Definition cxPanel.cpp:286
virtual const std::shared_ptr< cxWindow > & getCurrentWindowPtr() const
Returns a pointer to the current window.
Definition cxPanel.cpp:555
virtual void enableWindow(unsigned pIndex, bool pEnabled=true)
Enables/disables one of the windows in the panel (by index).
Definition cxPanel.cpp:679
virtual void setName(unsigned pIndex, const std::string &pName)
Sets the name of one of the windows in the panel (by index).
virtual void setExitOnLeaveFirst(bool pExitOnLeaveFirst)
Sets whether the panel should exit focus.
Definition cxPanel.cpp:116
virtual void delWindow(unsigned pIndex)
Removes a window from the panel (by index) and frees the memory.
virtual bool addExitKey(int pKey, bool pRunOnLeaveFunction=true, bool pOverride=false) override
Adds a key that will cause the window to quit its input loop.
Definition cxPanel.cpp:727
virtual void exitNow() override
This causes the panel to stop its input loop with a code of.
Definition cxPanel.cpp:935
virtual int getCurrentWindowIndex() const
Returns the index of the current window.
Definition cxPanel.cpp:498
Represents a text-based window on the screen. Can contain a title, status, and a message to appear wi...
Definition cxWindow.h:195
#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
std::string(* funcPtr4)(void *p1, void *p2, void *p3, void *p4)
Definition cxFunction.h:21
e_WidgetItems
Definition cxWidgetItems.h:42
std::string(* funcPtr0)()
Definition cxFunction.h:19
std::string(* funcPtr2)(void *p1, void *p2)
Definition cxFunction.h:20
eBorderStyle
Definition cxBorderStyles.h:26
@ eBS_NOBORDER
Definition cxBorderStyles.h:27
e_cxColors
Definition cxColors.h:46