|
cxWidgets 1.0
|
cxBorderChars.h - Defines border characters to be used in drawing a box (i.e., in cxWindow and all its derivitives) More...
Classes | |
| class | cxApp |
| Holds application setup & exit logic, as well as the application's main frame. More... | |
| struct | cxBorderChars |
| class | cxButton |
| class | cxComboBox |
| A text box that also has a drop-down box with a list of items that the user can choose from. More... | |
| class | cxDate |
| Enables easy management of dates. C++17-enhanced version of the original 'date' class. More... | |
| class | cxDatePicker |
| This is a dialog that displays a calendar, allowing the user to choose a date while viewing a calendar; this dialog also allows the user to navigate through the months and specify different years to view calendars of various months and years. More... | |
| class | cxDialog |
| Represents a dialog window on the screen (i.e., something to be shown. More... | |
| class | cxFileViewer |
| Represents a window that displays a file. While the object is being displayed with showModal(), the user can go to a specific line by pressing CTRL-G (this is the default; it can be changed with setGoToKey()). The user can also search for text with the '/' key (this is the default; it can be changed with setSearchKey()). By default, the previous keyword is used when searching again; this behavior can be changed with useLastKeyword(). Also, cxFileViewer supports page scrolling with the pageUp and pageDown keys. In addition, cxMenu also uses alternate keys for doing a pageUp and pageDown, which by default are '.' and ',', respectively. These defaults can be changed via setAltPgUpKey() and setAltPgDownKey(). More... | |
| class | cxForm |
| Represents a form that contains text inputs. The user can move forward between the inputs on the form using the TAB and down arrow, and backward using SHIFT-TAB or the up arrow. The tab order is is based on the order in which the inputs are appended to the form. The input indexes also match the order in which the inputs are appended to the form, and they are zero-based. It is a good idea to use unique labels for the inputs or unique names, since many of cxForm's methods access the fields the fields by label/name; in particular, getValues() populates a map of field labels/names and values, and if there are duplicate labels or names, it would not return the values of all the fields on the form. The function getInput() can be used to get a pointer to one of the inputs, but one caveat of cxForm is that some operations shouldn't be performed on inputs added to a cxForm: More... | |
| class | cxFrame |
| Similar to wxFrame and other frame classes in GUI frameworks, this. More... | |
| class | cxFunction |
| Base class for cxFunction2 and cxFunction4. This class is pure. More... | |
| class | cxFunction0 |
| A more intelligent function pointer, which can run a. More... | |
| class | cxFunction1RefTemplated |
| This class is a cxFunction that is templated to take a reference of a specific type. More... | |
| class | cxFunction2 |
| A more intelligent function pointer, which can run a function with. More... | |
| class | cxFunction2RefTemplated |
| This class is a cxFunction that is templated to take 2 references of specific types. More... | |
| class | cxFunction2Templated |
| This class is a cxFunction that is templated to take 2 pointers of specific types. More... | |
| class | cxFunction3RefTemplated |
| This class is a cxFunction that is templated to take 2 references of specific types. More... | |
| class | cxFunction4 |
| This class is just like cxFunction2, but for functions. More... | |
| class | cxFunction4RefTemplated |
| This class is a cxFunction that is templated to take 4 references of specific types. More... | |
| class | cxFunction4Templated |
| This class is a cxFunction that is templated to take 4 pointers of specific types. More... | |
| class | cxGrid |
| This is a class representing a grid of data, similar to a spreadsheet, with rows & columns of cells where data can be entered. More... | |
| class | cxInput |
| Represents a single-line input box with a label. This class. More... | |
| class | cxLabel |
| This is a class for displaying a read-only label. More... | |
| class | cxMenu |
| Represents a list of items, one of which may be selected. More... | |
| class | cxMenuBar |
| This is a menu bar class, designed for displaying a horizontal. More... | |
| class | cxMessageDialog |
| Represents a dialog box with "OK" and/or "Cancel". More... | |
| class | cxMultiForm |
| Represents a form that can. More... | |
| class | cxMultiLineInput |
| This class represents an input box that can have a height. More... | |
| class | cxNotebook |
| This class represents a notebook control, which manages multiple. More... | |
| class | cxObject |
| The base class for windowing classes in the cxWidgets. More... | |
| class | cxOpenFileDialog |
| This is a dialog class that is designed to allow the user to choose a filename in a specific directory, with a directory browser. This class is designed to be similar to file choosers in GUI libraries, such as OpenFileDialog in .NET Core 8, QtFileDilog in Qt, etc. More... | |
| class | cxPanel |
| cxPanel is a window that contains other windows. When showModal() More... | |
| class | cxScrolledWindow |
| Represents a text window with scrolling. This class is. More... | |
| class | cxSearchPanel |
| This class is based on cxPanel, and it contains a cxForm at the top. More... | |
| class | cxTextValidator |
| Provides some text validation functionality. See README.txt for. More... | |
| class | cxTimer |
| Represents a timer that will run a function after. More... | |
| class | cxWidgetsException |
| Represents an exception in cxWidgets. More... | |
| class | cxWindow |
| Represents a text-based window on the screen. Can contain a title, status, and a message to appear within the window. A cxWindow can have a border or be borderless. A cxWindow may also have a parent and may also have subwindows. When setting up a cxWindow to have a parent, it will tell the parent to also add the window as one of its subwindows. Also, when a cxWindow is destroyed, it will be removed from its parent's subwindow list (if it has a parent); additionally, when a cxWindow is destroyed, it will orphan all of its subwindows (so they have no parent). Note to authors deriving from cxWindow or a cxWindow-based class: In the destructor, if you do anything that would affect the screen, you should first check to see if cxWidgets is initialized (via a call to cxBase::cxInitialized()), or else the application may segfault. This might happen if someone writes a simple program using cxWidgets objects in their main() method. In that situation, cxBase::cleanup() would get called before the cxWidgets object destructors get called when the objects go out of scope. The parent/child cxWindow relationship has the following effects: More... | |
| class | floatingPtInputWithRightLabel |
Typedefs | |
| typedef std::pair< std::shared_ptr< cxMultiLineInput >, std::shared_ptr< cxMultiLineInput > > | cxMLInputPtrPair |
| typedef std::pair< std::shared_ptr< cxComboBox >, std::shared_ptr< cxComboBox > > | cxComboBoxPtrPair |
| typedef std::string(* | funcPtr0) () |
| typedef std::string(* | funcPtr2) (void *p1, void *p2) |
| typedef std::string(* | funcPtr4) (void *p1, void *p2, void *p3, void *p4) |
| typedef std::vector< std::string > | stringContainer |
| typedef std::vector< std::string >::iterator | stringContainerIterator |
| typedef std::vector< cxWindow * > | cxWindowPtrContainer |
| typedef std::deque< std::string > | messageLineContainer |
Functions | |
| string | eBorderStyleToStr (eBorderStyle borderStyle) |
| Converts an eBorderStyle value to a string representation. | |
| ostream & | operator<< (ostream &pOS, const cxDate &pDate) |
| istream & | operator>> (istream &pIS, cxDate &pDate) |
| void | init (bool pEnableMouse=true) |
| Initializes the cxWidgets library. This must be called before. | |
| void | cleanup () |
| Cleans up the cxWidgets library. Must be called after all. | |
| int | top () |
| Returns the top row # of the main screen. | |
| int | centerRow () |
| Returns the center row # of the main screen. | |
| int | bottom () |
| Returns the bottom row # of the main screen. | |
| int | left () |
| Returns the leftmost column # of the main screen. | |
| int | centerCol () |
| Returns the center column # of the main screen. | |
| int | right () |
| Returns the rightmost column # of the main screen. | |
| int | width () |
| Returns the width of the main screen. | |
| int | height () |
| Returns the height of the main screen. | |
| void | getTermDimensions (int &pHeight, int &pWidth) |
| Returns the terminal's current height & width. | |
| bool | resizeTerm (int pNewHeight, int pNewWidth) |
| Resizes the terminal screen. | |
| e_cxColors | getDefaultMessageColor () |
| Returns the default message color. | |
| void | setDefaultMessageColor (e_cxColors pColor) |
| Sets the default message color. | |
| e_cxColors | getDefaultTitleColor () |
| Returns the default title color. | |
| void | setDefaultTitleColor (e_cxColors pColor) |
| Sets the default title color. | |
| e_cxColors | getDefaultStatusColor () |
| Returns the default status color. | |
| void | setDefaultStatusColor (e_cxColors pColor) |
| Sets the default status color. | |
| e_cxColors | getDefaultBorderColor () |
| Returns the default border color. | |
| void | setDefaultBorderColor (e_cxColors pColor) |
| Sets the default border color. | |
| void | messageBox (int pRow, int pCol, int pHeight, int pWidth, const std::string &pTitle, const std::string &pMessage, const std::string &pStatus="", eBorderStyle pBorderStyle=eBS_SINGLE_LINE) |
| Shows a message box. | |
| void | messageBox (int pRow, int pCol, const std::string &pTitle, const std::string &pMessage, const std::string &pStatus) |
| Shows a message box automatically setting its height & width. | |
| void | messageBox (int pRow, int pCol, const std::string &pMessage) |
| Shows a message box, automatically setting its height & width. | |
| void | messageBox (const std::string &pTitle, const std::string &pMessage, const std::string &pStatus="") |
| void | messageBox (const std::string &pTitle, const std::string &pMessage, const std::string &pStatus, int pHeight, int pWidth) |
| Shows a message box. | |
| void | messageBox (const std::string &pMessage, const std::string &pStatus, int pHeight, int pWidth) |
| Shows a message box. | |
| void | messageBox (const std::string &pMessage, e_cxColors pMessageColor=getDefaultMessageColor(), attr_t pMessageAttr=A_NORMAL, e_cxColors pTitleColor=getDefaultTitleColor(), e_cxColors pStatusColor=getDefaultStatusColor(), e_cxColors pBorderColor=getDefaultBorderColor()) |
| Shows a message box. | |
| void | messageDialog (const std::string &pMessage) |
| Shows a message dialog (a message box with an OK button) | |
| void | messageDialog (const std::list< std::string > &pMessages) |
| Shows a message dialog (a message box with an OK button) | |
| void | splash (const std::string &pTitle, const std::string &pMessage, int pSleep) |
| Shows a splash message. | |
| void | splash (const std::string &pMessage, int pSleep) |
| Shows a splash message. | |
| void | eraseScreen () |
| Erases the screen. | |
| void | updateWindows () |
| Updates (refreshes) all windows on the screen. | |
| bool | isFunctionKey (int pKey) |
| Returns whether a key is a function key, pageDown, or pageUp (these keys are tested by cxInput and cxMultiLineInput in their input loops). | |
| bool | toggleCursor (bool pToggleCursor) |
| Enables or disables the display of the cursor. | |
| std::string | getTermType () |
| Returns a string representing the terminal type. This is the. | |
| bool | colorIsBright (e_cxColors pColor) |
| Returns whether a color has the brightness bit set. | |
| int | countHotkeys (const std::string &pStr) |
| Counts the number of hotkeys in a string. This is useful when working with cxMenu, which can contain items with hotkeys. | |
| std::string | stringWithoutHotkeyChars (const std::string &pStr) |
| Takes a string and returns a version without the & characters. | |
| unsigned | visualStrLen (const std::string &pStr) |
| Returns the length of a string without its hotkey characters -. | |
| std::string | bringToTop (void *theWindow, void *unused) |
| Brings a cxWindow to the top of the stack. Doesn't refresh. | |
| std::string | cxFormShowModal (void *theForm, void *unused) |
| Runs showModal() on a cxForm and returns the result. This. | |
| std::string | cxMenuShowModal (void *theMenu, void *unused) |
| Runs showModal() on a cxMenu and returns the result. This. | |
| std::string | noOp (void *p1, void *p2) |
| Does nothing. Can be used, for example, as an event function. | |
| std::string | noOp (void *p1, void *p2, void *p3, void *p4) |
| Does nothing. Can be used, for example, as an event function. | |
| int | runSystemCmd (const std::string &pCmd) |
| Runs a command on the system, calling the system() function. | |
| void | writeText (int pRow, int pCol, const std::string &pText, attr_t pAttr=A_NORMAL, e_cxColors pColor=eGRAY_BLACK) |
| Writes text on the screen. | |
| void | getHotkeyChars (const std::string &pStr, std::set< char > &pHotkeys, bool pConvertCase=false, bool pToUpper=false) |
| Scans a string for hotkeys (characters preceeded by an ampersand) | |
| void | showAllWindows (bool pBringToTop=false) |
| Shows all windows currently in use everywhere, from the. | |
| cxWindow * | getTopWindow () |
| Gets a pointer to the topmost cxWindow on the stack. This could. | |
| cxWindow * | getBottomWindow () |
| Gets a pointer to the bottom-most cxWindow on the stack. This could. | |
| std::string | getKeyStr (int pKey) |
| Returns a string version of a key. | |
| std::string | getMouseStateStr (int pMouseState) |
| Returns a string version of a mouse state. | |
| std::string | getReturnCodeStr (long pReturnCode) |
| Returns a string version of a return code. | |
| std::string | getInputOptionStr (eInputOptions pInputOption) |
| Returns a string version of a value from the eInputOptions. | |
| std::string | getBorderStyleStr (eBorderStyle pBorderStyle) |
| Returns a string version of an eBorderStyle value. | |
| std::string | getInputTypeStr (eInputTypes pInputType) |
| Returns a string version of an eInputType value. | |
| void | signalHandler (int pSignal) |
| Handler for system signals. | |
| bool | promptYesNo (const std::string &pMessage, const std::string &pTitle="", long pButtons=cxYES_NO) |
| Prompts the user with a cxMessageDialog for a yes/no choice. | |
| bool | cxInitialized () |
| Returns whether or not cxWidgets has been initialized. | |
| void | addAttr (e_WidgetItems pItem, attr_t pAttr) |
| Adds an ncurses attribute to use for one of the items in the. | |
| void | setAttr (e_WidgetItems pItem, attr_t pAttr) |
| Sets the ncurses attribute to use for one of the items in the. | |
| void | removeAttr (e_WidgetItems pItem, attr_t pAttr) |
| Removes an ncurses attribute from one of the item lists. | |
| void | removeAttrs (e_WidgetItems pItem) |
| Removes all attributes for a given window item. | |
| void | getAttrs (e_WidgetItems pItem, std::set< attr_t > &pAttrs) |
| Returns the set of ncurses attributes for a given item. | |
| bool | hasAttr (e_WidgetItems pItem, attr_t pAttr) |
| Determine if the widget has an attribute "set". | |
| void | enableAttrs (WINDOW *pWindow, e_WidgetItems pItem) |
| Enables all of a set of attributes for a given item type on an. | |
| void | disableAttrs (WINDOW *pWindow, e_WidgetItems pItem) |
| Disables all of a set of attributes for a given item type on an. | |
| attr_t | getAttr (const std::string &pAttr) |
| Figure out the appropriate ncurses attr_t from a "string". | |
| std::string | getAttrStr (attr_t pAttr) |
| Returns a string version of an ncurses attribute. | |
| std::string | getWidgetItemStr (e_WidgetItems pItem) |
| Returns a string version of an e_WidgetItems value. | |
| void | setMenuClearKeywordKey (int pKey) |
| Sets the key that should be used to clear the "Keyword" input. | |
| int | getMenuClearKeywordKey () |
| Returns the key that is set to clear the "Keyword" input for. | |
| std::string | dump (bool pFancy=false, const std::string &pFilename="") |
| dump the contents to the screen to a file | |
| bool | isNavKey (int pKey) |
| Returns whether a key is a navigational key, according to. | |
| void | addNavKey (int pKey) |
| Add a key to be considered a "navigational" key. The key will. | |
| void | removeNavKey (int pKey) |
| Removes a key from cx's list of "navigational" keys. | |
| std::string | getString (int pRow, int pCol, int pNumber, WINDOW *pWin=nullptr) |
| Get the contents of the screen (for debugging/testing) | |
| bool | findString (const std::string &pSearch, int &pRow, int &pCol, WINDOW *pWin=nullptr) |
| Look for a string on the screen (for debugging/testing) | |
cxBorderChars.h - Defines border characters to be used in drawing a box (i.e., in cxWindow and all its derivitives)
Contains some miscellaneous cxWidgets helper functions.
cxBorderStyles.h - defines border styles used by cxWindow and all its derivitives.
Copyright (C) 2026 Eric N. Oulashin
Date User Description
Copyright (C) 2007 Michael H. Kinney
Date User Description
| typedef std::pair<std::shared_ptr<cxComboBox>, std::shared_ptr<cxComboBox> > cx::cxComboBoxPtrPair |
| typedef std::pair<std::shared_ptr<cxMultiLineInput>, std::shared_ptr<cxMultiLineInput> > cx::cxMLInputPtrPair |
| typedef std::vector<cxWindow*> cx::cxWindowPtrContainer |
| typedef std::string(* cx::funcPtr0) () |
| typedef std::string(* cx::funcPtr2) (void *p1, void *p2) |
| typedef std::string(* cx::funcPtr4) (void *p1, void *p2, void *p3, void *p4) |
| typedef std::deque<std::string> cx::messageLineContainer |
| typedef std::vector<std::string> cx::stringContainer |
| typedef std::vector<std::string>::iterator cx::stringContainerIterator |
| enum cx::cxMenuItemType |
| enum cx::e_cxColors |
These are the color definitions used in cxWidgets.
| enum cx::e_WidgetItems |
| enum cx::eBorderStyle |
Defines border styles used by cxWindow and its derivitives: eBS_NOBORDER: This signifies windows without a border eBS_SINGLE_LINE: This signifies a single-line border
| Enumerator | |
|---|---|
| eBS_NOBORDER | |
| eBS_SINGLE_LINE | |
| eBS_DOUBLE_LINE | |
| eBS_DOUBLE_TOP_SINGLE_SIDES | |
| eBS_SINGLE_TOP_DOUBLE_SIDES | |
| eBS_SPACE | |
| enum cx::eDateFormats |
| enum cx::eHPosition |
| enum cx::eInputErrors |
| enum cx::eInputOptions |
| enum cx::eInputType |
| enum cx::eInputTypes |
| enum cx::eMLIF |
| enum cx::eReturnCode |
Defines return codes used in various windows: cxID_OK: This is returned from modal dialog boxes when the user selects "OK" or "Yes". cxID_CANCEL: This is returned from modal dialog boxes when the user selects "Cancel" or "No". cxID_EXIT: This is returned from modal windows when the user completes the input successfully. cxID_QUIT: This is returned from modal windows when the user chooses to exit the window without doing anything. cxFIRST_AVAIL_RETURN_CODE: When using cxMenu or other windows that need return codes, this is the first return code you should use.
| Enumerator | |
|---|---|
| cxID_OK | |
| cxID_CANCEL | |
| cxID_EXIT | |
| cxID_QUIT | |
| cxFIRST_AVAIL_RETURN_CODE | |
| enum cx::eVPosition |
| enum cx::eWeekDays |
| void cx::addAttr | ( | e_WidgetItems | pItem, |
| attr_t | pAttr | ||
| ) |
Adds an ncurses attribute to use for one of the items in the.
window (see the e_WidgetItems enumeration).
| pItem | The item type to add the attribute for (see the e_WidgetItems enumeration). |
| pAttr | The ncurses atribute to add. |
References eBORDER, eDATA, eDATA_EDITABLE, eDATA_READONLY, eHOTKEY, eLABEL, eMENU_SELECTION, eMESSAGE, eSTATUS, eTITLE, mBorderAttrs, mDataEditableAttrs, mDataReadonlyAttrs, mHotkeyAttrs, mLabelAttrs, mMenuSelectionAttrs, mMessageAttrs, mStatusAttrs, and mTitleAttrs.
Referenced by cx::cxWindow::setStatusColor().
| void cx::addNavKey | ( | int | pKey | ) |
Add a key to be considered a "navigational" key. The key will.
be added to cx's set of navigational keys.
| pKey | The key to be added |
References mNavKeys.
| int cx::bottom | ( | ) |
Returns the bottom row # of the main screen.
Referenced by cx::cxWindow::alignVert(), cx::cxMessageDialog::cxMessageDialog(), and cx::cxWindow::info().
| string cx::bringToTop | ( | void * | theWindow, |
| void * | unused | ||
| ) |
Brings a cxWindow to the top of the stack. Doesn't refresh.
its subwindows. This is designed to be used as an event
function in cxWidgets (i.e., for when the user presses a certain
key, etc.).
| theWindow | A pointer to a cxWindow |
| unused | Not used |
References cx::cxWindow::show().
Referenced by cx::cxNotebook::showModal(), and cx::cxPanel::showModal().
| int cx::centerCol | ( | ) |
Returns the center column # of the main screen.
Referenced by cx::cxWindow::alignHoriz(), and cx::cxMessageDialog::cxMessageDialog().
| int cx::centerRow | ( | ) |
Returns the center row # of the main screen.
Referenced by cx::cxWindow::alignVert(), cx::cxWindow::getRowColBasedOn(), and main().
| void cx::cleanup | ( | ) |
Cleans up the cxWidgets library. Must be called after all.
screen-related cxWidgets objects & functions are done being used.
References cxInitialized(), and mInitialized.
Referenced by cxWindowSizeTest(), main(), main(), and SpreadsheetApp::run().
| bool cx::colorIsBright | ( | e_cxColors | pColor | ) |
Returns whether a color has the brightness bit set.
| pColor | The color to test |
References cxCOLOR_BRIGHT.
Referenced by cx::cxWindow::setElementColor().
| int cx::countHotkeys | ( | const std::string & | pStr | ) |
Counts the number of hotkeys in a string. This is useful when working with cxMenu, which can contain items with hotkeys.
| pStr | The string for which to count hotkeys |
| string cx::cxFormShowModal | ( | void * | theForm, |
| void * | unused | ||
| ) |
Runs showModal() on a cxForm and returns the result. This.
function was designed to be used as an event function in
cxWidgets, which is why it returns the value as a string and
takes 2 void pointers.
| theForm | The cxForm to show modally |
| unused | Not used |
References cxID_QUIT, and cx::cxForm::showModal().
| bool cx::cxInitialized | ( | ) |
Returns whether or not cxWidgets has been initialized.
References mInitialized.
Referenced by cleanup(), cxWindowSizeTest(), eraseScreen(), showAllWindows(), updateWindows(), cx::cxForm::~cxForm(), and cx::cxWindow::~cxWindow().
| string cx::cxMenuShowModal | ( | void * | theMenu, |
| void * | unused | ||
| ) |
Runs showModal() on a cxMenu and returns the result. This.
function was designed to be used as an event function in
cxWidgets, which is why it returns the value as a string and
takes 2 void pointers.
| theMenu | The cxMenu to show modally |
| unused | Not used |
References cxID_QUIT, and cx::cxMenu::showModal().
| void cx::disableAttrs | ( | WINDOW * | pWindow, |
| e_WidgetItems | pItem | ||
| ) |
Disables all of a set of attributes for a given item type on an.
ncurses window.
| pWindow | A pointer to the ncurses window for which to disable the attributes. |
| pItem | The item type to retrieve attributes for (see the e_cxWidgetItems enumeration). |
References eBORDER, eDATA, eDATA_EDITABLE, eDATA_READONLY, eHOTKEY, eLABEL, eMENU_SELECTION, eMESSAGE, eSTATUS, eTITLE, mBorderAttrs, mDataEditableAttrs, mDataReadonlyAttrs, mHotkeyAttrs, mLabelAttrs, mMenuSelectionAttrs, mMessageAttrs, mStatusAttrs, and mTitleAttrs.
Referenced by cx::cxWindow::disableAttrs(), cx::cxInput::disableAttrs(), and cx::cxMenu::disableAttrs().
| std::string cx::dump | ( | bool | pFancy = false, |
| const std::string & | pFilename = "" |
||
| ) |
dump the contents to the screen to a file
| pFancy | - print fields that have underlines as underscores '_'. |
| pFilename | to write to |
Referenced by borderlessForm(), and testFormReadOnly().
| std::string cx::eBorderStyleToStr | ( | eBorderStyle | borderStyle | ) |
Converts an eBorderStyle value to a string representation.
| borderStyle | The eBorderStyle value to convert. |
References eBS_DOUBLE_LINE, eBS_DOUBLE_TOP_SINGLE_SIDES, eBS_NOBORDER, eBS_SINGLE_LINE, eBS_SINGLE_TOP_DOUBLE_SIDES, and eBS_SPACE.
Referenced by cxWindowVariousBorderStyles().
| void cx::enableAttrs | ( | WINDOW * | pWindow, |
| e_WidgetItems | pItem | ||
| ) |
Enables all of a set of attributes for a given item type on an.
ncurses window.
| pWindow | A pointer to the ncurses window for which to enable the attributes. |
| pItem | The item type to retrieve attributes for (see the e_cxWidgetItems enumeration). |
References eBORDER, eDATA, eDATA_EDITABLE, eDATA_READONLY, eHOTKEY, eLABEL, eMENU_SELECTION, eMESSAGE, eSTATUS, eTITLE, mBorderAttrs, mDataEditableAttrs, mDataReadonlyAttrs, mHotkeyAttrs, mLabelAttrs, mMenuSelectionAttrs, mMessageAttrs, mStatusAttrs, and mTitleAttrs.
Referenced by cx::cxWindow::enableAttrs(), cx::cxInput::enableAttrs(), and cx::cxMenu::enableAttrs().
| void cx::eraseScreen | ( | ) |
Erases the screen.
References cxInitialized().
| bool cx::findString | ( | const std::string & | pSearch, |
| int & | pRow, | ||
| int & | pCol, | ||
| WINDOW * | pWin = nullptr |
||
| ) |
Look for a string on the screen (for debugging/testing)
| pSearch | string to search for |
| pRow | the row it was found on |
| pCol | the column it was found on |
| pWin | A pointer to an ncurses window structure to get contents from. If this is nullptr, curscr will be used. |
| attr_t cx::getAttr | ( | const std::string & | pAttr | ) |
Figure out the appropriate ncurses attr_t from a "string".
see "man curs_attr"
| pAttr | "NORMAL", "BOLD", etc.. |
Referenced by main().
| void cx::getAttrs | ( | e_WidgetItems | pItem, |
| std::set< attr_t > & | pAttrs | ||
| ) |
Returns the set of ncurses attributes for a given item.
| pItem | The item type to retrieve attributes for (see the e_WidgetItems enumeration). |
| pAttrs | This will contain the attributes for the item. |
Referenced by hasAttr().
| string cx::getAttrStr | ( | attr_t | pAttr | ) |
Returns a string version of an ncurses attribute.
| pAttr | An ncurses attribute |
| string cx::getBorderStyleStr | ( | eBorderStyle | pBorderStyle | ) |
Returns a string version of an eBorderStyle value.
| pBorderStyle | A member of the eBorderStyle enumeration |
References eBS_NOBORDER, eBS_SINGLE_LINE, eBS_SPACE, and cxStringUtils::toString().
| cxWindow * cx::getBottomWindow | ( | ) |
| e_cxColors cx::getDefaultBorderColor | ( | ) |
Returns the default border color.
References mDefaultBorderColor.
Referenced by cx::cxWindow::init().
| e_cxColors cx::getDefaultMessageColor | ( | ) |
Returns the default message color.
References mDefaultMessageColor.
Referenced by cx::cxWindow::init().
| e_cxColors cx::getDefaultStatusColor | ( | ) |
Returns the default status color.
References mDefaultStatusColor.
Referenced by cx::cxWindow::init().
| e_cxColors cx::getDefaultTitleColor | ( | ) |
Returns the default title color.
References mDefaultTitleColor.
Referenced by cx::cxWindow::init().
| void cx::getHotkeyChars | ( | const std::string & | pStr, |
| std::set< char > & | pHotkeys, | ||
| bool | pConvertCase = false, |
||
| bool | pToUpper = false |
||
| ) |
Scans a string for hotkeys (characters preceeded by an ampersand)
and adds the hotkey characters to a collection.
| pStr | The string to scan |
| pHotkeys | The collection to which to add hotkey characters |
| pConvertCase | Whether or not to convert the case of the hotkeys (defaults to false) |
| ptoUpper | If pConvertCase is true, this parameter specifies whether or not to convert the characters to upper case. If true, the characters will be converted to upper-case; if false, they will be converted to lowercase (if pConvertCase is true). |
| string cx::getInputOptionStr | ( | eInputOptions | pInputOption | ) |
Returns a string version of a value from the eInputOptions.
enumeration.
| pInputOption | A member of the eInputOptions enumeration |
References eINPUT_EDITABLE, eINPUT_READONLY, and cxStringUtils::toString().
| string cx::getInputTypeStr | ( | eInputTypes | pInputType | ) |
Returns a string version of an eInputType value.
| pInputType | A member of the eInputType enumeration |
References eINPUT_TYPE_NUMERIC_FLOATING_PT, eINPUT_TYPE_NUMERIC_WHOLE, eINPUT_TYPE_TEXT, and cxStringUtils::toString().
| string cx::getKeyStr | ( | int | pKey | ) |
Returns a string version of a key.
| pKey | The key to convert to a string |
References BACKSPACE, CTRL_F1, CTRL_F10, CTRL_F11, CTRL_F12, CTRL_F2, CTRL_F3, CTRL_F4, CTRL_F5, CTRL_F6, CTRL_F7, CTRL_F8, CTRL_F9, CTRL_G, CTRL_SHIFT_F1, CTRL_SHIFT_F10, CTRL_SHIFT_F11, CTRL_SHIFT_F12, CTRL_SHIFT_F2, CTRL_SHIFT_F3, CTRL_SHIFT_F4, CTRL_SHIFT_F5, CTRL_SHIFT_F6, CTRL_SHIFT_F7, CTRL_SHIFT_F8, CTRL_SHIFT_F9, ENTER, ESC, KEY_END2, KEY_END3, NOKEY, PAGE_DOWN, PAGE_UP, SHIFT_F1, SHIFT_F10, SHIFT_F11, SHIFT_F12, SHIFT_F2, SHIFT_F3, SHIFT_F4, SHIFT_F5, SHIFT_F52, SHIFT_F6, SHIFT_F62, SHIFT_F7, SHIFT_F8, SHIFT_F9, SHIFT_TAB, TAB, and cxStringUtils::toString().
Referenced by cxFormNavKeys(), cx::cxWindow::getExitKeyListString(), cx::cxWindow::getExitKeyStrings(), cx::cxForm::getExtendedHelpKeyStrings(), cx::cxMultiLineInput::getExtendedHelpKeyStrings(), cx::cxWindow::getFunctionKeyStrings(), cx::cxForm::getNavKeyStrings(), cx::cxWindow::getQuitKeyListString(), cx::cxWindow::getQuitKeyStrings(), and main().
| int cx::getMenuClearKeywordKey | ( | ) |
Returns the key that is set to clear the "Keyword" input for.
cxMenu item searching.
References mMenuClearKeywordKey.
| string cx::getMouseStateStr | ( | int | pMouseState | ) |
Returns a string version of a mouse state.
| pMouseState | The mouse state to convert to a string |
References BUTTON1_CLICKED, BUTTON1_DOUBLE_CLICKED, BUTTON1_PRESSED, BUTTON1_RELEASED, BUTTON1_TRIPLE_CLICKED, BUTTON2_CLICKED, BUTTON2_DOUBLE_CLICKED, BUTTON2_PRESSED, BUTTON2_RELEASED, BUTTON2_TRIPLE_CLICKED, BUTTON3_CLICKED, BUTTON3_DOUBLE_CLICKED, BUTTON3_PRESSED, BUTTON3_RELEASED, BUTTON3_TRIPLE_CLICKED, BUTTON4_CLICKED, BUTTON4_DOUBLE_CLICKED, BUTTON4_PRESSED, BUTTON4_RELEASED, BUTTON4_TRIPLE_CLICKED, and cxStringUtils::toString().
Referenced by cx::cxWindow::getMouseStateStr().
| string cx::getReturnCodeStr | ( | long | pReturnCode | ) |
Returns a string version of a return code.
| pReturnCode | The return code to convert to a string |
References cxFIRST_AVAIL_RETURN_CODE, cxID_CANCEL, cxID_EXIT, cxID_OK, cxID_QUIT, and cxStringUtils::toString().
Referenced by cxPanelTest(), cxWindowWithFunctionKeys(), enableDisableForm(), getMenuItemIDStr(), and inputQuitKeysOnForm().
| string cx::getString | ( | int | pRow, |
| int | pCol, | ||
| int | pNumber, | ||
| WINDOW * | pWin = nullptr |
||
| ) |
Get the contents of the screen (for debugging/testing)
| pRow | the starting row |
| pCol | the starting column |
| pNumber | number of characters to get |
| pWin | A pointer to an ncurses window structure to get contents from. If this is nullptr, curscr will be used. |
Referenced by cx::cxWindow::getString().
| void cx::getTermDimensions | ( | int & | pHeight, |
| int & | pWidth | ||
| ) |
Returns the terminal's current height & width.
| pHeight | (OUT) This will store the terminal's current height. |
| pWidth | (OUT) This will store the terminal's current width. |
References height(), and width().
Referenced by cxGridTest(), and SpreadsheetApp::run().
| string cx::getTermType | ( | ) |
Returns a string representing the terminal type. This is the.
value of the environment variable TERM.
| cxWindow * cx::getTopWindow | ( | ) |
| string cx::getWidgetItemStr | ( | e_WidgetItems | pItem | ) |
Returns a string version of an e_WidgetItems value.
| pItem | A member of the e_WidgetItems enumeration (see cxWidgetItems.h) |
References eBORDER, eDATA, eDATA_EDITABLE, eDATA_READONLY, eHOTKEY, eLABEL, eMENU_SELECTION, eMESSAGE, eSTATUS, and eTITLE.
| bool cx::hasAttr | ( | e_WidgetItems | pItem, |
| attr_t | pAttr | ||
| ) |
Determine if the widget has an attribute "set".
| pItem | The item type to check (see e_WidgetItems) |
| pAttr | The attribute. (i.e., A_NORMAL, etc.) |
References getAttrs().
Referenced by cx::cxMessageDialog::setFocus().
| int cx::height | ( | ) |
Returns the height of the main screen.
Referenced by cx::cxButton::cxButton(), cx::cxComboBox::cxComboBox(), cx::cxFileViewer::cxFileViewer(), cx::cxForm::cxForm(), cx::cxGrid::cxGrid(), cx::cxLabel::cxLabel(), cx::cxMenu::cxMenu(), cx::cxMessageDialog::cxMessageDialog(), cx::cxMultiForm::cxMultiForm(), cx::cxMultiLineInput::cxMultiLineInput(), cxPanel_cxMenuUpArrowLeave(), cxPanelTest2(), cx::cxScrolledWindow::cxScrolledWindow(), cx::cxSearchPanel::cxSearchPanel(), cxWindowBorderTest(), TestMessageDialog::getActualHeight(), getTermDimensions(), cx::cxWindow::info(), cx::cxWindow::init(), main(), cx::cxMenu::resize(), cx::cxWindow::resize(), cx::cxMultiLineInput::resize(), cx::cxSearchPanel::resize(), cx::cxSearchPanel::setFormHeight(), cx::cxSearchPanel::setMenuHeight(), and setValFunc().
| void cx::init | ( | bool | pEnableMouse = true | ) |
Initializes the cxWidgets library. This must be called before.
any screen-related cxWidgets library objects & functions are used.
| pEnableMouse | Whether or not to enable mouse input. Defaults to true. Note that if the version of ncurses on the system doesn't support the mouse at the time when cxWidgets is compiled, the mouse will not be enabled, even if this parameter is true. |
References eBLACK_BLACK, eBLACK_BLUE, eBLACK_CYAN, eBLACK_GREEN, eBLACK_RED, eBLACK_WHITE, eBLUE_BLACK, eBLUE_BLUE, eBLUE_CYAN, eBLUE_GREEN, eBLUE_RED, eBLUE_WHITE, eBROWN_BLACK, eBROWN_BLUE, eBROWN_CYAN, eBROWN_GREEN, eBROWN_RED, eBROWN_WHITE, eBRTBLUE_BLACK, eBRTBLUE_BLUE, eBRTBLUE_CYAN, eBRTBLUE_GREEN, eBRTBLUE_RED, eBRTBLUE_WHITE, eBRTCYAN_BLACK, eBRTCYAN_BLUE, eBRTCYAN_CYAN, eBRTCYAN_GREEN, eBRTCYAN_RED, eBRTCYAN_WHITE, eBRTGREEN_BLACK, eBRTGREEN_BLUE, eBRTGREEN_CYAN, eBRTGREEN_GREEN, eBRTGREEN_RED, eBRTGREEN_WHITE, eBRTMAGENTA_BLACK, eBRTMAGENTA_BLUE, eBRTMAGENTA_CYAN, eBRTMAGENTA_GREEN, eBRTMAGENTA_RED, eBRTMAGENTA_WHITE, eBRTRED_BLACK, eBRTRED_BLUE, eBRTRED_CYAN, eBRTRED_GREEN, eBRTRED_RED, eBRTRED_WHITE, eCYAN_BLACK, eCYAN_BLUE, eCYAN_CYAN, eCYAN_GREEN, eCYAN_RED, eCYAN_WHITE, eGRAY_BLACK, eGRAY_BLUE, eGRAY_CYAN, eGRAY_GREEN, eGRAY_RED, eGRAY_WHITE, eGREEN_BLACK, eGREEN_BLUE, eGREEN_CYAN, eGREEN_GREEN, eGREEN_RED, eGREEN_WHITE, eMAGENTA_BLACK, eMAGENTA_BLUE, eMAGENTA_CYAN, eMAGENTA_GREEN, eMAGENTA_RED, eMAGENTA_WHITE, eRED_BLACK, eRED_BLUE, eRED_CYAN, eRED_GREEN, eRED_RED, eRED_WHITE, eWHITE_BLACK, eWHITE_BLUE, eWHITE_CYAN, eWHITE_GREEN, eWHITE_RED, eWHITE_WHITE, eYELLOW_BLACK, eYELLOW_BLUE, eYELLOW_CYAN, eYELLOW_GREEN, eYELLOW_RED, eYELLOW_WHITE, mHotkeyAttrs, mInitialized, mMenuSelectionAttrs, mNavKeys, PAGE_DOWN, PAGE_UP, SHIFT_TAB, signalHandler(), and TAB.
Referenced by cxWindowSizeTest(), cx::cxForm::getStatus(), main(), main(), and SpreadsheetApp::run().
| bool cx::isFunctionKey | ( | int | pKey | ) |
Returns whether a key is a function key, pageDown, or pageUp (these keys are tested by cxInput and cxMultiLineInput in their input loops).
| pKey | The key to be checked |
| bool cx::isNavKey | ( | int | pKey | ) |
Returns whether a key is a navigational key, according to.
cx's list of navigational keys. The defaults are the arrow
keys, pageUp, pageDown, tab, and shift-tab. cxMultiLineInput
has its own list of navigational keys, but this may be useful
for other things.
| pKey | The key to test |
References mNavKeys.
| int cx::left | ( | ) |
Returns the leftmost column # of the main screen.
Referenced by cx::cxWindow::alignHoriz(), cx::cxButton::cxButton(), cx::cxComboBox::cxComboBox(), cx::cxFileViewer::cxFileViewer(), cx::cxForm::cxForm(), cx::cxGrid::cxGrid(), cx::cxInput::cxInput(), cx::cxLabel::cxLabel(), cx::cxMenu::cxMenu(), cx::cxMultiForm::cxMultiForm(), cx::cxMultiLineInput::cxMultiLineInput(), cx::cxScrolledWindow::cxScrolledWindow(), cx::cxSearchPanel::cxSearchPanel(), cx::cxWindow::info(), cx::cxNotebook::mouseEvtWasInTitle(), cx::cxComboBox::move(), cx::cxMessageDialog::move(), cx::cxMultiForm::move(), cx::cxNotebook::setLabelsOnTop(), cx::cxNotebook::setTabSpacing(), and cx::cxComboBox::toggleMenu().
| void cx::messageBox | ( | const std::string & | pMessage, |
| const std::string & | pStatus, | ||
| int | pHeight, | ||
| int | pWidth | ||
| ) |
Shows a message box.
| pMessage | Message of message box |
| pStatus | Status of message box. Defaults to blank. |
| pHeight | The height for the message box |
| pWidth | The width for the message box |
References cx::cxMessageDialog::hide(), cx::cxWindow::setStatus(), and cx::cxMessageDialog::showModal().
| void cx::messageBox | ( | const std::string & | pMessage, |
| e_cxColors | pMessageColor = getDefaultMessageColor(), |
||
| attr_t | pMessageAttr = A_NORMAL, |
||
| e_cxColors | pTitleColor = getDefaultTitleColor(), |
||
| e_cxColors | pStatusColor = getDefaultStatusColor(), |
||
| e_cxColors | pBorderColor = getDefaultBorderColor() |
||
| ) |
Shows a message box.
| pMessage | The message for the message box |
| pMessageColor | The color for the message portion |
| pMessageAttr | The attribute for the message portion |
| pTitleColor | The color for the title |
| pStatusColor | The color for the status |
| pBorderColor | The color for the border |
References messageBox().
| void cx::messageBox | ( | const std::string & | pTitle, |
| const std::string & | pMessage, | ||
| const std::string & | pStatus, | ||
| int | pHeight, | ||
| int | pWidth | ||
| ) |
Shows a message box.
| pTitle | title of message box |
| pMessage | message of message box |
| pStatus | status of message box |
| pHeight | The height for the message box |
| pWidth | The width for the message box |
References cx::cxMessageDialog::hide(), cx::cxWindow::setStatus(), and cx::cxMessageDialog::showModal().
| void cx::messageBox | ( | const std::string & | pTitle, |
| const std::string & | pMessage, | ||
| const std::string & | pStatus = "" |
||
| ) |
References messageBox().
| void cx::messageBox | ( | int | pRow, |
| int | pCol, | ||
| const std::string & | pMessage | ||
| ) |
Shows a message box, automatically setting its height & width.
| pRow | Row of upper-left corner |
| pCol | Column of upper-left corner |
| pMessage | The message to appear in the box |
References messageBox().
| void cx::messageBox | ( | int | pRow, |
| int | pCol, | ||
| const std::string & | pTitle, | ||
| const std::string & | pMessage, | ||
| const std::string & | pStatus | ||
| ) |
Shows a message box automatically setting its height & width.
| pRow | row of upper-left corner |
| pCol | column of upper-left corner |
| pTitle | title of message box |
| pMessage | message of message box |
| pStatus | status of message box |
References messageBox().
| void cx::messageBox | ( | int | pRow, |
| int | pCol, | ||
| int | pHeight, | ||
| int | pWidth, | ||
| const std::string & | pTitle, | ||
| const std::string & | pMessage, | ||
| const std::string & | pStatus = "", |
||
| eBorderStyle | pBorderStyle = eBS_SINGLE_LINE |
||
| ) |
Shows a message box.
| pRow | row of upper-left corner |
| pCol | column of upper-left corner |
| pHeight | height of message box |
| pWidth | width of message box |
| pTitle | title of message box |
| pMessage | message of message box |
| pStatus | status of message box |
| pBorderStyle | The type of border to use for the message box - Defaults to eBS_SINGLE_LINE |
References messageBox().
Referenced by allFormInputsGoReadOnly(), buttonClickFunction(), comboBox(), comboBoxMenuDisable(), compareWin(), cxButtonOnClick(), cxComboBoxNotEditableMenuEnabled(), cxDatePickerTest(), cxFormAppendComboBoxPair(), cxFormAppendPair(), cxFormExtendedHelpKey(), cxFormMultiLineInputFunctionKeyNoValidator(), cxFormNavKeys(), cxFormNoQuit(), cxFormStartAtFirstInput(), cxInputBorderChange(), cxInputMasking(), cxMenuAltItemText(), cxMenuMiscTests(), cxMenuNoMoreSelectableItemsWhileModal(), cxMenuNoQuit(), cxMenuResize(), cxMenuScrolling(), cxMenuWithMultipleItemHotkeys(), cxMultiLineInputBorderChange(), cxMultiLineInputExtendedHelpColorsAndAttrs(), cxMultiLineInputExtendedHelpKey(), cxMultiLineInputForceUpper(), cxMultiLineInputFunctionKeyNoValidator(), cxMultiLineInputMasking(), cxMultiLineInputMaxInputLength(), cxMultiLineInputNonBlank(), cxMultiLineInputNumericFloatingPt(), cxMultiLineInputNumericFloatingPtWithRange(), cxMultiLineInputNumericWhole(), cxMultiLineInputNumericWholeWithRange(), cxMultiLineInputSetValue(), cxMultiLineInputTextValidation(), cxMultiLineInputTextValidationAutoCompletion(), cxMultiLineInputTextValidationNonBlankForceUpper(), cxOpenFileDialogTest(), cxPanel_cxMenuUpArrowLeave(), cxPanelGetLastWindow(), cxPanelTest(), cxSearchPanelResize(), cxSearchPanelTest(), cxWindowAlignTest(), cxWindowSizeTest(), cxWindowWithFunctionKeys(), demoPanels(), cx::cxForm::doInputLoop(), cx::cxMultiLineInput::doInputLoop(), cx::cxMultiForm::doInputLoop(), doMenu(), enableDisableForm(), floatingPtValidate(), form(), formChangeInputFocusWhileModal(), formDataChanged(), formFunctionKeyNoOnLeave(), formFunctionKeys(), formUpArrowFunction(), formWithFKeys(), formWithInputValueValidator(), genericMessageFunction(), genericMessageFunction_1str(), getFormKeys(), gridButtonClicked(), hello(), inputQuitKeysOnForm(), inputsWithFKeys(), cx::cxMultiLineInput::inputValidator(), integerValidate(), keyFunctionAutoExitOnLastFormInput(), FlashcardApp::loadCards(), menuItemWithMultipleHotkeys(), menuOnEnter(), messageBox(), messageBox(), messageBox(), messageBox(), messageBox(), mouseFunction(), msgBox1(), msgBox2(), msgBox3(), msgBox4(), msgCancel(), msgNo(), msgNoYes(), msgOK(), msgOKCancel(), msgYes(), msgYesNo(), multiFormWithDisabledSubform(), multiLineInputResize(), onFocus(), onFocusWinForCxPanelGetLastPage(), onLeave(), CentipedeGame::run(), FlashcardApp::run(), SnakeGame::run(), sayHello(), sayHello2(), setInputLabel(), showAMessageBox(), FlashcardApp::showHelp(), someFunction(), someFunction3(), someWeirdFunc(), testBoxSuccess(), testInput1(), testInputValidator(), testKeyFunction(), testMenu1(), testOnFocusFunction(), testOnLeaveFunction(), unselectableMenuItem(), and windowFunctionKeyNoOnLeave().
| void cx::messageDialog | ( | const std::list< std::string > & | pMessages | ) |
Shows a message dialog (a message box with an OK button)
| pMessages | message of message dialog |
| void cx::messageDialog | ( | const std::string & | pMessage | ) |
Shows a message dialog (a message box with an OK button)
| pMessage | message of message dialog |
Referenced by cxMenuAssignment(), cxWindowAssignment(), cxWindowCopyConstructor(), and demoPanels().
| string cx::noOp | ( | void * | p1, |
| void * | p2 | ||
| ) |
Does nothing. Can be used, for example, as an event function.
on a cxForm when you want to have a keypress exit the form.
| p1 | Not used |
| p2 | Not used |
Referenced by formUpArrowFunction().
| string cx::noOp | ( | void * | p1, |
| void * | p2, | ||
| void * | p3, | ||
| void * | p4 | ||
| ) |
Does nothing. Can be used, for example, as an event function.
on a cxForm when you want to have a keypress exit the form.
| p1 | Not used |
| p2 | Not used |
| p3 | Not used |
| p4 | Not used |
| ostream & cx::operator<< | ( | ostream & | pOS, |
| const cxDate & | pDate | ||
| ) |
References cx::cxDate::dayOfWeekStr(), DD_MM_YY, DD_MM_YYYY, DDMMYY, DDMMYYYY, MM_DD_YY, MM_DD_YYYY, MMDDYY, MMDDYYYY, YY_MM_DD, YYMMDD, YYYY_MM_DD, and YYYYMMDD.
| istream & cx::operator>> | ( | istream & | pIS, |
| cxDate & | pDate | ||
| ) |
References cx::cxDate::fromString().
| bool cx::promptYesNo | ( | const std::string & | pMessage, |
| const std::string & | pTitle = "", |
||
| long | pButtons = cxYES_NO |
||
| ) |
Prompts the user with a cxMessageDialog for a yes/no choice.
Returns their choice as a boolean.
| pMessage | The message to put in the message dialog |
| pTitle | The title for the message dialog. Defaults to a blank string. |
| pButtons | Specifies the buttons to appear on the dialog. Defaults to cxYES_NO (to display yes & no buttons). Note that you can use multiple values listed in cxMessageDialogStyles.h ORed together. For example, cxYES_NO | cxNO_DEFAULT would display Yes and No buttons and default to No. |
Referenced by SpreadsheetApp::run().
| void cx::removeAttr | ( | e_WidgetItems | pItem, |
| attr_t | pAttr | ||
| ) |
Removes an ncurses attribute from one of the item lists.
| pItem | The item type to remove the attribute for (see the e_WidgetItems enumeration). |
| pAttr | The ncurses attribute to remove |
References eBORDER, eDATA, eDATA_EDITABLE, eDATA_READONLY, eHOTKEY, eLABEL, eMENU_SELECTION, eMESSAGE, eSTATUS, eTITLE, mBorderAttrs, mDataEditableAttrs, mDataReadonlyAttrs, mHotkeyAttrs, mLabelAttrs, mMenuSelectionAttrs, mMessageAttrs, mStatusAttrs, and mTitleAttrs.
| void cx::removeAttrs | ( | e_WidgetItems | pItem | ) |
Removes all attributes for a given window item.
| pItem | The item type to remove attributes for (see the e_WidgetItems enumeration). |
References eBORDER, eDATA, eDATA_EDITABLE, eDATA_READONLY, eHOTKEY, eLABEL, eMENU_SELECTION, eMESSAGE, eSTATUS, eTITLE, mBorderAttrs, mDataEditableAttrs, mDataReadonlyAttrs, mHotkeyAttrs, mLabelAttrs, mMenuSelectionAttrs, mMessageAttrs, mStatusAttrs, and mTitleAttrs.
| void cx::removeNavKey | ( | int | pKey | ) |
Removes a key from cx's list of "navigational" keys.
| pKey | The key to be removed |
References mNavKeys.
| bool cx::resizeTerm | ( | int | pNewHeight, |
| int | pNewWidth | ||
| ) |
Resizes the terminal screen.
| pNewHeight | The new height (# of rows) |
| pNewWidth | The new width (# of columns) |
| int cx::right | ( | ) |
Returns the rightmost column # of the main screen.
Referenced by cx::cxWindow::alignHoriz(), cx::cxWindow::getRowColBasedOn(), cx::cxWindow::info(), main(), cx::cxNotebook::mouseEvtWasInTitle(), and cx::cxNotebook::setTabSpacing().
| int cx::runSystemCmd | ( | const std::string & | pCmd | ) |
Runs a command on the system, calling the system() function.
If your application has called cx::init(), this
function should be called to run a system command.
After running cx::init(), cx::cleanup() must be
called before running system commands to get the
terminal back to the state it was in before; then,
cx::init() must be called again after the call to
system() to restore cxWidgets graphical functions.
This function does the wrapping for you.
| pCmd | The command to run |
| void cx::setAttr | ( | e_WidgetItems | pItem, |
| attr_t | pAttr | ||
| ) |
Sets the ncurses attribute to use for one of the items in the.
window (see the e_WidgetItems enumeration). Clears the current
set of attributes for the item and inserts the given attribute
into the set.
| pItem | The item type to apply the attribute for (see the e_WidgetItems enumeration). |
| pAttr | The ncurses atribute to apply. |
References eBORDER, eDATA, eDATA_EDITABLE, eDATA_READONLY, eHOTKEY, eLABEL, eMENU_SELECTION, eMESSAGE, eSTATUS, eTITLE, mBorderAttrs, mDataEditableAttrs, mDataReadonlyAttrs, mHotkeyAttrs, mLabelAttrs, mMenuSelectionAttrs, mMessageAttrs, mStatusAttrs, and mTitleAttrs.
Referenced by attributesSetter(), and main().
| void cx::setDefaultBorderColor | ( | e_cxColors | pColor | ) |
Sets the default border color.
| pColor | A member of the e_cxColors enumeration (see cxColors.h) |
References mDefaultBorderColor.
| void cx::setDefaultMessageColor | ( | e_cxColors | pColor | ) |
Sets the default message color.
| pColor | A member of the e_cxColors enumeration (see cxColors.h) |
References mDefaultMessageColor.
| void cx::setDefaultStatusColor | ( | e_cxColors | pColor | ) |
Sets the default status color.
| pColor | A member of the e_cxColors enumeration (see cxColors.h) |
References mDefaultStatusColor.
| void cx::setDefaultTitleColor | ( | e_cxColors | pColor | ) |
Sets the default title color.
| pColor | A member of the e_cxColors enumeration (see cxColors.h) |
References mDefaultTitleColor.
| void cx::setMenuClearKeywordKey | ( | int | pKey | ) |
Sets the key that should be used to clear the "Keyword" input.
for cxMenu item searching.
| pKey | The key that should be used to clear the "Keyword" input for cxMenu item searching. |
References mMenuClearKeywordKey.
| void cx::showAllWindows | ( | bool | pBringToTop = false | ) |
Shows all windows currently in use everywhere, from the.
bottom of the stack to the top.
| pBringToTop | Whether or not to bring each window to the top as it's shown. |
References cxInitialized(), and cx::cxWindow::show().
| void cx::signalHandler | ( | int | pSignal | ) |
| void cx::splash | ( | const std::string & | pMessage, |
| int | pSleep | ||
| ) |
Shows a splash message.
| pMessage | Message of splash message |
| pSleep | Duration in seconds of splash message |
| void cx::splash | ( | const std::string & | pTitle, |
| const std::string & | pMessage, | ||
| int | pSleep | ||
| ) |
| std::string cx::stringWithoutHotkeyChars | ( | const std::string & | pStr | ) |
Takes a string and returns a version without the & characters.
that are used for highlighting the next character.
| pStr | The string to process |
References stringWithoutHotkeyChars().
Referenced by cx::cxMenu::itemExists(), and stringWithoutHotkeyChars().
| bool cx::toggleCursor | ( | bool | pToggleCursor | ) |
Enables or disables the display of the cursor.
| pToggleCursor | If true, the cursor will be enabled. If false, the cursor will be disabled. |
Referenced by cx::cxForm::doInputLoop().
| int cx::top | ( | ) |
Returns the top row # of the main screen.
Referenced by cx::cxWindow::alignVert(), cx::cxButton::cxButton(), cx::cxComboBox::cxComboBox(), cx::cxFileViewer::cxFileViewer(), cx::cxForm::cxForm(), cx::cxGrid::cxGrid(), cx::cxInput::cxInput(), cx::cxLabel::cxLabel(), cx::cxMenu::cxMenu(), cx::cxMultiForm::cxMultiForm(), cx::cxMultiLineInput::cxMultiLineInput(), cx::cxScrolledWindow::cxScrolledWindow(), cx::cxSearchPanel::cxSearchPanel(), cx::cxWindow::info(), cx::cxMultiForm::lowestSubformRow(), cx::cxComboBox::move(), cx::cxMessageDialog::move(), and cx::cxMultiForm::move().
| void cx::updateWindows | ( | ) |
Updates (refreshes) all windows on the screen.
References cxInitialized().
Referenced by cx::cxWindow::bringToBottom(), cx::cxWindow::bringToTop(), cx::cxForm::bringToTop(), cx::cxGrid::bringToTop(), cx::cxMultiLineInput::bringToTop(), CentipedeGame::draw(), SnakeGame::draw(), cx::cxWindow::erase(), cx::cxWindow::hide(), cx::cxInput::refreshValue(), FlashcardApp::run(), cx::cxLabel::setText(), cx::cxInput::show(), cx::cxLabel::show(), cx::cxWindow::show(), cx::cxGrid::show(), and cx::cxWindow::unhide().
| unsigned cx::visualStrLen | ( | const std::string & | pStr | ) |
Returns the length of a string without its hotkey characters -.
This is useful for counting the number of characters that
will actually appear on the screen (not counting the
characters that specify underlined characters).
| pStr | The string to process |
References visualStrLen().
Referenced by cx::cxWindow::drawMessage(), cx::cxWindow::init(), cx::cxInput::setBorderStyle(), cx::cxInput::setLabel(), and visualStrLen().
| int cx::width | ( | ) |
Returns the width of the main screen.
Referenced by cx::cxButton::cxButton(), cx::cxComboBox::cxComboBox(), cx::cxFileViewer::cxFileViewer(), cx::cxForm::cxForm(), cx::cxGrid::cxGrid(), cx::cxInput::cxInput(), cx::cxLabel::cxLabel(), cx::cxMenu::cxMenu(), cx::cxMessageDialog::cxMessageDialog(), cx::cxMultiForm::cxMultiForm(), cx::cxMultiLineInput::cxMultiLineInput(), cxPanel_cxMenuUpArrowLeave(), cxPanelTest2(), cx::cxScrolledWindow::cxScrolledWindow(), cx::cxSearchPanel::cxSearchPanel(), TestMessageDialog::getActualWidth(), cx::cxWindow::getRowColBasedOn(), getTermDimensions(), cx::cxWindow::info(), cx::cxWindow::init(), main(), cx::cxMenu::resize(), cx::cxWindow::resize(), cx::cxMultiLineInput::resize(), cx::cxSearchPanel::resize(), and setValFunc().
| void cx::writeText | ( | int | pRow, |
| int | pCol, | ||
| const std::string & | pText, | ||
| attr_t | pAttr = A_NORMAL, |
||
| e_cxColors | pColor = eGRAY_BLACK |
||
| ) |
Writes text on the screen.
| pRow | The row at which to write the text |
| pCol | The column at which to write the text |
| pText | The text to be written |
| pAttr | The text attribute (see the man page for wattron). Defaults to normal. |
| pColor | The text color (see e_cxColors enumeration in cxColors.h). Defaults to gray on black. |
|
inlineconstexpr |
Referenced by cx::cxDate::fromString(), and cx::cxDate::numMonthDays().
|
inlineconstexpr |
Referenced by cx::cxDate::addDays(), and cx::cxDate::addMonths().
|
inlineconstexpr |
Referenced by cx::cxDate::addMonths().
|
inlineconstexpr |
Referenced by cx::cxDate::addDays().
|
inlineconstexpr |
Referenced by cx::cxDate::addDays(), and cx::cxDate::addMonths().
|
inlineconstexpr |
Referenced by cx::cxDate::fromString(), and cx::cxDate::numMonthDays().
|
inlineconstexpr |
|
inlineconstexpr |
| set<attr_t> cx::mBorderAttrs |
Referenced by addAttr(), disableAttrs(), enableAttrs(), removeAttr(), removeAttrs(), and setAttr().
| attr_t cx::mDataEditableAttr =A_REVERSE |
| set<attr_t> cx::mDataEditableAttrs |
Referenced by addAttr(), cx::cxInput::cxInput(), disableAttrs(), enableAttrs(), removeAttr(), removeAttrs(), and setAttr().
| attr_t cx::mDataReadonlyAttr =A_BOLD |
| set<attr_t> cx::mDataReadonlyAttrs |
Referenced by addAttr(), cx::cxInput::cxInput(), disableAttrs(), enableAttrs(), removeAttr(), removeAttrs(), and setAttr().
| e_cxColors cx::mDefaultBorderColor = eGRAY_BLUE |
Referenced by getDefaultBorderColor(), and setDefaultBorderColor().
| e_cxColors cx::mDefaultMessageColor = eGRAY_BLUE |
Referenced by getDefaultMessageColor(), and setDefaultMessageColor().
| e_cxColors cx::mDefaultStatusColor = eYELLOW_BLUE |
Referenced by getDefaultStatusColor(), and setDefaultStatusColor().
| e_cxColors cx::mDefaultTitleColor = eWHITE_BLUE |
Referenced by getDefaultTitleColor(), and setDefaultTitleColor().
| set<attr_t> cx::mHotkeyAttrs |
Referenced by addAttr(), disableAttrs(), enableAttrs(), init(), removeAttr(), removeAttrs(), and setAttr().
| bool cx::mInitialized = false |
Referenced by cleanup(), cxInitialized(), and init().
| attr_t cx::mLabelAttr =A_DIM |
| set<attr_t> cx::mLabelAttrs |
Referenced by addAttr(), cx::cxInput::cxInput(), disableAttrs(), enableAttrs(), removeAttr(), removeAttrs(), and setAttr().
| int cx::mMenuClearKeywordKey = KEY_F(10) |
Referenced by getMenuClearKeywordKey(), and setMenuClearKeywordKey().
| attr_t cx::mMenuSelectionAttr =A_REVERSE |
| set<attr_t> cx::mMenuSelectionAttrs |
Referenced by addAttr(), cx::cxMenu::cxMenu(), disableAttrs(), enableAttrs(), init(), removeAttr(), removeAttrs(), and setAttr().
| set<attr_t> cx::mMessageAttrs |
Referenced by addAttr(), disableAttrs(), enableAttrs(), removeAttr(), removeAttrs(), and setAttr().
| set<int> cx::mNavKeys |
Referenced by addNavKey(), cx::cxMultiLineInput::cxMultiLineInput(), init(), isNavKey(), and removeNavKey().
| set<attr_t> cx::mStatusAttrs |
Referenced by addAttr(), disableAttrs(), enableAttrs(), removeAttr(), removeAttrs(), and setAttr().
| set<attr_t> cx::mTitleAttrs |
Referenced by addAttr(), disableAttrs(), enableAttrs(), removeAttr(), removeAttrs(), and setAttr().
|
static |
Contains the terminal type string.