45#ifndef NCURSES_MOUSE_VERSION
46 #define BUTTON1_PRESSED 2
47 #define BUTTON1_RELEASED 1
48 #define BUTTON1_CLICKED 4
49 #define BUTTON1_DOUBLE_CLICKED 8
50 #define BUTTON1_TRIPLE_CLICKED 16
51 #define BUTTON2_PRESSED 128
52 #define BUTTON2_RELEASED 64
53 #define BUTTON2_CLICKED 256
54 #define BUTTON2_DOUBLE_CLICKED 512
55 #define BUTTON2_TRIPLE_CLICKED 1024
56 #define BUTTON3_PRESSED 8192
57 #define BUTTON3_RELEASED 4096
58 #define BUTTON3_CLICKED 16384
59 #define BUTTON3_DOUBLE_CLICKED 32768
60 #define BUTTON3_TRIPLE_CLICKED 65536
61 #define BUTTON4_PRESSED 524288
62 #define BUTTON4_RELEASED 262144
63 #define BUTTON4_CLICKED 1048576
64 #define BUTTON4_DOUBLE_CLICKED 2097152
65 #define BUTTON4_TRIPLE_CLICKED 4194304
68#define DEFAULT_HEIGHT 24
69#define DEFAULT_WIDTH 80
218 int pRow = 0,
int pCol = 0,
221 const std::string& pTitle =
"",
222 const std::string& pMessage =
"",
223 const std::string& pStatus =
"",
225 cxWindow *pExtTitleWindow =
nullptr,
226 cxWindow *pExtStatusWindow =
nullptr,
227 bool pHotkeyHighlighting =
false);
243 int pRow,
int pCol,
const std::string& pTitle,
244 const std::string& pMessage,
const std::string& pStatus,
245 cxWindow *pExtTitleWindow =
nullptr,
246 cxWindow *pExtStatusWindow =
nullptr,
247 bool pHotkeyHighlighting =
false);
260 const std::string& pTitle,
const std::string& pMessage,
261 const std::string& pStatus,
262 cxWindow *pExtTitleWindow =
nullptr,
263 cxWindow *pExtStatusWindow =
nullptr,
264 bool pHotkeyHighlighting =
false);
280 const std::string& pTitle,
const std::string& pMessage,
281 const std::string& pStatus,
282 int pHeight,
int pWidth,
283 cxWindow *pExtTitleWindow =
nullptr,
284 cxWindow *pExtStatusWindow =
nullptr,
285 bool pHotkeyHighlighting =
false);
298 const std::string& pMessage,
const std::string& pStatus,
299 cxWindow *pExtTitleWindow =
nullptr,
300 cxWindow *pExtStatusWindow =
nullptr,
301 bool pHotkeyHighlighting =
false);
316 const std::string& pMessage,
const std::string& pStatus,
317 int pHeight,
int pWidth,
318 cxWindow *pExtTitleWindow =
nullptr,
319 cxWindow *pExtStatusWindow =
nullptr,
320 bool pHotkeyHighlighting =
false);
332 cxWindow *pExtTitleWindow =
nullptr,
333 cxWindow *pExtStatusWindow =
nullptr,
334 bool pHotkeyHighlighting =
false);
348 const std::string& pTitle,
const std::string& pMessage,
349 const std::string& pStatus,
350 cxWindow *pExtTitleWindow =
nullptr,
351 cxWindow *pExtStatusWindow =
nullptr,
352 bool pHotkeyHighlighting =
false);
382 virtual void centerVert(
bool pRefresh =
true);
395 virtual void center(
bool pRefresh =
true);
403 virtual std::string
getTitle()
const;
412 virtual void setTitle(
const std::string& pTitle,
bool pRefreshTitle =
true);
425 virtual void setStatus(
const std::string& pStatus,
bool pRefreshStatus =
true);
437 virtual void setMessage(
const std::string &pMessage);
531 virtual void setMessageLine(
unsigned pIndex,
const std::string& pLine);
630 virtual long show(
bool pBringToTop =
false,
bool pShowSubwindows =
true);
645 virtual long showModal(
bool pShowSelf =
true,
bool pBringToTop =
true,
646 bool pShowSubwindows =
true);
670 virtual long setFocus(
bool pShowSelf =
true,
bool pBringToTop =
true,
671 bool pShowSubwindows =
true);
700 virtual void erase(
bool pEraseSubwindows =
true);
706 virtual void bringToTop(
bool pRefresh =
true);
752 virtual void hide(
bool pHideSubwindows =
true);
760 virtual void unhide(
bool pUnhideSubwindows =
true);
783 virtual void drawBorder(
int pRow,
int pCol,
int pHeight,
int pWidth,
784 bool pTop=
true,
bool pBottom=
true,
785 bool pLeft=
true,
bool pRight=
true);
792 virtual void drawBorder(
int pHeight,
int pWidth);
803 virtual int top()
const;
815 virtual int bottom()
const;
821 virtual int left()
const;
833 virtual int right()
const;
842 virtual int width(
int pWidth);
848 virtual int width()
const;
857 virtual int height(
int pHeight);
863 virtual int height()
const;
873 virtual void getRect(
int& pTop,
int& pLeft,
int& pBottom,
int& pRight);
902 virtual void getSize(
int& pHeight,
int& pWidth);
959 virtual void resize(
int pNewHeight,
int pNewWidth,
bool pRefresh =
true);
969 virtual bool move(
int pNewRow,
int pNewCol,
bool pRefresh =
true);
984 virtual bool moveRelative(
int pVerticalOffset,
int pHorizOffset,
bool pRefresh =
true);
1058 virtual void dump(std::string& pResult);
1067 virtual void showSubwindows(
bool pBringToTop =
true,
bool pShowSubwindows =
true);
1090 virtual void writeText(
int pRow,
int pCol,
const std::string& pText,
bool pRefresh =
true);
1242 void *p3,
void *p4,
bool pUseVal =
false,
1243 bool pExitAfterRun =
false);
1259 bool pUseVal =
false,
bool pExitAfterRun =
false);
1273 bool pExitAfterRun =
false);
1430 void *p1,
void *p2,
void *p3,
void *p4,
1431 bool pUseReturnVal =
false,
1432 bool pExitAfterRun =
false,
1433 bool pRunOnLeaveFunction =
true);
1456 bool pUseReturnVal =
false,
1457 bool pExitAfterRun =
false,
1458 bool pRunOnLeaveFunction =
true);
1481 bool pUseReturnVal =
false,
1482 bool pExitAfterRun =
false,
1483 bool pRunOnLeaveFunction =
true);
1604 void *p1,
void *p2,
void *p3,
void *p4,
1605 bool pUseReturnVal =
false,
1606 bool pExitAfterRun =
false,
1607 bool pRunOnLeaveFunction =
true);
1652 bool pUseReturnVal =
false,
1653 bool pExitAfterRun =
false,
1654 bool pRunOnLeaveFunction =
true);
1700 bool pUseReturnVal =
false,
1701 bool pExitAfterRun =
false,
1702 bool pRunOnLeaveFunction =
true);
1832 bool pRefreshTitle =
false);
1874 virtual void setTitleStrings(
const std::map<int, std::string>& pTitleStrings);
1905 bool pRefreshStatus =
false);
1947 virtual void setStatusStrings(
const std::map<int, std::string>& pStatusStrings);
1975 virtual bool addQuitKey(
int pKey,
bool pRunOnLeaveFunction =
true,
1976 bool pOverride =
false);
2004 virtual bool addExitKey(
int pKey,
bool pRunOnLeaveFunction =
true,
2005 bool pOverride =
false);
2047 virtual void clear(
bool pRefresh =
false);
2259 virtual std::string
cxTypeStr()
const override;
2282 virtual void setName(
const std::string& pName);
2475#ifdef NCURSES_MOUSE_VERSION
2484 MEVENT getMouseEvent()
const;
2496 std::string
getString(
int pRow,
int pCol,
int pNumber);
2547 attr_t pAttr = A_NORMAL);
2689#ifdef NCURSES_MOUSE_VERSION
2724 virtual void init(
int pRow,
int pCol,
int pHeight,
int pWidth,
2725 const std::string& pTitle,
const std::string& pMessage,
2726 const std::string& pStatus,
cxWindow *pParentWindow =
nullptr,
2727 bool pResizeVertically =
true);
2803 const int& pY,
const int& pStartX,
const int& pEndX,
2804 int pNormalTextItem = -1);
2827 const std::string& pTitle,
const std::string& pStatus,
2828 const std::string& pMessage,
int& pRow,
int& pCol);
2844 bool *pRunOnLeaveFunction =
nullptr);
2860 bool *pRunOnLeaveFunction =
nullptr);
2867 virtual void draw();
2882#ifdef NCURSES_MOUSE_VERSION
2883 static bool mouseEvtInRect(
const MEVENT& pMouse,
int pTop,
int pLeft,
2884 int pBottom,
int pRight);
2974 PANEL *mPanel =
nullptr;
2980 std::string mExtTitleTemp;
2981 std::string mExtStatusTemp;
2984 bool mFocus =
false;
2986 bool mEnabled =
true;
2987 bool mDisableCursorOnShow =
true;
2988 bool mExitOnMouseOutside =
false;
2989 int mLastKey =
NOKEY;
2990 bool mChangeColorsOnFocus =
false;
2991 bool mShowSubwinsForward =
true;
2994 bool mShowSelfBeforeSubwins =
true;
2997 bool mRunOnFocus =
true;
2998 bool mRunOnLeave =
true;
3001 std::map<int, std::string> mTitleStrings;
3002 std::map<int, std::string> mStatusStrings;
3005 bool mDrawBorderTop =
true;
3006 bool mDrawBorderBottom =
true;
3007 bool mDrawBorderLeft =
true;
3008 bool mDrawBorderRight =
true;
3013 void drawLabel(
int pRow,
int pCol,
const std::string& pLabel);
3016 inline int maxSubwindowHeight()
const;
3020 void combineMessageLines(std::string& message);
3025 inline bool subWindowExists(
cxWindow *pWindow)
const;
3031 void addToParentWindow(
cxWindow *pParentWindow);
3043 void writeBorderStrings(
const std::map<int, std::string>& pStrings,
int pVPos,
3048 inline bool anySubwinHasThisParent();
The base class for windowing classes in the cxWidgets.
Definition cxObject.h:41
Represents a text-based window on the screen. Can contain a title, status, and a message to appear wi...
Definition cxWindow.h:195
void freeWindow()
Frees the memory used by the ncurses window and.
Definition cxWindow.cpp:5403
cxWindowPtrContainer::const_iterator subWindows_begin() const
Returns a const iterator to the first subwindow.
Definition cxWindow.cpp:6168
virtual e_cxColors getItemColor(e_WidgetItems pItem) const
Returns the color of one of the items in a window.
Definition cxWindow.cpp:4121
virtual void unSetFocusColors()
Disables focus for this window and unhighlights the message.
Definition cxWindow.cpp:1657
cxWindowPtrContainer::const_iterator subWindows_end() const
Returns a const iterator to the one past the last subwindow.
Definition cxWindow.cpp:6173
virtual bool pointIsInWindow(int pY, int pX) const
Returns whether a screen location is in the window (including.
Definition cxWindow.cpp:1991
virtual bool addQuitKey(int pKey, bool pRunOnLeaveFunction=true, bool pOverride=false)
Adds a key that will cause the window to quit its input loop.
Definition cxWindow.cpp:3267
virtual int bottom() const
Returns the bottom row of the window.
Definition cxWindow.cpp:1929
virtual bool onLeaveFunctionEnabled() const
Returns whether or not the onLeave function is set to run.
Definition cxWindow.cpp:2556
virtual void getExitKeyStrings(std::vector< std::string > &pKeys) const
Populates a collection of strings representing the keys.
Definition cxWindow.cpp:3400
bool mouseButton1DoubleClicked() const
Returns whether or not the first mouse button was double-clicked.
Definition cxWindow.cpp:3935
std::map< int, std::shared_ptr< cxFunction > > mMouseFunctions
Definition cxWindow.h:2679
virtual void getFunctionKeyStrings(std::vector< std::string > &pKeys) const
Populates a collection of strings representing the keys.
Definition cxWindow.cpp:4199
virtual void removeStatusStrings()
Removes all status strings.
Definition cxWindow.cpp:3258
virtual void setExitOnMouseOutside(bool pExitOnMouseOutside)
Sets whether the window should exit its modal input loop.
Definition cxWindow.cpp:2318
virtual void getQuitKeyStrings(std::vector< std::string > &pKeys) const
Populates a collection of strings representing the keys.
Definition cxWindow.cpp:3377
virtual void setTitle(const std::string &pTitle, bool pRefreshTitle=true)
Setter for the title text - This sets the first string in the.
Definition cxWindow.cpp:925
virtual void addMessageLineAbove(const std::string &pLine)
Adds a line to the message to be displayed in the window,.
Definition cxWindow.cpp:1105
bool onFocusFunctionIsSet() const
Returns whether or not the onFocus function is set (if.
Definition cxWindow.cpp:6188
bool mouseButton1Released() const
Returns whether or not the first mouse button was released.
Definition cxWindow.cpp:3913
virtual void exitNow()
This is mainly for deriving classes. It tells the object.
Definition cxWindow.cpp:3362
virtual std::map< int, std::string > getStatusStrings() const
Returns the map of status strings for the window.
Definition cxWindow.cpp:3219
virtual bool handleFunctionForLastMouseState(bool *pFunctionExists=nullptr, bool *pRunOnLeaveFunction=nullptr)
Looks for a function tied to the last mouse state captured.
Definition cxWindow.cpp:5317
void setKeyFunctions(const cxWindow &pWindow)
Returns whether or not a mouse event location is within.
Definition cxWindow.cpp:5768
virtual void setHotkeyHighlighting(bool pHotkeyHighlighting)
Enables/disables the use of hotkey attributes when writing the message.
Definition cxWindow.cpp:2262
virtual void getRect(int &pTop, int &pLeft, int &pBottom, int &pRight)
Returns the coordinates of the rectangle defining the window.
Definition cxWindow.cpp:1983
virtual bool addStatusString(int pHPos, const std::string &pStr, bool pRefreshStatus=false)
Adds/sets a string to appear in the status line at.
Definition cxWindow.cpp:3179
virtual const std::shared_ptr< cxFunction > & getOnLeaveFunction() const
Accessor for the onLeave function.
Definition cxWindow.cpp:2566
virtual int width() const
Returns the width of the window.
Definition cxWindow.cpp:1961
virtual void addMessageLinesBelow(const std::list< std::string > &pLines)
Adds lines to the message below the current message text.
virtual void addMessageLineBelow(const std::string &pLine)
Adds a line to the message to be displayed in the window,.
Definition cxWindow.cpp:1082
virtual void clearMouseFunction(int pMouseState)
Removes a function pointer for a mouse event so that it will.
Definition cxWindow.cpp:3036
bool mouseEvtWasButtonEvt() const
Returns whether or not the mouse event read in mMouse was.
Definition cxWindow.cpp:5730
virtual void drawMessage()
Writes the message text (in the area within the borders)
Definition cxWindow.cpp:3517
virtual void setReturnCode(const long &pReturnCode)
Explicitly sets the member return code for the window.
Definition cxWindow.cpp:3699
virtual cxWindow * getParent() const
Returns a pointer to the parent window.
Definition cxWindow.cpp:2037
messageLineContainer mMessageLines
Contains the text to be shown inside the window (note: the.
Definition cxWindow.h:2614
virtual void setStatusStrings(const std::map< int, std::string > &pStatusStrings)
Sets all the status strings via a map of horizontal.
Definition cxWindow.cpp:3229
std::map< int, bool > mExitKeys
Definition cxWindow.h:2685
bool mouseButton2Clicked() const
Returns whether or not the second mouse button was clicked.
Definition cxWindow.cpp:3946
virtual bool getShowSelfBeforeSubwins() const
Returns whether or not the window will show itself before.
Definition cxWindow.cpp:3081
std::string getMouseStateStr() const
Returns a string version of the current mouse state as it was.
Definition cxWindow.cpp:4102
virtual void init(int pRow, int pCol, int pHeight, int pWidth, const std::string &pTitle, const std::string &pMessage, const std::string &pStatus, cxWindow *pParentWindow=nullptr, bool pResizeVertically=true)
Initializes the window parameters and sets up the internal.
Definition cxWindow.cpp:4511
cxWindow(cxWindow *pParentWindow, const std::string &pMessage, const std::string &pStatus, cxWindow *pExtTitleWindow=nullptr, cxWindow *pExtStatusWindow=nullptr, bool pHotkeyHighlighting=false)
Overloaded constructor - Centers the window in the middle of the screen.
eVPosition getVerticalMessageAlignment() const
Accessor for the vertical message text alignment.
Definition cxWindow.cpp:1236
std::string getMessage() const
Returns the message that appears in the window, concatenating all message lines together.
Definition cxWindow.cpp:1046
std::string getString(int pRow, int pCol, int pNumber)
Get the contents of a portion of the window. (for debugging/testing)
Definition cxWindow.cpp:4013
virtual void getRowColBasedOn(cxWindow *pParentWindow, eHPosition pPosition, const std::string &pTitle, const std::string &pStatus, const std::string &pMessage, int &pRow, int &pCol)
Figures out how to align text based on a title & message.
Definition cxWindow.cpp:5173
void setHorizStatusAlignment(eHPosition pHAlignment)
Sets the horizontal alignment of the status text.
Definition cxWindow.cpp:1204
std::map< std::pair< int, int >, attr_t > mSpecialCharAttrs
Attributes for the "special" characters (which are added to.
Definition cxWindow.h:2650
virtual void removeTitleString(int pHPos)
Removes a title string at a given horizontal position.
Definition cxWindow.cpp:3154
virtual void removeAttr(e_WidgetItems pItem, attr_t pAttr)
Removes an ncurses attribute from one of the item lists.
Definition cxWindow.cpp:4300
virtual void setAttr(e_WidgetItems pItem, attr_t pAttr)
Sets the ncurses attribute to use for one of the items in the.
Definition cxWindow.cpp:4259
bool getLeaveNow() const
Returns whether or not something told the window to leave now.
Definition cxWindow.cpp:3788
virtual std::string cxTypeStr() const override
Returns the name of the cxWidgets class. This is overridden.
Definition cxWindow.cpp:3783
virtual int right() const
Returns the right column of the window.
Definition cxWindow.cpp:1950
virtual void removeSpecialChar(int pY, int pX)
Removes a character from the set of special characters (by.
Definition cxWindow.cpp:4071
virtual bool lastKeyWasMouseEvt() const
Returns whether or not the last keypress was a mouse event.
Definition cxWindow.cpp:2340
std::set< attr_t > mStatusAttrs
Status attributes.
Definition cxWindow.h:2635
virtual bool isOnTop() const
Returns whether the window is on top of all other windows.
Definition cxWindow.cpp:1705
virtual void writeText(int pRow, int pCol, const std::string &pText, bool pRefresh=true)
Writes text on the window. Note that the text is not permanant, so.
Definition cxWindow.cpp:2248
virtual void bringToBottom(bool pRefresh=false)
Puts the window on the bottom of all other windows.
Definition cxWindow.cpp:1695
virtual bool hasAttr(e_WidgetItems pItem, attr_t pAttr)
Returns whether an attribute is set for a widget item.
Definition cxWindow.cpp:3774
std::map< std::pair< int, int >, chtype > mSpecialChars
Contains "special" characters which are added to the window.
Definition cxWindow.h:2622
std::set< attr_t > mTitleAttrs
Title attributes.
Definition cxWindow.h:2631
std::map< int, std::shared_ptr< cxFunction > >::iterator keyFunctions_end()
Returns an end iterator to the map of cxFunction pointers.
Definition cxWindow.cpp:4194
virtual void resize(int pNewHeight, int pNewWidth, bool pRefresh=true)
Changes the window's width and height. The window's upper-left.
Definition cxWindow.cpp:4415
bool getHotkeyHighlighting() const
Returns whether hotkey attributes are used when writing the message.
Definition cxWindow.cpp:2283
virtual void centerVert(bool pRefresh=true)
Centers the window vertically on the screen.
Definition cxWindow.cpp:856
virtual void addSubwindow(cxWindow *pSubWindow)
Adds a subwindow to the window. Subwindows of a.
Definition cxWindow.cpp:4873
void setFocusFunctions(const cxWindow &pWindow)
Re-sets the onFocus and onLeave functions from another.
Definition cxWindow.cpp:5973
virtual void clearKeyFunctionByPtr(funcPtr4 pFunction)
Removes a keypress function pointer.
Definition cxWindow.cpp:2783
cxWindow(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_SINGLE_LINE, cxWindow *pExtTitleWindow=nullptr, cxWindow *pExtStatusWindow=nullptr, bool pHotkeyHighlighting=false)
Default constructor.
virtual void clearKeyFunction(int pKey)
Removes a function pointer for a keypress so that it will no.
Definition cxWindow.cpp:2749
virtual void mouseButton1Click(int pY, int pX)
Tells the window that mouse button 1 was clicked at a certain.
Definition cxWindow.cpp:3979
virtual bool hasExitKey(int pKey) const
Returns whether or not a key exists in the.
Definition cxWindow.cpp:3328
virtual int left() const
Returns the left column of the window.
Definition cxWindow.cpp:1935
cxWindow(cxWindow *pParentWindow, int pRow, int pCol, const std::string &pTitle, const std::string &pMessage, const std::string &pStatus, cxWindow *pExtTitleWindow=nullptr, cxWindow *pExtStatusWindow=nullptr, bool pHotkeyHighlighting=false)
Overloaded constructor.
virtual void addMessageLinesAbove(const std::deque< std::string > &pLines)
Adds lines to the message above the current message text.
std::map< int, std::shared_ptr< cxFunction > >::iterator keyFunctions_begin()
Returns a begin iterator to the map of cxFunction pointers.
Definition cxWindow.cpp:4189
eHPosition mHorizTitleAlignment
Definition cxWindow.h:2658
eHPosition getHorizStatusAlignment() const
Accessor for the horizontal status text alignment.
Definition cxWindow.cpp:1216
virtual void setShowSubwinsForward(bool pShowSubwinsForward)
Toggles the order in which subwindows will be shown.
Definition cxWindow.cpp:3066
virtual void addMessageLinesBelow(const std::deque< std::string > &pLines)
Adds lines to the message below the current message text.
short mBorderColorPair
Definition cxWindow.h:2656
virtual void setOnLeaveFunction(const std::shared_ptr< cxFunction > &pFunction)
Sets the window's "on leave" function.
Definition cxWindow.cpp:2420
virtual void setMessageLines(const std::list< std::string > &pLines)
Sets the message lines in the window.
virtual std::string getExitKeyListString() const
Returns a string containing a comma-separated list of the.
Definition cxWindow.cpp:3410
bool titleWillDraw() const
Returns whether the title will draw or not.
Definition cxWindow.cpp:3453
virtual std::string getStatusString(int pHPos) const
Returns the status string set at a given horizontal position.
Definition cxWindow.cpp:3203
virtual bool pointIsInTitle(int pY, int pX) const
Returns whether a screen location is in the title of the window.
Definition cxWindow.cpp:1997
virtual std::string getTitle() const
Accessor for title text - Returns the first string in the.
Definition cxWindow.cpp:907
virtual std::map< int, std::string > getTitleStrings() const
Returns the map of title strings for the window.
Definition cxWindow.cpp:3131
virtual bool hasQuitKey(int pKey) const
Returns whether or not a key exists in the.
Definition cxWindow.cpp:3333
virtual std::string getTitleString(int pHPos) const
Returns the title string set at a given horizontal position.
Definition cxWindow.cpp:3115
cxWindow & operator=(const cxWindow &pThatWindow)
Assignment operator.
Definition cxWindow.cpp:2237
virtual bool isOnBottom() const
Returns whether the window is on the bottom of all other windows.
Definition cxWindow.cpp:1713
virtual void getStatusStrings(std::map< int, std::string > &pStatusStrings) const
Returns the map of status strings for the window (using an.
cxWindow(cxWindow *pParentWindow, const std::string &pMessage, const std::string &pStatus, int pHeight, int pWidth, cxWindow *pExtTitleWindow=nullptr, cxWindow *pExtStatusWindow=nullptr, bool pHotkeyHighlighting=false)
Overloaded constructor - Centers the window in the middle of the screen.
cxWindowPtrContainer::const_reverse_iterator subWindows_rend() const
Returns a const reverse end iterator for the subwindow collection.
Definition cxWindow.cpp:6183
virtual void mouseButton2Click(int pY, int pX)
Tells the window that mouse button 2 was clicked at a certain.
Definition cxWindow.cpp:3988
void setHorizMessageAlignment(eHPosition pHAlignment)
Sets the horizontal alignment of the message text.
Definition cxWindow.cpp:1193
bool mouseButton3Clicked() const
Returns whether or not the second mouse button was clicked.
Definition cxWindow.cpp:3968
void setExtTitleWindow(cxWindow *pWindow, bool pRefreshTitle=true)
Sets an external cxWindow object to be used for the title, rather.
Definition cxWindow.cpp:1241
bool mouseButton1Clicked() const
Returns whether or not the first mouse button was clicked.
Definition cxWindow.cpp:3924
cxWindowPtrContainer::const_reverse_iterator subWindows_rbegin() const
Returns a const reverse begin iterator for the subwindow collection.
Definition cxWindow.cpp:6178
virtual void setStatusColor(e_cxColors pColor)
Sets the color of the status line at bottom of window.
Definition cxWindow.cpp:3724
virtual void enableAttrs(WINDOW *pWin, e_WidgetItems pItem)
Enables the attributes for one of the m*Attrs sets for an ncurses window.
Definition cxWindow.cpp:4917
virtual bool getExitOnMouseOutside() const
Returns whether the window exits its modal input loop when.
Definition cxWindow.cpp:2313
cxWindow(cxWindow *pParentWindow, const std::string &pTitle, const std::string &pMessage, const std::string &pStatus, cxWindow *pExtTitleWindow=nullptr, cxWindow *pExtStatusWindow=nullptr, bool pHotkeyHighlighting=false)
Overloaded constructor - Centers the window in the middle of the screen.
void setSubWinMessage(const std::string &pTitle, const std::string &pMessage)
Sets the message of one of the subwindows (by title).
virtual int centerCol() const
Returns the center column of the window.
Definition cxWindow.cpp:1944
bool mDrawTitle
Definition cxWindow.h:2664
virtual void setTitleColor(e_cxColors pColor)
Sets the title color.
Definition cxWindow.cpp:3714
virtual bool modalGetsKeypress() const
Returns whether or not a call to showModal() will wait for a.
Definition cxWindow.cpp:1624
virtual long show(bool pBringToTop=false, bool pShowSubwindows=true)
Shows the window.
Definition cxWindow.cpp:1386
virtual bool runOnLeaveFunction(std::string *pFunctionRetval=nullptr)
Runs the onLeave function, if it's set. However, if the last.
Definition cxWindow.cpp:2487
virtual void addMessageLinesAbove(const std::list< std::string > &pLines)
Adds lines to the message above the current message text.
virtual void setMessage(const std::string &pMessage)
Sets the text that appears within the window.
Definition cxWindow.cpp:1058
virtual void drawSpecialChars()
Writes the set of "special" characters to the window.
Definition cxWindow.cpp:3657
virtual void setStatus(const std::string &pStatus, bool pRefreshStatus=true)
Mutator for the status line text.
Definition cxWindow.cpp:994
virtual void mouseButton3Click(int pY, int pX)
Tells the window that mouse button 3 was clicked at a certain.
Definition cxWindow.cpp:3997
cxWindow * getExtTitleWindow() const
Accessor for the external title window pointer.
Definition cxWindow.cpp:1305
virtual void clearMouseFunctions()
Clears the list of external functions fired by mouse events.
Definition cxWindow.cpp:3046
std::shared_ptr< cxFunction2 > getKeyFunctionAsFunction2(int pKey) const
Returns a cxFunction pointer for a key, casted to a cxFunction2.
Definition cxWindow.cpp:3862
virtual void setLastKey(int pLastKey)
Sets the last keypress.
Definition cxWindow.cpp:2328
virtual void clearKeyFunctions()
Clears the list of external functions fired by hotkeys.
Definition cxWindow.cpp:2873
bool isHidden() const
Returns whether or not the window is hidden.
Definition cxWindow.cpp:1380
virtual void bringToTop(bool pRefresh=true)
Brings the window to the top.
Definition cxWindow.cpp:1685
std::shared_ptr< cxFunction > mOnFocusFunction
Definition cxWindow.h:2668
virtual bool addExitKey(int pKey, bool pRunOnLeaveFunction=true, bool pOverride=false)
Adds a key that will cause the window to quit its input loop.
Definition cxWindow.cpp:3298
virtual bool handleFunctionForLastKey(bool *pFunctionExists=nullptr, bool *pRunOnLeaveFunction=nullptr)
Looks for a function tied to the last keypress and.
Definition cxWindow.cpp:5272
bool parentIsCxNotebook() const
Returns whether or not the parent window, if there is one, is.
Definition cxWindow.cpp:6156
void setVerticalMessageAlignment(eVPosition pVAlignment)
Sets the vertical alignment of the message text.
Definition cxWindow.cpp:1231
void setSubWinMessage(unsigned pIndex, const std::string &pMessage)
Sets the message of one of the subwindows (by index).
virtual void removeQuitKeys()
Removes all quit keys.
Definition cxWindow.cpp:3293
virtual void addMessageLinesAbove(const std::vector< std::string > &pLines)
Adds lines to the message above the current message text.
virtual void setBorderStyle(eBorderStyle pBorderStyle)
Sets the border style.
Definition cxWindow.cpp:2022
virtual void quitNow()
This is mainly for deriving classes. This causes the object.
Definition cxWindow.cpp:3347
virtual void getAttrs(e_WidgetItems pItem, std::set< attr_t > &pAttrs) const
Returns the set of ncurses attributes for a given item.
Definition cxWindow.cpp:4380
virtual bool hasMouseFunction(int pMouseState) const
Returns whether an external function exists for a mouse event.
Definition cxWindow.cpp:3052
virtual void toggleBorderRight(bool pToggle)
Sets whether or not to display the right border.
Definition cxWindow.cpp:4058
virtual bool addTitleString(int pHPos, const std::string &pStr, bool pRefreshTitle=false)
Adds/sets a string to appear in the title at.
Definition cxWindow.cpp:3091
virtual void setChangeColorsOnFocus(bool pChangeColorsOnFocus)
Sets whether colors should change when focus.
Definition cxWindow.cpp:2364
virtual void removeSubWindow(const cxWindow *pSubWindow)
Removes a window from the subwindow list.
Definition cxWindow.cpp:4883
bool mouseButton1Pressed() const
Returns whether or not the first mouse button was pressed.
Definition cxWindow.cpp:3902
bool mIsModal
Definition cxWindow.h:2670
virtual std::map< int, bool > getExitKeys() const
Returns the keys that will make the window exit is input.
Definition cxWindow.cpp:3428
std::set< attr_t > mBorderAttrs
Border attributes.
Definition cxWindow.h:2639
virtual void addAttr(e_WidgetItems pItem, attr_t pAttr)
Adds an ncurses attribute to use for one of the items in the.
Definition cxWindow.cpp:4219
virtual std::string getQuitKeyListString() const
Returns a string containing a comma-separated list of the.
Definition cxWindow.cpp:3387
virtual std::map< int, bool > getQuitKeys() const
Returns the keys that will make the window quit its input.
Definition cxWindow.cpp:3423
virtual void setMessageLine(unsigned pIndex, const std::string &pLine)
Modifies one of the lines displayed in the window.
Definition cxWindow.cpp:1158
virtual bool getShowSubwinsForward() const
Returns whether or not the subwindows will be shown.
Definition cxWindow.cpp:3071
std::shared_ptr< cxFunction > getKeyFunction(int pKey) const
Returns a cxFunction pointer for a key.
Definition cxWindow.cpp:3829
void setExtStatusWindow(cxWindow *pWindow, bool pRefreshStatus=true)
Sets an external cxWindow object to be used for status, rather.
Definition cxWindow.cpp:1310
bool mDrawStatus
Definition cxWindow.h:2665
virtual bool onFocusFunctionEnabled() const
Returns whether or not the onFocus function is set to run.
Definition cxWindow.cpp:2551
bool mDrawMessage
Definition cxWindow.h:2663
virtual const std::shared_ptr< cxFunction > & getOnFocusFunction() const
Accessor for the onFocus function.
Definition cxWindow.cpp:2561
virtual void setTitleStrings(const std::map< int, std::string > &pTitleStrings)
Sets all the title strings via a map of horizontal.
Definition cxWindow.cpp:3141
std::set< attr_t > mHotkeyAttrs
Hotkey attributes.
Definition cxWindow.h:2643
virtual void getSize(int &pHeight, int &pWidth)
Returns the height & width of the window.
Definition cxWindow.cpp:2011
virtual int top() const
Returns the top row of the window.
Definition cxWindow.cpp:1914
virtual void removeAllSubwindows()
Removes all subwindow pointers.
Definition cxWindow.cpp:4853
virtual void drawTitle()
Writes the title line.
Definition cxWindow.cpp:3473
void touchWindow()
Marks the window's entire content as dirty so that the next.
Definition cxWindow.h:769
virtual bool isModal() const
Returns whether or not the window is currently.
Definition cxWindow.cpp:2571
virtual void getLastMouseEvtCoords(int &pY, int &pX)
Returns the coordinates of the last mouse event in the window.
Definition cxWindow.cpp:2349
void toggleTitle(bool pDrawTitle)
Sets whether or not to draw the title.
Definition cxWindow.cpp:3438
virtual void getFunctionKeys(std::vector< int > &pKeys) const
Populates a collection with integers representing the keys.
Definition cxWindow.cpp:4209
std::string getName() const
Definition cxWindow.cpp:3793
virtual void disableAttrs(WINDOW *pWin, e_WidgetItems pItem)
Disables the attributes for one of the m*Attrs sets for an ncurses window.
Definition cxWindow.cpp:4974
std::set< attr_t > mMessageAttrs
Message attributes.
Definition cxWindow.h:2627
eHPosition getHorizMessageAlignment() const
Accessor for the horizontal message text alignment.
Definition cxWindow.cpp:1199
virtual void setDisableCursorOnShow(bool pDisableCursorOnShow)
Sets whether the window should disable the cursor.
Definition cxWindow.cpp:2303
virtual int height() const
Returns the height of the window.
Definition cxWindow.cpp:1975
virtual bool isEnabled() const
Returns whether or not the window is enabled.
Definition cxWindow.cpp:2288
virtual void erase(bool pEraseSubwindows=true)
Erases the window.
Definition cxWindow.cpp:1665
virtual void dump(std::string &pResult)
Returns a string containing all the characters.
Definition cxWindow.cpp:2104
virtual void toggleBorderTop(bool pToggle)
Sets whether or not to display the top border.
Definition cxWindow.cpp:4043
std::map< int, bool > mQuitKeys
Definition cxWindow.h:2684
virtual bool moveRelative(int pVerticalOffset, int pHorizOffset, bool pRefresh=true)
Changes the window's position via vertical & horizontal offsets.
Definition cxWindow.cpp:4473
virtual void removeQuitKey(int pKey)
Removes a quit key.
Definition cxWindow.cpp:3288
std::map< int, std::shared_ptr< cxFunction > > mKeyFunctions
Definition cxWindow.h:2676
virtual void setEnabled(bool pEnabled)
Enables or disables the window. If the window is.
Definition cxWindow.cpp:2293
virtual void clearSpecialChars()
Clears the collection of special characters.
Definition cxWindow.cpp:4078
void setHorizTitleAlignment(eHPosition pHAlignment)
Sets the horizontal alignment of the title text.
Definition cxWindow.cpp:1166
short mStatusColorPair
Definition cxWindow.h:2655
virtual bool setKeyFunction(int pKey, const std::shared_ptr< cxFunction > &pFunction)
Sets a function to be called when a key is pressed.
std::shared_ptr< cxFunction > mOnLeaveFunction
Definition cxWindow.h:2669
void toggleMessage(bool pDrawMessage)
Sets whether or not to draw the message area (the area within.
Definition cxWindow.cpp:3433
virtual bool functionExistsForLastMouseState() const
Returns whether an external function pointer exists for the.
Definition cxWindow.cpp:4084
virtual void drawBorder()
Draws a box for the window border.
Definition cxWindow.cpp:1908
virtual void setFocusColors()
Turns on the ncurses attribute A_REVERSE for the window to.
Definition cxWindow.cpp:1636
bool hasBorder() const
Does this window have a border?
Definition cxWindow.cpp:2032
virtual void toggleOnLeaveFunction(bool pRunOnLeave)
Sets whether or not the onLeave function should run.
Definition cxWindow.cpp:2546
virtual void setMessageLines(const std::deque< std::string > &pLines)
Sets the message lines in the window.
virtual long getReturnCode() const
Returns the return code set by the last call to.
Definition cxWindow.cpp:3086
bool parentIsCxPanel() const
Returns whether or not the parent window, if there is one, is.
Definition cxWindow.cpp:6132
virtual bool hasFocus() const
Returns true if window has focus, false otherwise.
Definition cxWindow.cpp:2017
bool onLeaveFunctionIsSet() const
Returns whether or not the onLeave function is set (if.
Definition cxWindow.cpp:6200
std::shared_ptr< cxFunction0 > getKeyFunctionAsFunction0(int pKey) const
Returns a cxFunction pointer for a key, casted to a cxFunction0.
Definition cxWindow.cpp:3842
cxWindow(cxWindow *pParentWindow, const std::string &pTitle, const std::string &pMessage, const std::string &pStatus, int pHeight, int pWidth, cxWindow *pExtTitleWindow=nullptr, cxWindow *pExtStatusWindow=nullptr, bool pHotkeyHighlighting=false)
Overloaded constructor - Centers the window in the middle of the screen.
cxWindow(cxWindow *pParentWindow, eHPosition pHPosition, const std::string &pTitle, const std::string &pMessage, const std::string &pStatus, cxWindow *pExtTitleWindow=nullptr, cxWindow *pExtStatusWindow=nullptr, bool pHotkeyHighlighting=false)
Overloaded constructor - Lets you specify the horizontal position.
virtual void getTitleStrings(std::map< int, std::string > &pTitleStrings) const
Returns the map of title strings for the window (using an.
void toggleStatus(bool pDrawStatus)
Sets whether or not to draw the status line.
Definition cxWindow.cpp:3443
cxWindow(cxWindow *pParentWindow, const std::string &pMessage, cxWindow *pExtTitleWindow=nullptr, cxWindow *pExtStatusWindow=nullptr, bool pHotkeyHighlighting=false)
Overloaded constructor - Centers the window in the middle of the screen.
virtual void reCreatePanel()
Creates mPanel (by calling new_panel()), then sets up.
Definition cxWindow.cpp:5383
virtual void removeMessageLine(unsigned pIndex)
Removes a line from the text inside the window (by index).
Definition cxWindow.cpp:1150
virtual void setElementColor(short &pColorPair, attr_t &pElementAttr, e_cxColors pColor)
Sets the color (and attribute, if necessary) of a color element.
Definition cxWindow.cpp:4902
virtual void center(bool pRefresh=true)
Centers the window on the screen.
Definition cxWindow.cpp:901
eHPosition getHorizTitleAlignment() const
Accessor for the title text alignment.
Definition cxWindow.cpp:1178
virtual void setName(const std::string &pName)
Sets the name of the window. The name is an alternative means.
Definition cxWindow.cpp:3798
void toggleSpecialChars(bool pDrawSpecialChars)
Sets whether or not to draw the "special" characters (these are.
Definition cxWindow.cpp:3463
virtual void copyCxWinStuff(const cxWindow *pThatWindow, bool pRecreateWin=true)
Makes a copy of a cxWindow's member variables.
Definition cxWindow.cpp:5077
bool parentIsCxForm() const
Returns whether or not the parent window, if there is one, is.
Definition cxWindow.cpp:6144
virtual long setFocus(bool pShowSelf=true, bool pBringToTop=true, bool pShowSubwindows=true)
Alias for showModal()
Definition cxWindow.cpp:1631
virtual bool setMouseFunction(int pMouseState, const std::shared_ptr< cxFunction > &pFunction)
Sets a function to be called for a certain mouse state.
virtual bool getDisableCursorOnShow() const
Returns whether or not the window will disable.
Definition cxWindow.cpp:2308
virtual void hide(bool pHideSubwindows=true)
Hides the window.
Definition cxWindow.cpp:1775
virtual void toggleBorderBottom(bool pToggle)
Sets whether or not to display the bottom border.
Definition cxWindow.cpp:4048
eVPosition mVerticalMessageAlignment
Definition cxWindow.h:2661
std::shared_ptr< cxFunction4 > getKeyFunctionAsFunction4(int pKey) const
Returns a cxFunction pointer for a key, casted to a cxFunction4.
Definition cxWindow.cpp:3882
virtual bool move(int pNewRow, int pNewCol, bool pRefresh=true)
Changes the window's position, based on a new upper-left corner.
Definition cxWindow.cpp:4456
virtual void addSpecialChar(int pY, int pX, chtype pChar, attr_t pAttr=A_NORMAL)
Adds a character to be written somewhere in the window. These.
Definition cxWindow.cpp:4063
virtual void toggleOnFocusFunction(bool pRunOnFocus)
Sets whether or not the onFocus function should run.
Definition cxWindow.cpp:2541
virtual void doMouseBehavior()
Triggers the window's mouse event behavior. This method can.
Definition cxWindow.cpp:3825
virtual int centerRow() const
Returns the center row of the window.
Definition cxWindow.cpp:1923
void setParent(cxWindow *pNewParent)
Changes the pointer to the parent window; changes the parent window.
Definition cxWindow.cpp:2043
virtual void alignHoriz(eHPosition pPosition, bool pRefresh=true)
Aligns the window horizontally on the screen.
Definition cxWindow.cpp:816
virtual void setMessageLines(const std::vector< std::string > &pLines)
Sets the message lines in the window.
virtual void toggleBorderLeft(bool pToggle)
Sets whether or not to display the left border.
Definition cxWindow.cpp:4053
virtual void setBorderColor(e_cxColors pColor)
Sets the color of the window border.
Definition cxWindow.cpp:3734
WINDOW * mWindow
Everything in the window is written here; this is an nCurses window structure.
Definition cxWindow.h:2607
virtual void removeExitKey(int pKey)
Removes an exit key.
Definition cxWindow.cpp:3318
unsigned numSubWindows()
Returns the number of subwindows in this window.
Definition cxWindow.cpp:4485
virtual void draw()
Fills the member ncurses window structure with the current.
Definition cxWindow.cpp:5686
virtual void removeStatusString(int pHPos)
Removes a status string at a given horizontal position.
Definition cxWindow.cpp:3242
virtual ~cxWindow()
Definition cxWindow.cpp:706
virtual bool isAbove(const cxWindow &pThatWindow) const
Returns whether the window is above another window.
Definition cxWindow.cpp:1721
virtual void alignVert(eVPosition pPosition, bool pRefresh=true)
Aligns the window vertically on the screen.
Definition cxWindow.cpp:861
eHPosition mHorizMessageAlignment
Definition cxWindow.h:2659
std::string getStatus() const
Accessor for the status line text.
Definition cxWindow.cpp:976
virtual void setColor(e_WidgetItems pItem, e_cxColors pColor)
Sets the color of one of the window items.
Definition cxWindow.cpp:3744
virtual void clear(bool pRefresh=false)
Clears the text from the window.
Definition cxWindow.cpp:3338
virtual void removeExitKeys()
Removes all exit keys.
Definition cxWindow.cpp:3323
int getMouseState() const
Returns the current mouse state as it was last captured by the.
Definition cxWindow.cpp:4093
virtual void setOnFocusFunction(const std::shared_ptr< cxFunction > &pFunction)
Sets the window's "on focus" function.
Definition cxWindow.cpp:2369
virtual bool hasKeyFunction(int pKey) const
Returns whether an external function exists for a keypress.
Definition cxWindow.cpp:2908
bool specialCharsWillDraw() const
Returns whether the "special" characters will be drawn or.
Definition cxWindow.cpp:3468
bool messageWillDraw() const
Returns whether the message will draw or not.
Definition cxWindow.cpp:3448
bool mouseButton2DoubleClicked() const
Returns whether or not the second mouse button was double-clicked.
Definition cxWindow.cpp:3957
virtual void setMessageColor(e_cxColors pColor)
Returns the message color.
Definition cxWindow.cpp:3704
virtual void setShowSelfBeforeSubwins(bool pShowSelfBeforeSubwins)
Sets whether the window will show itself before.
Definition cxWindow.cpp:3076
void info()
Display information about a window (for debugging/testing)
Definition cxWindow.cpp:4018
virtual long showModal(bool pShowSelf=true, bool pBringToTop=true, bool pShowSubwindows=true)
Shows the window and waits for input.
Definition cxWindow.cpp:1442
short mMessageColorPair
Definition cxWindow.h:2653
eHPosition mHorizStatusAlignment
Definition cxWindow.h:2660
eBorderStyle getBorderStyle() const
Returns the border style.
Definition cxWindow.cpp:2027
virtual void removeAttrs(e_WidgetItems pItem)
Removes all attributes for a given window item.
Definition cxWindow.cpp:4340
virtual void showSubwindows(bool pBringToTop=true, bool pShowSubwindows=true)
Shows the subwindows for the window.
Definition cxWindow.cpp:2215
bool mDrawSpecialChars
Definition cxWindow.h:2666
virtual void removeTitleStrings()
Removes all title strings.
Definition cxWindow.cpp:3170
cxWindow * getExtStatusWindow() const
Accessor for the external status window pointer.
Definition cxWindow.cpp:1375
virtual bool isBelow(const cxWindow &pThatWindow) const
Returns whether a window is below another window.
Definition cxWindow.cpp:1748
virtual bool runOnFocusFunction(std::string *pFunctionRetval=nullptr)
Runs the onFocus function, if it's set.
Definition cxWindow.cpp:2467
short mTitleColorPair
Definition cxWindow.h:2654
virtual void unhide(bool pUnhideSubwindows=true)
Un-hides the window.
Definition cxWindow.cpp:1796
virtual int getLastKey() const
Returns the last key pressed by the user (for showModal(), etc.)
Definition cxWindow.cpp:2323
virtual void drawStatus()
Writes the status line.
Definition cxWindow.cpp:3495
virtual void writeWithHighlighting(WINDOW *pWindow, const std::string &pText, const int &pY, const int &pStartX, const int &pEndX, int pNormalTextItem=-1)
Writes text to an ncurses WINDOW, highlighting any characters.
Definition cxWindow.cpp:5027
virtual bool getChangeColorsOnFocus() const
Returns whether the window will change.
Definition cxWindow.cpp:2359
bool mouseEvtWasInWindow() const
Returns whether the current mouse information stored in the.
Definition cxWindow.cpp:3803
bool statusWillDraw() const
Returns whether the status line will draw or not.
Definition cxWindow.cpp:3458
virtual void centerHoriz(bool pRefresh=true)
Centers the window horizontally on the screen.
Definition cxWindow.cpp:811
bool mHotkeyHighlighting
Definition cxWindow.h:2688
virtual bool mouseEvtWasInTitle() const
Returns whether the current mouse information stored in the.
Definition cxWindow.cpp:3812
bool mLeaveNow
Definition cxWindow.h:2673
virtual void addMessageLinesBelow(const std::vector< std::string > &pLines)
Adds lines to the message below the current message text.
#define NOKEY
Definition cxKeyDefines.h:64
#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::deque< std::string > messageLineContainer
Definition cxWindow.h:71
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
eVPosition
Definition cxPositions.h:26
@ eVP_TOP
Definition cxPositions.h:28
eBorderStyle
Definition cxBorderStyles.h:26
@ eBS_SINGLE_LINE
Definition cxBorderStyles.h:28
@ cxID_EXIT
Definition cxReturnCodes.h:30
std::vector< cxWindow * > cxWindowPtrContainer
Definition cxWindow.h:40
eHPosition
Definition cxPositions.h:16
@ eHP_LEFT
Definition cxPositions.h:18
e_cxColors
Definition cxColors.h:46
@ eBROWN_BLUE
Definition cxColors.h:91
@ eWHITE_BLUE
Definition cxColors.h:100
@ eGRAY_BLUE
Definition cxColors.h:99