|
cxWidgets 1.0
|
This class represents an input box that can have a height. More...
#include <cxMultiLineInput.h>


Public Member Functions | |
| cxMultiLineInput (cxWindow *pParentWindow=nullptr, int pRow=0, int pCol=0, int pHeight=1, int pWidth=DEFAULT_WIDTH, const std::string &pLabel="", eBorderStyle pBorderStyle=eBS_NOBORDER, eInputOptions pInputOption=eINPUT_EDITABLE, eInputTypes pInputType=eINPUT_TYPE_TEXT, std::string *pExtValue=nullptr, int pRightLabelOffset=0, int pRightLabelHeight=1, int pRightLabelWidth=7, bool pShowRightLabel=false) | |
| cxMultiLineInput (const cxMultiLineInput &pThatInput) | |
| virtual | ~cxMultiLineInput () |
| cxMultiLineInput & | operator= (const cxMultiLineInput &pThatInput) |
| Assignment operator. | |
| virtual long | show (bool pBringToTop=false, bool pShowSubwindows=false) override |
| virtual long | showModal (bool pShowSelf=true, bool pBringToTop=true, bool pShowSubwindows=false) override |
| Enters a loop for user input. Returns cxID_EXIT or cxID_QUIT,. | |
| void | hide (bool pHideSubwindows=false) override |
| void | unhide (bool pUnhideSubwindows=false) override |
| virtual void | erase (bool pEraseSubwindows=true) override |
| Erases the window. | |
| virtual std::string | getLabel () const |
| virtual void | setLabel (const std::string &pLabel) |
| virtual void | clearValue (bool pRefresh=false) |
| Clears the input value. | |
| virtual void | clear (bool pRefresh=false) override |
| Alias for clearValue() (this is here to overload the clear() | |
| virtual std::string | getValue () const |
| virtual bool | setValue (std::string pValue, bool pRefresh=false) |
| Sets the text in the input. | |
| std::string * | getExtValue () const |
| void | setExtValue (std::string *pExtVal, bool pRefresh=false) |
| virtual void | setValidatorStr (const std::string &pValidator) |
| Sets the validator string for this input. | |
| virtual std::string | getValidatorStr () const |
| Returns the validator string. | |
| virtual bool | textIsValid () const |
| Returns whether the text entered into the input is valid. | |
| virtual bool | textIsValid (const std::string &pText) const |
| Returns whether some text is valid according to the input's validator. | |
| bool | getMasked () |
| void | toggleMasking (bool pMasking) |
| char | getMaskChar () const |
| void | setMaskChar (char pMaskChar) |
| virtual bool | move (int pNewRow, int pNewCol, bool pRefresh=true) override |
| virtual void | resize (int pNewHeight, int pNewWidth, bool pRefresh=true) override |
| Changes input's width and height. The upper-left coordinate. | |
| virtual bool | setKeyFunction (int pKey, const std::shared_ptr< cxFunction > &pFunction) override |
| Sets a function to be called when a key is pressed. | |
| virtual bool | setKeyFunction (int pKey, funcPtr4 pFunction, void *p1, void *p2, void *p3, void *p4, bool pUseVal, bool pExitAfterRun=false, bool pRunOnLeaveFunction=true) override |
| Adds a function to call when the user presses some key. | |
| virtual bool | setKeyFunction (int pKey, funcPtr4 pFunction, void *p1, void *p2, void *p3, void *p4, bool pUseVal, bool pExitAfterRun, bool pRunOnLeaveFunction, bool pRunValidator) |
| Just like the above function, but also lets you specify whether. | |
| virtual bool | setKeyFunction (int pKey, funcPtr2 pFunction, void *p1, void *p2, bool pUseVal, bool pExitAfterRun=false, bool pRunOnLeaveFunction=true) override |
| Adds a function to call when the user presses some key. | |
| virtual bool | setKeyFunction (int pKey, funcPtr2 pFunction, void *p1, void *p2, bool pUseVal, bool pExitAfterRun, bool pRunOnLeaveFunction, bool pRunValidator) |
| Just like the above function, but also lets you specify whether. | |
| virtual bool | setKeyFunction (int pKey, funcPtr0 pFunction, bool pUseVal, bool pExitAfterRun=false, bool pRunOnLeaveFunction=true) override |
| Adds a function to call when the user presses some key. | |
| virtual bool | setKeyFunction (int pKey, funcPtr0 pFunction, bool pUseVal, bool pExitAfterRun, bool pRunOnLeaveFunction, bool pRunValidator) |
| Just like the above function, but also lets you specify whether. | |
| virtual void | addSkipValidatorKey (int pKey) |
| Adds a key to the list of keys that, when pressed, the input. | |
| virtual void | removeSkipValidatorKey (int pKey) |
| Removes a key from the list of keys that skip the validator. | |
| virtual bool | hasSkipValidatorKey (int pKey) const |
| Returns whether a key is in the list of keys that cause the. | |
| virtual void | clearKeyFunction (int pFunctionKey) override |
| Removes a hotkey from the window so that it will not. | |
| virtual void | clearKeyFunctions () override |
| Clears the list of external functions fired by hotkeys. | |
| void | setLabelColor (e_cxColors pColor) |
| Sets the label color. | |
| e_cxColors | getLabelColor () const |
| void | setValueColor (e_cxColors pColor) |
| Sets the color of the value typed into the input. | |
| e_cxColors | getValueColor () const |
| virtual void | setColor (e_WidgetItems pItem, e_cxColors pColor) override |
| Sets the color of one of the window items. | |
| virtual int | getInputOption () const |
| Returns the input option for the input (i.e., eINPUT_EDITABLE,. | |
| virtual void | setInputOption (eInputOptions pInputKind) |
| Sets the input option for the input (i.e., eINPUT_EDITABLE,. | |
| void | toggleCursor (bool pShowCursor) |
| Enables/disables the display of the cursor. | |
| virtual bool | setValidatorFunction (const std::shared_ptr< cxFunction > &pFunction) |
| bool | setValidatorFunction (funcPtr4 pFunction, void *p1, void *p2, void *p3, void *p4) |
| bool | setValidatorFunction (funcPtr2 pFunction, void *p1, void *p2) |
| bool | setValidatorFunction (funcPtr0 pFunction) |
| void | clearValidatorFunction () |
| Un-sets the validator function. | |
| bool | isFull () const |
| Returns whether the value in the input takes up the maximum possible space for the input. | |
| virtual void | setOnKeyFunction (const std::shared_ptr< cxFunction > &pFunction) |
| Sets a function to be run whenever a key is pressed. | |
| virtual void | setOnKeyFunction (funcPtr4 pFunction, void *p1, void *p2, void *p3, void *p4) |
| Sets a function to be run whenever a key is pressed. | |
| virtual void | setOnKeyFunction (funcPtr2 pFunction, void *p1, void *p2) |
| Sets a function to be run whenever a key is pressed. | |
| virtual void | setOnKeyFunction (funcPtr0 pFunction) |
| Sets a function to be run whenever a key is pressed. | |
| virtual void | toggleOnKeyFunction (bool pRunOnKeyFunction) |
| Sets whether the onKey function should be fired or not. | |
| virtual void | clearOnKeyFunction () |
| Un-sets the onKey function. | |
| bool | onKeyFunctionEnabled () const |
| Returns whether or not the onKey function will be run. | |
| void | setEnterAlwaysExits (bool pEnterAlwaysExits) |
| Sets whether the enter key always causes the input. | |
| bool | enterAlwaysExits () const |
| Returns whether the enter key always causes the input. | |
| virtual int | maxValueLen () const |
| Returns the maximum length of the value that may be set. | |
| virtual bool | hasFocus () const override |
| Returns whether or not the input currently has focus. | |
| virtual void | setReadOnlyOnLeave (bool pReadOnlyOnLeave) |
| Sets whether the input should go read-only when setFocus() exits. | |
| bool | canBeEditable () const |
| Returns whether the input can be editable. | |
| void | setCanBeEditable (bool pCanBeEditable) |
| Sets whether the input can be set editable. If this is called. | |
| void | setExitOnFull (bool pExitOnFull) |
| Sets whether the input should exit automatically when it's full. | |
| bool | getExitOnFull () const |
| Returns whether the input will exit automatically when full. | |
| virtual void | setBorderStyle (eBorderStyle pBorderStyle) override |
| Sets the border style. | |
| virtual bool | isAbove (const cxWindow &pThatWindow) const override |
| Returns whether the input is above another window. | |
| virtual bool | isBelow (const cxWindow &pThatWindow) const override |
| Returns whether the input is below another window. | |
| virtual void | bringToTop (bool pRefresh=true) override |
| Brings the window to the top. | |
| virtual void | refreshValue (bool pRefresh=true) |
| Refreshes just the value portion of the input. | |
| void | trapNonAssignedFKeys (bool pTrapNonAssignedFKeys) |
| Sets whether non-assigned function keys should. | |
| virtual bool | runOnFocusFunction (std::string *pFunctionRetval=nullptr) override |
| Runs the onFocus function, if it's set. If the. | |
| void | runFieldFunction (int pKey) |
| Runs the function that was set with setKeyFunction for this key. | |
| int | getInputLen () const |
| virtual bool | addQuitKey (int pKey, bool pRunOnLeaveFunction=true, bool pOverride=false) override |
| Adds a key that will cause the input to quit and return. | |
| virtual void | removeQuitKey (int pKey) override |
| Removes a quit key (but doesn't work for ESC) | |
| virtual bool | addExitKey (int pKey, bool pRunOnLeaveFunction=true, bool pOverride=false) override |
| Adds a key that will cause the input to quit and return. | |
| virtual void | removeExitKey (int pKey) override |
| Removes an exit key. | |
| virtual void | enableInputLoop (bool pDoInputLoop) |
| Enables or disables the input loop. | |
| virtual bool | inputLoopEnabled () const |
| Returns whether the input loop is enabled. | |
| virtual void | setEditable (bool pEditable) |
| Enables or disables editing of the input. If disabled, the. | |
| virtual bool | isEditable () const |
| Returns whether or not the input is editable. An input is editable if it passes the 3 following criteria: | |
| bool | getAutoWrapAtBeginning () const |
| Returns whether or not auto-wrapping of text. | |
| void | setAutoWrapAtBeginning (bool pWrapAtBeginning) |
| Sets whether auto-wrapping of text. | |
| bool | getSkipIfReadOnly () const |
| Returns whether the input will skip all. | |
| void | setSkipIfReadOnly (bool pSkipIfReadOnly) |
| Sets whether the input should skip. | |
| virtual void | setDisableCursorOnShow (bool pDisableCursorOnShow) override |
| Sets whether the window should disable the cursor. | |
| cxForm * | getParentForm () const |
| Returns the parent cxForm pointer. | |
| virtual void | setValidateOnReverse (bool pValidateOnReverse) |
| Sets whether or not to run the validator function. | |
| virtual bool | getValidateOnReverse () const |
| Returns whether or not the validator function will. | |
| virtual void | setLastKey (int pLastKey) override |
| Sets the last keypress. | |
| virtual bool | modalGetsKeypress () const override |
| Returns whether or not a call to showModal() will wait for a. | |
| virtual void | setEnabled (bool pEnabled) override |
| Enables or disables the input. | |
| virtual void | quitNow (bool pMoveForward) |
| After this is called, the code returned by showModal will. | |
| virtual void | quitNow () override |
| Tells the input to exit the input loop now, with a return value. | |
| virtual void | exitNow (bool pMoveForward) |
| After this is called, the code returned by showModal will. | |
| virtual void | exitNow () override |
| Tells the input to exit the input loop now, with a return value. | |
| virtual void | toggleValidatorFunction (bool pRunValidatorFunction) |
| Sets whether or not the validator function should be used. | |
| virtual bool | getUseValidatorFunction () const |
| Returns whether or not the validator function should be used. | |
| virtual cxWindow * | getParent () const override |
| Returns a pointer to the parent window. If the cxMultiLineInput. | |
| virtual bool | ranFunctionAndShouldExit () const |
| Returns whether the input ran a key function that was set up. | |
| virtual void | addAttr (e_WidgetItems pItem, attr_t pAttr) override |
| Adds an ncurses attribute to use for one of the items in the. | |
| virtual void | setAttr (e_WidgetItems pItem, attr_t pAttr) override |
| Sets the ncurses attribute to use for one of the items in the. | |
| virtual void | removeAttr (e_WidgetItems pItem, attr_t pAttr) override |
| Removes an ncurses attribute from one of the item lists. | |
| virtual void | removeAttrs (e_WidgetItems pItem) override |
| Removes all attributes for a given window item. | |
| virtual void | getAttrs (e_WidgetItems pItem, std::set< attr_t > &pAttrs) const override |
| Returns the set of ncurses attributes for a given item. | |
| virtual bool | getCursorLeftAlign () const |
| Returns whether the cursor will be left-aligned when the. | |
| virtual void | setCursorLeftAlign (bool pCursorLeftAlign) |
| Sets whether the cursor should be left-aligned when the. | |
| bool | getExitOnBackspaceAtFront () const |
| Returns whether the input will exit the input loop when the. | |
| void | setExitOnBackspaceAtFront (bool pExitOnBackspaceAtFront) |
| Sets whether the input should exit the input loop when the. | |
| virtual std::string | runValidatorFunction () const |
| Runs the input's validator function and returns its return. | |
| virtual bool | hasNavKey (int pKey) const |
| Returns whether a key is in the input's list of what it. | |
| virtual void | addNavKey (int pKey) |
| Add a key to be considered a "navigational" key. The key will. | |
| virtual void | removeNavKey (int pKey) |
| Removes a key from the input's list of "navigational" keys (see. | |
| virtual void | removeNavKeys () |
| Removes all keys that the input considers "navigational" keys. | |
| virtual void | getNavKeys (std::set< int > &pNavKeys) const |
| Returns the input's list of what it considers "navigational". | |
| virtual void | setTimeout (int pTimeout) |
| Sets the amount of time (in seconds) that the input should. | |
| int | getTimeout () const |
| Returns the amount of time that the input will wait before. | |
| virtual std::string | cxTypeStr () const override |
| Returns the name of the cxWidgets class. This can be used to. | |
| eInputTypes | getInputType () const |
| Returns the input type. This is a member of the cxInputTypes. | |
| virtual void | setInputType (eInputTypes pInputType) |
| Sets the input type. This is a member of the cxInputTypes. | |
| long double | getRangeLowDouble () const |
| Returns the low end of the floating-point numeric range for. | |
| void | setRangeLowDouble (const long double &pRangeLowDouble) |
| Sets the low end of the floating-point numeric range for the. | |
| long double | getRangeHighDouble () const |
| Returns the high end of the floating-point numeric range for. | |
| void | setRangeHighDouble (const long double &pRangeHighDouble) |
| Sets the high end of the floating-point numeric range for the. | |
| long int | getRangeLowInt () const |
| Returns the low end of the whole numeric range for the input. | |
| void | setRangeLowInt (const long int &pRangeLowInt) |
| Sets the low end of the whole numeric range for the input. | |
| long int | getRangeHighInt () const |
| Returns the high end of the whole numeric range for the input. | |
| void | setRangeHighInt (const long int &pRangeHighInt) |
| Sets the high end of the whole numeric range for the input. | |
| void | getRangeDouble (long double &pLow, long double &pHigh) const |
| Returns the floating-point numeric range for in the input. | |
| void | setRangeDouble (const long double &pLow, const long double &pHigh) |
| Sets the floating-point numeric range for the input. | |
| void | getRangeInt (long int &pLow, long int &pHigh) |
| Returns the whole number range for the input. | |
| void | setRangeInt (const long int &pLow, const long int &pHigh) |
| Sets the whole number range for the input. | |
| virtual std::string | inputValidator () |
| onLeave validator function - This runs just before the user | |
| virtual std::string | onKeypress () |
| This runs each time the user presses a key. If built-in. | |
| virtual void | useBuiltInValidator () |
| Sets up the input's built-in validator function for the input. | |
| virtual bool | usingBuiltInValidator () const |
| Returns whether or not the built-in validator function is set. | |
| virtual void | useBuiltInOnKeyFunction () |
| Sets up the input's built-in onKey function for the input. | |
| virtual bool | usingBuiltInOnKeyFunction () const |
| Returns whether or not the built-in onKeypress function is. | |
| void | validatorFuncMessageBox (bool pEnable) |
| Sets whether or not a message box should be shown in the. | |
| bool | validatorFuncMessageBox () const |
| Returns whether or not the message box for errors is enabled. | |
| virtual void | addValidOptions (const std::string &pValidOptions, bool pValidate=true) |
| Adds single-character valid input strings to the input. | |
| virtual void | setValidOptions (const std::string &pValidOptions, bool pValidate=true) |
| Sets single-character valid input strings to the input. This. | |
| virtual void | setValidOptions (const std::map< std::string, std::string > &pValidOptions, bool pValidate=true) |
| Sets all the strings that may be typed into the input. | |
| virtual void | addValidOption (const std::string &pValidOption, const std::string &pRightLabelText="", bool pValidate=true) |
| Adds a string to the set of valid strings that can be typed. | |
| virtual void | getValidOptions (std::map< std::string, std::string > &pValidOptions) const |
| Returns the collection of valid input strings that can be typed. | |
| std::string | getValidOptionStrings (const eMLIF &pMLIF=eMLIF_COMMA_SEP) const |
| Get the valid input strings formatted. | |
| void | getValidOptionStrings (std::set< std::string > &pValidOptionStrings) const |
| Returns a set of all the valid input strings currently set. | |
| virtual bool | hasValidOptionString (const std::string &pStr) const |
| Returns whether or not a string exists in the input's set of. | |
| virtual std::string | getValidOptionHelpText (const std::string &pInput) const |
| Returns the help text for one of the valid input strings. If. | |
| virtual void | clearValidOptions () |
| Clears the set of valid strings that can be typed into the. | |
| virtual bool | autoFillFromValidOptions (bool pRefresh=false) |
| For a text input, this will try to auto-fill the input based. | |
| virtual void | setForceUpper (bool pForceUpper) |
| Toggles the option to force text to be upper-case. | |
| virtual bool | getForceUpper () const |
| Returns the option for forcing text to upper-case. | |
| virtual void | setAllowBlank (bool pAllowBlank) |
| Sets whether or not to allow a blank value. | |
| virtual bool | getAllowBlank () const |
| Returns the option for allowing a blank value. | |
| virtual void | setExtendedHelp (const std::string &pExtendedHelp) |
| Sets the "extended" help text for the input (this can be as. | |
| virtual std::string | getExtendedHelp () const |
| Returns the extended help set in the input. | |
| virtual void | setExtendedHelpColor (e_cxColors pColor) |
| Sets the color to use for the extended help message. | |
| virtual e_cxColors | getExtendedHelpColor () const |
| Returns the color used for the extended help message. | |
| virtual void | setExtendedHelpAttribute (attr_t pAttr) |
| Sets the attribute to use for the extended help message. | |
| virtual attr_t | getExtendedHelpAttribute () const |
| Returns the attribute used for the extended help message. | |
| virtual void | autoGenerateExtendedHelp (bool pAutoGenerateExtendedHelp) |
| Enables or disables automatic generation of the extended help. | |
| virtual bool | autoGenerateExtendeHelp () const |
| Returns whether or not the extended help text will be. | |
| virtual void | setExtendedHelpKey (int pKey) |
| Sets a single key to be used to display the extended help. | |
| virtual void | addExtendedHelpKey (int pKey) |
| Adds an additional key to be used to display the extended help. | |
| virtual void | setExtendedHelpKeys (const std::set< int > &pKeys) |
| Sets the keys to be used to display the extended help. | |
| virtual std::set< int > | getExtendedHelpKeys () const |
| Returns the keys currently set up to display extended help. | |
| virtual std::string | getExtendedHelpKeyStrings () const |
| Returns a comma-separated list of strings representing the. | |
| virtual void | clearExtendedHelpKeys () |
| Removes all extended help keys. | |
| virtual void | setUseExtendedHelpKeys (bool pUseExtendedHelpKey) |
| Toggles whether or not to use the extended help keys. | |
| virtual bool | getUseExtendedHelpKeys () const |
| Returns whether the extended help keys are set to be used. | |
| virtual bool | keyIsExtendedHelpKey (int pKey) const |
| Returns whether or not a key is set up as an extended help key. | |
| virtual void | setShowRightLabel (bool pShowRightLabel) |
| Sets whether or not to show the label to the right of the input. | |
| virtual bool | getShowRightLabel () const |
| Returns whether or not the label to the right of the input. | |
| virtual void | setRightLabelOffset (int pOffset, bool pRefresh=false) |
| Sets the horizontal distance of the right label from the right. | |
| virtual int | getRightLabelOffset () const |
| Returns the offset of the right label from the right edge of. | |
| virtual int | getRightLabelTop () const |
| Returns the top row of the right label window. | |
| virtual int | getRightLabelLeft () const |
| Returns the leftmost column of the right label window. | |
| virtual int | getRightLabelBottom () const |
| Returns the bottom row of the right label window. | |
| virtual int | getRightLabelRight () const |
| Returns the rightmost column of the right label window. | |
| virtual int | getRightLabelHeight () const |
| Returns the height of the right label window. | |
| virtual int | getRightLabelWidth () const |
| Returns the width of the right label window. | |
| virtual void | setRightLabelWidth (int pWidth, bool pRefresh=false) |
| Sets the width of the right label. | |
| virtual void | setRightLabelHeight (int pHeight, bool pRefresh=false) |
| Sets the height of the right label. | |
| virtual void | resizeRightLabel (int pHeight, int pWidth, bool pRefresh=false) |
| Re-sizes the right label. | |
| virtual void | setRightLabel (const std::string &pText, bool pRefresh=false) |
| Sets the text of the right label. | |
| virtual void | setRightLabel (int pOffset, const std::string &pText, bool pRefresh=false) |
| Sets the offset & the text of the right label. | |
| virtual std::string | getRightLabel () const |
| Returns the text of the right label. | |
| virtual void | getRightLabelSize (int &pHeight, int &pWidth) |
| Returns the size of the right label. | |
| virtual e_cxColors | getRightLabelColor () const |
| Returns the color used for the right label. | |
| virtual void | setRightLabelColor (e_cxColors pColor) |
| Sets the color to use for the right label. | |
| virtual void | setRightLabelAttr (attr_t pAttr) |
| Sets the ncurses attribute for the right label message. | |
| virtual void | setMaxInputLength (int pLength) |
| Sets the maximum text length that can be accepted by the input. | |
| virtual int | getMaxInputLength () const |
| Returns the currently-set maximum input length. | |
| virtual eInputErrors | getErrorState () const |
| Returns the current error state of the input. This can be. | |
| virtual void | setErrorState (eInputErrors pErrorState) |
| Sets the error state for the input. This can be one of the. | |
| virtual bool | getUseClearKey () const |
| Returns whether or not the clear key will be used. | |
| virtual void | setUseClearKey (bool pUseClearKey) |
| Sets whether or not the clear key should be used. | |
| virtual void | additionalOnClear () |
| This function is called when the user clears the input. This. | |
| virtual bool | rightLabelEnabled () const |
| Returns whether or not the right label window is enabled. | |
| bool | validatorFunctionIsSet () const |
| Returns whether or not the validator function is set (if. | |
Public Member Functions inherited from cx::cxWindow | |
| 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. | |
| 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. | |
| 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. | |
| 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, 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. | |
| 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. | |
| 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. | |
| 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. | |
| cxWindow (const cxWindow &pThatWindow) | |
| Copy constructor. | |
| virtual | ~cxWindow () |
| virtual void | centerHoriz (bool pRefresh=true) |
| Centers the window horizontally on the screen. | |
| virtual void | alignHoriz (eHPosition pPosition, bool pRefresh=true) |
| Aligns the window horizontally on the screen. | |
| virtual void | centerVert (bool pRefresh=true) |
| Centers the window vertically on the screen. | |
| virtual void | alignVert (eVPosition pPosition, bool pRefresh=true) |
| Aligns the window vertically on the screen. | |
| virtual void | center (bool pRefresh=true) |
| Centers the window on the screen. | |
| virtual std::string | getTitle () const |
| Accessor for title text - Returns the first string in the. | |
| virtual void | setTitle (const std::string &pTitle, bool pRefreshTitle=true) |
| Setter for the title text - This sets the first string in the. | |
| std::string | getStatus () const |
| Accessor for the status line text. | |
| virtual void | setStatus (const std::string &pStatus, bool pRefreshStatus=true) |
| Mutator for the status line text. | |
| std::string | getMessage () const |
| Returns the message that appears in the window, concatenating all message lines together. | |
| virtual void | setMessage (const std::string &pMessage) |
| Sets the text that appears within the window. | |
| virtual void | addMessageLineBelow (const std::string &pLine) |
| Adds a line to the message to be displayed in the window,. | |
| virtual void | addMessageLinesBelow (const std::vector< std::string > &pLines) |
| Adds lines to the message below the current message text. | |
| virtual void | addMessageLinesBelow (const std::list< std::string > &pLines) |
| Adds lines to the message below the current message text. | |
| virtual void | addMessageLinesBelow (const std::deque< std::string > &pLines) |
| Adds lines to the message below the current message text. | |
| virtual void | addMessageLineAbove (const std::string &pLine) |
| Adds a line to the message to be displayed in the window,. | |
| virtual void | addMessageLinesAbove (const std::vector< std::string > &pLines) |
| Adds lines to the message above the current message text. | |
| virtual void | addMessageLinesAbove (const std::list< std::string > &pLines) |
| Adds lines to the message above the current message text. | |
| virtual void | addMessageLinesAbove (const std::deque< std::string > &pLines) |
| Adds lines to the message above the current message text. | |
| virtual void | setMessageLines (const std::vector< std::string > &pLines) |
| Sets the message lines in the window. | |
| virtual void | setMessageLines (const std::list< std::string > &pLines) |
| Sets the message lines in the window. | |
| virtual void | setMessageLines (const std::deque< std::string > &pLines) |
| Sets the message lines in the window. | |
| virtual void | removeMessageLine (unsigned pIndex) |
| Removes a line from the text inside the window (by index). | |
| virtual void | setMessageLine (unsigned pIndex, const std::string &pLine) |
| Modifies one of the lines displayed in the window. | |
| void | setHorizTitleAlignment (eHPosition pHAlignment) |
| Sets the horizontal alignment of the title text. | |
| eHPosition | getHorizTitleAlignment () const |
| Accessor for the title text alignment. | |
| void | setHorizMessageAlignment (eHPosition pHAlignment) |
| Sets the horizontal alignment of the message text. | |
| eHPosition | getHorizMessageAlignment () const |
| Accessor for the horizontal message text alignment. | |
| void | setHorizStatusAlignment (eHPosition pHAlignment) |
| Sets the horizontal alignment of the status text. | |
| eHPosition | getHorizStatusAlignment () const |
| Accessor for the horizontal status text alignment. | |
| void | setVerticalMessageAlignment (eVPosition pVAlignment) |
| Sets the vertical alignment of the message text. | |
| eVPosition | getVerticalMessageAlignment () const |
| Accessor for the vertical message text alignment. | |
| void | setExtTitleWindow (cxWindow *pWindow, bool pRefreshTitle=true) |
| Sets an external cxWindow object to be used for the title, rather. | |
| cxWindow * | getExtTitleWindow () const |
| Accessor for the external title window pointer. | |
| void | setExtStatusWindow (cxWindow *pWindow, bool pRefreshStatus=true) |
| Sets an external cxWindow object to be used for status, rather. | |
| cxWindow * | getExtStatusWindow () const |
| Accessor for the external status window pointer. | |
| bool | isHidden () const |
| Returns whether or not the window is hidden. | |
| virtual long | setFocus (bool pShowSelf=true, bool pBringToTop=true, bool pShowSubwindows=true) |
| Alias for showModal() | |
| virtual void | setFocusColors () |
| Turns on the ncurses attribute A_REVERSE for the window to. | |
| virtual void | setFocusColors (attr_t pAttr) |
| Turns on the ncurses attribute pAttr for the window to. | |
| virtual void | unSetFocusColors () |
| Disables focus for this window and unhighlights the message. | |
| virtual void | unSetFocusColors (attr_t pAttr) |
| Disables focus for this window and un-highlights the message (using pAttr) | |
| virtual void | bringToBottom (bool pRefresh=false) |
| Puts the window on the bottom of all other windows. | |
| virtual bool | isOnTop () const |
| Returns whether the window is on top of all other windows. | |
| virtual bool | isOnBottom () const |
| Returns whether the window is on the bottom of all other windows. | |
| void | touchWindow () |
| Marks the window's entire content as dirty so that the next. | |
| virtual void | drawBorder (int pRow, int pCol, int pHeight, int pWidth, bool pTop=true, bool pBottom=true, bool pLeft=true, bool pRight=true) |
| Draws the border (based on the border style) | |
| virtual void | drawBorder (int pHeight, int pWidth) |
| Draws a box in the window. | |
| virtual void | drawBorder () |
| Draws a box for the window border. | |
| virtual int | top () const |
| Returns the top row of the window. | |
| virtual int | centerRow () const |
| Returns the center row of the window. | |
| virtual int | bottom () const |
| Returns the bottom row of the window. | |
| virtual int | left () const |
| Returns the left column of the window. | |
| virtual int | centerCol () const |
| Returns the center column of the window. | |
| virtual int | right () const |
| Returns the right column of the window. | |
| virtual int | width (int pWidth) |
| Changes the width of the window. | |
| virtual int | width () const |
| Returns the width of the window. | |
| virtual int | height (int pHeight) |
| Changes the height of the window. | |
| virtual int | height () const |
| Returns the height of the window. | |
| virtual void | getRect (int &pTop, int &pLeft, int &pBottom, int &pRight) |
| Returns the coordinates of the rectangle defining the window. | |
| virtual bool | pointIsInWindow (int pY, int pX) const |
| Returns whether a screen location is in the window (including. | |
| virtual bool | pointIsInTitle (int pY, int pX) const |
| Returns whether a screen location is in the title of the window. | |
| virtual void | getSize (int &pHeight, int &pWidth) |
| Returns the height & width of the window. | |
| virtual bool | moveRelative (int pVerticalOffset, int pHorizOffset, bool pRefresh=true) |
| Changes the window's position via vertical & horizontal offsets. | |
| unsigned | numSubWindows () |
| Returns the number of subwindows in this window. | |
| void | setSubWinMessage (unsigned pIndex, const std::string &pMessage) |
| Sets the message of one of the subwindows (by index). | |
| void | setSubWinMessage (const std::string &pTitle, const std::string &pMessage) |
| Sets the message of one of the subwindows (by title). | |
| eBorderStyle | getBorderStyle () const |
| Returns the border style. | |
| bool | hasBorder () const |
| Does this window have a border? | |
| void | setParent (cxWindow *pNewParent) |
| Changes the pointer to the parent window; changes the parent window. | |
| virtual void | dump (std::string &pResult) |
| Returns a string containing all the characters. | |
| virtual void | showSubwindows (bool pBringToTop=true, bool pShowSubwindows=true) |
| Shows the subwindows for the window. | |
| cxWindow & | operator= (const cxWindow &pThatWindow) |
| Assignment operator. | |
| 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. | |
| bool | getHotkeyHighlighting () const |
| Returns whether hotkey attributes are used when writing the message. | |
| virtual bool | isEnabled () const |
| Returns whether or not the window is enabled. | |
| virtual bool | getDisableCursorOnShow () const |
| Returns whether or not the window will disable. | |
| virtual bool | getExitOnMouseOutside () const |
| Returns whether the window exits its modal input loop when. | |
| virtual void | setExitOnMouseOutside (bool pExitOnMouseOutside) |
| Sets whether the window should exit its modal input loop. | |
| virtual int | getLastKey () const |
| Returns the last key pressed by the user (for showModal(), etc.) | |
| virtual bool | lastKeyWasMouseEvt () const |
| Returns whether or not the last keypress was a mouse event. | |
| virtual void | getLastMouseEvtCoords (int &pY, int &pX) |
| Returns the coordinates of the last mouse event in the window. | |
| virtual bool | getChangeColorsOnFocus () const |
| Returns whether the window will change. | |
| virtual void | setChangeColorsOnFocus (bool pChangeColorsOnFocus) |
| Sets whether colors should change when focus. | |
| virtual void | setOnFocusFunction (const std::shared_ptr< cxFunction > &pFunction) |
| Sets the window's "on focus" function. | |
| virtual void | setOnFocusFunction (funcPtr4 pFunction, void *p1, void *p2, void *p3, void *p4, bool pUseVal=false, bool pExitAfterRun=false) |
| Sets the "on focus" function pointer. | |
| virtual void | setOnFocusFunction (funcPtr2 pFunction, void *p1, void *p2, bool pUseVal=false, bool pExitAfterRun=false) |
| Sets the "on focus" function pointer. | |
| virtual void | setOnFocusFunction (funcPtr0 pFunction, bool pUseVal=false, bool pExitAfterRun=false) |
| Sets the "on focus" function pointer. | |
| virtual void | setOnLeaveFunction (const std::shared_ptr< cxFunction > &pFunction) |
| Sets the window's "on leave" function. | |
| virtual void | setOnLeaveFunction (funcPtr4 pFunction, void *p1, void *p2, void *p3, void *p4) |
| Sets the "on leave" function pointer. | |
| virtual void | setOnLeaveFunction (funcPtr2 pFunction, void *p1, void *p2) |
| Sets the "on focus" function pointer. | |
| virtual void | setOnLeaveFunction (funcPtr0 pFunction) |
| Sets the "on focus" function pointer. | |
| virtual bool | runOnLeaveFunction (std::string *pFunctionRetval=nullptr) |
| Runs the onLeave function, if it's set. However, if the last. | |
| virtual void | toggleOnFocusFunction (bool pRunOnFocus) |
| Sets whether or not the onFocus function should run. | |
| virtual void | toggleOnLeaveFunction (bool pRunOnLeave) |
| Sets whether or not the onLeave function should run. | |
| virtual bool | onFocusFunctionEnabled () const |
| Returns whether or not the onFocus function is set to run. | |
| virtual bool | onLeaveFunctionEnabled () const |
| Returns whether or not the onLeave function is set to run. | |
| virtual const std::shared_ptr< cxFunction > & | getOnFocusFunction () const |
| Accessor for the onFocus function. | |
| virtual const std::shared_ptr< cxFunction > & | getOnLeaveFunction () const |
| Accessor for the onLeave function. | |
| virtual bool | isModal () const |
| Returns whether or not the window is currently. | |
| virtual void | clearKeyFunctionByPtr (funcPtr4 pFunction) |
| Removes a keypress function pointer. | |
| virtual void | clearKeyFunctionByPtr (funcPtr2 pFunction) |
| Removes a keypress function pointer. | |
| virtual void | clearKeyFunctionByPtr (funcPtr0 pFunction) |
| Removes a keypress function pointer. | |
| virtual bool | hasKeyFunction (int pKey) const |
| Returns whether an external function exists for a keypress. | |
| virtual bool | setMouseFunction (int pMouseState, const std::shared_ptr< cxFunction > &pFunction) |
| Sets a function to be called for a certain mouse state. | |
| virtual bool | setMouseFunction (int pMouseState, funcPtr4 pFunction, void *p1, void *p2, void *p3, void *p4, bool pUseReturnVal=false, bool pExitAfterRun=false, bool pRunOnLeaveFunction=true) |
| Sets a function to be called for a certain mouse state. | |
| virtual bool | setMouseFunction (int pMouseState, funcPtr2 pFunction, void *p1, void *p2, bool pUseReturnVal=false, bool pExitAfterRun=false, bool pRunOnLeaveFunction=true) |
| Sets a function to be called for a certain mouse state. | |
| virtual bool | setMouseFunction (int pMouseState, funcPtr0 pFunction, bool pUseReturnVal=false, bool pExitAfterRun=false, bool pRunOnLeaveFunction=true) |
| Sets a function to be called for a certain mouse state. This. | |
| virtual void | clearMouseFunction (int pMouseState) |
| Removes a function pointer for a mouse event so that it will. | |
| virtual void | clearMouseFunctions () |
| Clears the list of external functions fired by mouse events. | |
| virtual bool | hasMouseFunction (int pMouseState) const |
| Returns whether an external function exists for a mouse event. | |
| std::map< int, std::shared_ptr< cxFunction > >::iterator | keyFunctions_begin () |
| Returns a begin iterator to the map of cxFunction pointers. | |
| std::map< int, std::shared_ptr< cxFunction > >::iterator | keyFunctions_end () |
| Returns an end iterator to the map of cxFunction pointers. | |
| virtual void | getFunctionKeyStrings (std::vector< std::string > &pKeys) const |
| Populates a collection of strings representing the keys. | |
| virtual void | getFunctionKeys (std::vector< int > &pKeys) const |
| Populates a collection with integers representing the keys. | |
| virtual void | setShowSubwinsForward (bool pShowSubwinsForward) |
| Toggles the order in which subwindows will be shown. | |
| virtual bool | getShowSubwinsForward () const |
| Returns whether or not the subwindows will be shown. | |
| virtual void | setShowSelfBeforeSubwins (bool pShowSelfBeforeSubwins) |
| Sets whether the window will show itself before. | |
| virtual bool | getShowSelfBeforeSubwins () const |
| Returns whether or not the window will show itself before. | |
| virtual long | getReturnCode () const |
| Returns the return code set by the last call to. | |
| virtual bool | addTitleString (int pHPos, const std::string &pStr, bool pRefreshTitle=false) |
| Adds/sets a string to appear in the title at. | |
| virtual std::string | getTitleString (int pHPos) const |
| Returns the title string set at a given horizontal position. | |
| virtual std::map< int, std::string > | getTitleStrings () const |
| Returns the map of title strings for the window. | |
| virtual void | getTitleStrings (std::map< int, std::string > &pTitleStrings) const |
| Returns the map of title strings for the window (using an. | |
| virtual void | setTitleStrings (const std::map< int, std::string > &pTitleStrings) |
| Sets all the title strings via a map of horizontal. | |
| virtual void | removeTitleString (int pHPos) |
| Removes a title string at a given horizontal position. | |
| virtual void | removeTitleStrings () |
| Removes all title strings. | |
| virtual bool | addStatusString (int pHPos, const std::string &pStr, bool pRefreshStatus=false) |
| Adds/sets a string to appear in the status line at. | |
| virtual std::string | getStatusString (int pHPos) const |
| Returns the status string set at a given horizontal position. | |
| virtual std::map< int, std::string > | getStatusStrings () const |
| Returns the map of status strings for the window. | |
| virtual void | getStatusStrings (std::map< int, std::string > &pStatusStrings) const |
| Returns the map of status strings for the window (using an. | |
| virtual void | setStatusStrings (const std::map< int, std::string > &pStatusStrings) |
| Sets all the status strings via a map of horizontal. | |
| virtual void | removeStatusString (int pHPos) |
| Removes a status string at a given horizontal position. | |
| virtual void | removeStatusStrings () |
| Removes all status strings. | |
| virtual void | removeQuitKeys () |
| Removes all quit keys. | |
| virtual void | removeExitKeys () |
| Removes all exit keys. | |
| virtual bool | hasExitKey (int pKey) const |
| Returns whether or not a key exists in the. | |
| virtual bool | hasQuitKey (int pKey) const |
| Returns whether or not a key exists in the. | |
| virtual void | getQuitKeyStrings (std::vector< std::string > &pKeys) const |
| Populates a collection of strings representing the keys. | |
| virtual std::string | getQuitKeyListString () const |
| Returns a string containing a comma-separated list of the. | |
| virtual void | getExitKeyStrings (std::vector< std::string > &pKeys) const |
| Populates a collection of strings representing the keys. | |
| virtual std::string | getExitKeyListString () const |
| Returns a string containing a comma-separated list of the. | |
| virtual std::map< int, bool > | getQuitKeys () const |
| Returns the keys that will make the window quit its input. | |
| virtual std::map< int, bool > | getExitKeys () const |
| Returns the keys that will make the window exit is input. | |
| void | toggleMessage (bool pDrawMessage) |
| Sets whether or not to draw the message area (the area within. | |
| void | toggleTitle (bool pDrawTitle) |
| Sets whether or not to draw the title. | |
| void | toggleStatus (bool pDrawStatus) |
| Sets whether or not to draw the status line. | |
| bool | messageWillDraw () const |
| Returns whether the message will draw or not. | |
| bool | titleWillDraw () const |
| Returns whether the title will draw or not. | |
| bool | statusWillDraw () const |
| Returns whether the status line will draw or not. | |
| void | toggleSpecialChars (bool pDrawSpecialChars) |
| Sets whether or not to draw the "special" characters (these are. | |
| bool | specialCharsWillDraw () const |
| Returns whether the "special" characters will be drawn or. | |
| virtual void | drawTitle () |
| Writes the title line. | |
| virtual void | drawStatus () |
| Writes the status line. | |
| virtual void | drawMessage () |
| Writes the message text (in the area within the borders) | |
| virtual void | drawSpecialChars () |
| Writes the set of "special" characters to the window. | |
| virtual void | setReturnCode (const long &pReturnCode) |
| Explicitly sets the member return code for the window. | |
| virtual void | setMessageColor (e_cxColors pColor) |
| Returns the message color. | |
| virtual void | setTitleColor (e_cxColors pColor) |
| Sets the title color. | |
| virtual void | setStatusColor (e_cxColors pColor) |
| Sets the color of the status line at bottom of window. | |
| virtual void | setBorderColor (e_cxColors pColor) |
| Sets the color of the window border. | |
| virtual bool | hasAttr (e_WidgetItems pItem, attr_t pAttr) |
| Returns whether an attribute is set for a widget item. | |
| bool | getLeaveNow () const |
| Returns whether or not something told the window to leave now. | |
| std::string | getName () const |
| virtual void | setName (const std::string &pName) |
| Sets the name of the window. The name is an alternative means. | |
| bool | mouseEvtWasInWindow () const |
| Returns whether the current mouse information stored in the. | |
| virtual bool | mouseEvtWasInTitle () const |
| Returns whether the current mouse information stored in the. | |
| virtual void | doMouseBehavior () |
| Triggers the window's mouse event behavior. This method can. | |
| virtual void | doMouseBehavior (int pMouseY, int pMouseX) |
| Triggers the window's mouse event behavior. Also sets the. | |
| std::shared_ptr< cxFunction > | getKeyFunction (int pKey) const |
| Returns a cxFunction pointer for a key. | |
| std::shared_ptr< cxFunction0 > | getKeyFunctionAsFunction0 (int pKey) const |
| Returns a cxFunction pointer for a key, casted to a cxFunction0. | |
| std::shared_ptr< cxFunction2 > | getKeyFunctionAsFunction2 (int pKey) const |
| Returns a cxFunction pointer for a key, casted to a cxFunction2. | |
| std::shared_ptr< cxFunction4 > | getKeyFunctionAsFunction4 (int pKey) const |
| Returns a cxFunction pointer for a key, casted to a cxFunction4. | |
| bool | mouseEvtWasButtonEvt () const |
| Returns whether or not the mouse event read in mMouse was. | |
| bool | mouseButton1Pressed () const |
| Returns whether or not the first mouse button was pressed. | |
| bool | mouseButton1Released () const |
| Returns whether or not the first mouse button was released. | |
| bool | mouseButton1Clicked () const |
| Returns whether or not the first mouse button was clicked. | |
| bool | mouseButton1DoubleClicked () const |
| Returns whether or not the first mouse button was double-clicked. | |
| bool | mouseButton2Clicked () const |
| Returns whether or not the second mouse button was clicked. | |
| bool | mouseButton2DoubleClicked () const |
| Returns whether or not the second mouse button was double-clicked. | |
| bool | mouseButton3Clicked () const |
| Returns whether or not the second mouse button was clicked. | |
| virtual void | mouseButton1Click (int pY, int pX) |
| Tells the window that mouse button 1 was clicked at a certain. | |
| virtual void | mouseButton2Click (int pY, int pX) |
| Tells the window that mouse button 2 was clicked at a certain. | |
| virtual void | mouseButton3Click (int pY, int pX) |
| Tells the window that mouse button 3 was clicked at a certain. | |
| std::string | getString (int pRow, int pCol, int pNumber) |
| Get the contents of a portion of the window. (for debugging/testing) | |
| void | info () |
| Display information about a window (for debugging/testing) | |
| virtual void | toggleBorderTop (bool pToggle) |
| Sets whether or not to display the top border. | |
| virtual void | toggleBorderBottom (bool pToggle) |
| Sets whether or not to display the bottom border. | |
| virtual void | toggleBorderLeft (bool pToggle) |
| Sets whether or not to display the left border. | |
| virtual void | toggleBorderRight (bool pToggle) |
| Sets whether or not to display the right border. | |
| 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. | |
| virtual void | removeSpecialChar (int pY, int pX) |
| Removes a character from the set of special characters (by. | |
| virtual void | clearSpecialChars () |
| Clears the collection of special characters. | |
| virtual bool | functionExistsForLastMouseState () const |
| Returns whether an external function pointer exists for the. | |
| int | getMouseState () const |
| Returns the current mouse state as it was last captured by the. | |
| std::string | getMouseStateStr () const |
| Returns a string version of the current mouse state as it was. | |
| virtual e_cxColors | getItemColor (e_WidgetItems pItem) const |
| Returns the color of one of the items in a window. | |
Public Member Functions inherited from cx::cxObject | |
| cxObject () | |
| virtual | ~cxObject () |
| virtual void | beep () |
Static Public Member Functions | |
| static std::string | clearInput (void *theInput, void *unused) |
| Clears the value of a cxMultiLineInput. | |
Static Public Member Functions inherited from cx::cxObject | |
| static bool | UseColors () |
| static void | UseColors (bool useIt) |
| static bool | UseBeeps () |
| static void | UseBeeps (bool useIt) |
Protected Member Functions | |
| void | copyCxMultiLineInputStuff (const cxMultiLineInput *pThatInput) |
| Copies another cxMultiLineInput's member variables. | |
| long | doInputLoop (bool pShowInputs, bool &pRunOnLeaveFunction) |
| Handles the input loop. Returns cxID_QUIT or cxID_EXIT,. | |
| bool | focusFunctionsWillRun () const |
| Returns whether the onFocus and onLeave functions will be run. | |
| void | runFocusFunctions (bool pRunFocusFunctions) |
| Enables or disables the onFocus and onLeave functions. | |
| void | setParentForm (cxForm *pParentForm) |
| Sets the parent cxForm pointer. | |
| bool | searchParentFormsForFKey (int pFunctionKey, bool pIncludeNavigationalKeys=false) |
| Searches the parent cxForm (if mParentForm isn't nullptr) | |
| void | freeInputs () |
| Frees the memory used by the single-line inputs. | |
| virtual bool | handleFunctionForLastKey (bool *pFunctionExists=nullptr, bool *pRunOnLeaveFunction=nullptr) override |
| Looks for a function tied to the last keypress and. | |
| virtual void | enableAttrs (WINDOW *pWin, e_WidgetItems pItem) override |
| Enables the attributes for one of the m*Attrs sets for an ncurses window. | |
| virtual void | disableAttrs (WINDOW *pWin, e_WidgetItems pItem) override |
| Disables the attributes for one of the m*Attrs sets for an ncurses window. | |
Protected Member Functions inherited from cx::cxWindow | |
| virtual void | reCreatePanel () |
| Creates mPanel (by calling new_panel()), then sets up. | |
| void | freeWindow () |
| Frees the memory used by the ncurses window and. | |
| 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. | |
| virtual void | removeAllSubwindows () |
| Removes all subwindow pointers. | |
| virtual void | addSubwindow (cxWindow *pSubWindow) |
| Adds a subwindow to the window. Subwindows of a. | |
| virtual void | removeSubWindow (const cxWindow *pSubWindow) |
| Removes a window from the subwindow list. | |
| virtual void | setElementColor (short &pColorPair, attr_t &pElementAttr, e_cxColors pColor) |
| Sets the color (and attribute, if necessary) of a color element. | |
| 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. | |
| virtual void | copyCxWinStuff (const cxWindow *pThatWindow, bool pRecreateWin=true) |
| Makes a copy of a cxWindow's member variables. | |
| 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. | |
| virtual bool | handleFunctionForLastMouseState (bool *pFunctionExists=nullptr, bool *pRunOnLeaveFunction=nullptr) |
| Looks for a function tied to the last mouse state captured. | |
| void | setKeyFunctions (const cxWindow &pWindow) |
| Returns whether or not a mouse event location is within. | |
| void | setFocusFunctions (const cxWindow &pWindow) |
| Re-sets the onFocus and onLeave functions from another. | |
| bool | parentIsCxPanel () const |
| Returns whether or not the parent window, if there is one, is. | |
| bool | parentIsCxForm () const |
| Returns whether or not the parent window, if there is one, is. | |
| bool | parentIsCxNotebook () const |
| Returns whether or not the parent window, if there is one, is. | |
| cxWindowPtrContainer::const_iterator | subWindows_begin () const |
| Returns a const iterator to the first subwindow. | |
| cxWindowPtrContainer::const_iterator | subWindows_end () const |
| Returns a const iterator to the one past the last subwindow. | |
| cxWindowPtrContainer::const_reverse_iterator | subWindows_rbegin () const |
| Returns a const reverse begin iterator for the subwindow collection. | |
| cxWindowPtrContainer::const_reverse_iterator | subWindows_rend () const |
| Returns a const reverse end iterator for the subwindow collection. | |
| bool | onFocusFunctionIsSet () const |
| Returns whether or not the onFocus function is set (if. | |
| bool | onLeaveFunctionIsSet () const |
| Returns whether or not the onLeave function is set (if. | |
Protected Attributes | |
| std::shared_ptr< cxFunction > | mValidatorFunction |
| This is the function to be run to validate. | |
| bool | mRunFocusFunctions = true |
| Whether or not to run the onFocus and onLeave functions. | |
Protected Attributes inherited from cx::cxWindow | |
| WINDOW * | mWindow = nullptr |
| Everything in the window is written here; this is an nCurses window structure. | |
| messageLineContainer | mMessageLines |
| Contains the text to be shown inside the window (note: the. | |
| std::map< std::pair< int, int >, chtype > | mSpecialChars |
| Contains "special" characters which are added to the window. | |
| std::set< attr_t > | mMessageAttrs |
| Message attributes. | |
| std::set< attr_t > | mTitleAttrs |
| Title attributes. | |
| std::set< attr_t > | mStatusAttrs |
| Status attributes. | |
| std::set< attr_t > | mBorderAttrs |
| Border attributes. | |
| std::set< attr_t > | mHotkeyAttrs |
| Hotkey attributes. | |
| std::map< std::pair< int, int >, attr_t > | mSpecialCharAttrs |
| Attributes for the "special" characters (which are added to. | |
| short | mMessageColorPair = eWHITE_BLUE |
| short | mTitleColorPair = eGRAY_BLUE |
| short | mStatusColorPair = eBROWN_BLUE |
| short | mBorderColorPair = eGRAY_BLUE |
| eHPosition | mHorizTitleAlignment = eHP_LEFT |
| eHPosition | mHorizMessageAlignment = eHP_LEFT |
| eHPosition | mHorizStatusAlignment = eHP_LEFT |
| eVPosition | mVerticalMessageAlignment = eVP_TOP |
| bool | mDrawMessage = true |
| bool | mDrawTitle = true |
| bool | mDrawStatus = true |
| bool | mDrawSpecialChars = true |
| std::shared_ptr< cxFunction > | mOnFocusFunction = nullptr |
| std::shared_ptr< cxFunction > | mOnLeaveFunction = nullptr |
| bool | mIsModal = false |
| bool | mLeaveNow = false |
| std::map< int, std::shared_ptr< cxFunction > > | mKeyFunctions |
| std::map< int, std::shared_ptr< cxFunction > > | mMouseFunctions |
| std::map< int, bool > | mQuitKeys |
| std::map< int, bool > | mExitKeys |
| bool | mHotkeyHighlighting |
Friends | |
| class | cxForm |
| class | cxInput |
Additional Inherited Members | |
Static Protected Attributes inherited from cx::cxObject | |
| static bool | useColors |
| Whether or not to use colors. | |
| static bool | useBeeps |
| Whether or not to enable beeping. | |
This class represents an input box that can have a height.
greater than 1. This class allows you to get text input from a user. The method showModal() makes the input appear on the screen and wait for input. showModal() also returns a return code, depending on the user's action. If the user pressed ESC, cxID_QUIT is returned to signify that the user quit out of the input and didn't want to do anything. If the user presses ENTER, cxID_EXIT is returned to signify that the value in the input should be used. getLastKey() can be called to get the last key typed by the user (see cxKeyDefines and the ncurses list of key definitions (man getch)).
By default, pressing the enter key anywhere in the input will exit the input, and when you call getValue() to get the value entered into the input, the text will all be concatenated together. You can change this behavior by calling setEnterAlwaysExits() with a parameter of false. In that situation, the enter key will go onto the next line, rather than exiting the input. Also, getValue() will append newline characters after each line so that the value will represent the text how it was entered. This is done so that the string can be formatted properly when used in other applications.
There is also a set of functions that may be set, that will be run at various times. The order of the functions is as follows:
Note that the functions used must have the following signatures:
Also, you can force an input never to be editable with the function setCanBeEditable(). If you call this with false, then the input can never be set editable, even with a call to setInputOption() with a parameter of eINPUT_EDITABLE.
cxMultiLineInput iInput(nullptr, 0, 0, 10, "Text:");
iInput.setValue("Some text for the input to hold");
iInput.getValue(); // Returns "Some text for the input to hold"
iInput.setFocus(); // Can only display "Some " in the input, since the width is 10
Setting a value longer than the input can display can cause some behavior that you may not expect, however. If you set a value too long for the input to display and then call setFocus(), the input will leave focus as soon as the user types something, because the input is full. However, being able to store more than the input can display can be useful if you are using a cxInput for display purposes only, and you still need to be able to store the entire value.
By default, when the user presses any function keys that aren't assigned to any functions, cxInput will exit its input loop so that calling code can process the function keys. This can be changed with a call to trapNonAssignedFKeys(). However, when a cxMultiLineInput is used in a cxForm, it is recommended that the default not be changed, because a cxForm needs to be able to process function keys for its own lists of function pointers.
setTimeout() lets you set the amount of idle time (in seconds) that is allowed before the input quits out of its input loop and leaves focus.
cxMultiLineInput can also do some input validation. Through the use of setInputType(), setRangeLowInt(), setRangeHighInt(), setRangeLowDouble(), setRangeHighDouble(), addValidOptions(), setValidOptions(), addValidOption(), setForceUpper(), and setAllowBlank(), you can specify how to validate the input. cxMultiLineInput has a built-in validation function that performs this validation (this can be changed with setValidatorFunction() if that is really desired). Alternatively, there is a function called inputValidator() that can be overridden in deriving classes to perform input validation. The built-in validator can be toggled on or off using useBuiltInValidator().
cxMultiLineInput can also contain an "extended" help string and display it with a keypress, which defaults to F1 (that can be changed with setExtendedHelpkey()). The extended help text can be set using setExtendedHelp().
Visual represenation: +-Form Title--------------------------—+ | | | Label:__________ RightLabel | (Note: When you press F1, a new message | | box pops up with info, aka +Status Line--------------------------—+ extended help.)
|
explicit |
Default constructor
| pParentWindow | Pointer to parent window; defaults to nullptr |
| pRow | Y location of input window (upper-left corner) |
| pCol | X location of input window (upper-left corner) |
| pHeight | Height of input window; defaults to 1 |
| pWidth | Width of input window; defaults to 80 |
| pLabel | Label of multi-line input; blank by default |
| pBorderStyle | The type of border to use - defaults to eBS_NOBORDER |
| pInputOption | Specifies the editability of the input. Defaults to eINPUT_EDITABLE. The enNputOptions enumeration is in the file cxInputOptions.h. |
| pInputType | Specifies the type of input (text, numeric floating point, or numeric whole). This defaults to eINPUT_TYPE_TEXT. |
| pExtValue | Pointer to external input value; defaults to nullptr |
| pRightLabelOffset | The distance between the right edge of the input and the right label. Defaults to 0. |
| pRightLabelHeight | The height of the label to the right of the input (defaults to 1) |
| pRightLabelHeight | The width of the label to the right of the input (defaults to 7 so that there is room for "Invalid" if validation is on and the user enters an invalid value) |
| pShowRightLabel | Whether or not to show the right label. Defaults to false. |
| cx::cxMultiLineInput::cxMultiLineInput | ( | const cxMultiLineInput & | pThatInput | ) |
Copy constructor
| pThatInput | Another cxMultiLineInput object to copy |
References cx::height(), cx::left(), cx::cxWindow::messageWillDraw(), cx::mNavKeys, setValue(), cx::cxWindow::toggleMessage(), cx::top(), and cx::width().
|
virtual |
Destructor
References freeInputs().
|
overridevirtual |
Adds an ncurses attribute to use for one of the items in the.
window (see the e_WidgetItems enumeration).
| pItem | The item to add the attribute for (see the e_WidgetItems enumeration). |
| pAttr | The ncurses atribute to add. |
Reimplemented from cx::cxWindow.
|
overridevirtual |
Adds a key that will cause the input to quit and return.
cxID_EXIT. Normally, if the key already exists
as a function key, it will not be added as an exit key.
| pKey | The key to add |
| pRunOnLeaveFunction | Whether or not to run the onLeave function when the input exits. Defaults to true. |
| pOverride | If true, then the key will be added as an exit key regardless if the key exists as a function key. This defaults to false. |
Reimplemented from cx::cxWindow.
References cx::cxWindow::addExitKey().
|
virtual |
Adds an additional key to be used to display the extended help.
| pKey | A key to be used to display the extended help |
Referenced by setExtendedHelpKey().
|
virtual |
This function is called when the user clears the input. This.
does nothing in cxMultiLineInput, but it can be overridden in
derived classes to add additional functionality when the user
clears the input.
Referenced by doInputLoop().
|
virtual |
Add a key to be considered a "navigational" key. The key will.
be added to the input's set of navigational keys (see the
description for hasNavKey()).
| pKey | The key to be added |
|
overridevirtual |
Adds a key that will cause the input to quit and return.
cxID_QUIT. Normally, if the key already exists
as a function key, it will not be added as an exit key.
| pKey | The key to add |
| pRunOnLeaveFunction | Whether or not to run the onLeave function when the input exits. Defaults to true. |
| pOverride | If true, then the key will be added as an exit key regardless if the key exists as a function key. This defaults to false. |
Reimplemented from cx::cxWindow.
References cx::cxWindow::addQuitKey().
|
virtual |
Adds a key to the list of keys that, when pressed, the input.
won't run the validator function.
| pKey | A key to add to the list of keys |
|
virtual |
Adds a string to the set of valid strings that can be typed.
into the input.
| pValidOption | The string to add to the set of valid strings |
| pRightLabelText | The text to use for the label to the right of the input. Defaults to a blank string. |
| pValidate | Whether or not to validate the text currently in the input against the valid option strings. Defaults to true. |
References getValue(), cx::cxWindow::isModal(), and setValue().
Referenced by cxMultiLineInputAutoGenerateHelpString(), cxMultiLineInputTextValidation(), cxMultiLineInputTextValidationAutoCompletion(), and cxMultiLineInputTextValidationNonBlankForceUpper().
|
virtual |
Adds single-character valid input strings to the input.
Each character in the string will be added as a separate valid
string that can be typed into the input. This type of
validation is used when the input type is set to
eINPUT_TYPE_TEXT.
| pValidOptions | A string containing characters that are valid inputs |
| pValidate | Whether or not to validate the text currently in the input against the valid option strings. Defaults to true. |
References getValue(), cx::cxWindow::isModal(), and setValue().
|
virtual |
For a text input, this will try to auto-fill the input based.
on the value currently set in the input and the valid input
strings set in the input. If a match is found, the input will
be filled with that value. If more than one match is found,
the input will be filled with the longest string that matches
all of them.
This returns whether or not the text in the input completely
matched any of the valid input strings. If there are none,
this will return true.
| pRefresh | Whether or not to refresh the input (defaults to false) |
References cx::eINPUT_TYPE_TEXT, getValue(), setRightLabel(), and setValue().
|
virtual |
Enables or disables automatic generation of the extended help.
text based on the collection of valid input strings.
| pAutoGenerateExtendedHelp | Whether or not to automatically generate the extended help text |
References cx::eINPUT_TYPE_TEXT, and cx::cxWindow::mIsModal.
Referenced by cxMultiLineInputAutoGenerateHelpString().
|
virtual |
Returns whether or not the extended help text will be.
automatically generated from the collection of valid input
strings.
|
overridevirtual |
Brings the window to the top.
| pRefresh | Whether to refresh the screen (defaults to true) |
Reimplemented from cx::cxWindow.
References cx::cxWindow::bringToTop(), and cx::updateWindows().
Referenced by show(), and showModal().
| bool cx::cxMultiLineInput::canBeEditable | ( | ) | const |
Returns whether the input can be editable.
|
overridevirtual |
Alias for clearValue() (this is here to overload the clear()
inherited from cxWindow).
| pRefresh | Whether or not to refresh the input (defaults to false) |
Reimplemented from cx::cxWindow.
References clearValue().
|
virtual |
Removes all extended help keys.
Referenced by setExtendedHelpKey(), and setExtendedHelpKeys().
|
static |
Clears the value of a cxMultiLineInput.
| theInput | A pointer to a cxMultiLineInput object |
| unused | Not used |
References setValue(), and show().
|
overridevirtual |
Removes a hotkey from the window so that it will not.
fire a function.
| pFunctionKey | The hotkey to remove |
Reimplemented from cx::cxWindow.
References cx::cxWindow::clearKeyFunction().
|
overridevirtual |
Clears the list of external functions fired by hotkeys.
Reimplemented from cx::cxWindow.
References cx::cxWindow::clearKeyFunctions().
|
virtual |
Un-sets the onKey function.
| void cx::cxMultiLineInput::clearValidatorFunction | ( | ) |
Un-sets the validator function.
References mValidatorFunction.
Referenced by setValidatorFunction(), setValidatorFunction(), setValidatorFunction(), and setValidatorFunction().
|
virtual |
Clears the set of valid strings that can be typed into the.
input.
|
virtual |
Clears the input value.
| pRefresh | Whether or not to refresh the input (defaults to false) |
Referenced by clear().
|
protected |
Copies another cxMultiLineInput's member variables.
| pThatInput | A pointer to another cxMultiLineInput to be copied |
References cx::cxWindow::copyCxWinStuff(), freeInputs(), cx::cxWindow::freeWindow(), getLabel(), cx::cxWindow::left(), move(), mRunFocusFunctions, setLabel(), setValue(), and cx::cxWindow::top().
Referenced by cx::cxComboBox::copyCxComboBoxStuff(), and operator=().
|
overridevirtual |
Returns the name of the cxWidgets class. This can be used to.
determine the type of cxWidgets object that deriving classes
derive from in applications.
Reimplemented from cx::cxWindow.
Reimplemented in cx::cxComboBox.
|
overrideprotectedvirtual |
Disables the attributes for one of the m*Attrs sets for an ncurses window.
If the m*Attrs collection is empty, this will disable the cxBase attributes
instead.
| pWindow | A pointer to the ncurses window for which to disable the attributes (will usually be mWindow). |
| pItem | The item type to retrieve attributes for - see the e_cxWidgetItems enumeration (defined in cxWidgetItems.h). |
Reimplemented from cx::cxWindow.
Referenced by setInputOption().
|
protected |
Handles the input loop. Returns cxID_QUIT or cxID_EXIT,.
depending on the user's input. This function is meant
not to be virtual, since it is specifically for
| pShowInputs | Whether or not to have the inputs show themselves before they do their input loops. |
| pRunOnLeaveFunction | This will contain a boolean value that will signify whether or not to run the onLeave function (which will be set false if the user presses a function key not set in the cxMultiLineInput object that the parent cxForm or any of its parent cxMultiForm objects have set). |
References additionalOnClear(), BACKSPACE, cx::cxID_EXIT, cx::cxID_QUIT, cx::eINPUT_READONLY, ENTER, ESC, getCursorLeftAlign(), cx::cxForm::getInputIndex(), getInputOption(), getLabel(), cx::cxWindow::getLeaveNow(), cx::cxWindow::getReturnCode(), getValue(), handleFunctionForLastKey(), cx::cxWindow::handleFunctionForLastMouseState(), cx::cxWindow::hasExitKey(), cx::cxWindow::hasQuitKey(), cx::cxInput::inputClearKey, isFull(), keyIsExtendedHelpKey(), cx::messageBox(), cx::cxWindow::mLeaveNow, cx::cxWindow::mouseEvtWasButtonEvt(), cx::cxWindow::mouseEvtWasInWindow(), cx::cxWindow::parentIsCxPanel(), cx::cxForm::setCurrentInput(), setCursorLeftAlign(), setLastKey(), cx::cxWindow::setReturnCode(), setValue(), SHIFT_TAB, show(), showModal(), and TAB.
Referenced by showModal().
|
overrideprotectedvirtual |
Enables the attributes for one of the m*Attrs sets for an ncurses window.
If the m*Attrs collection is empty, this will enable the cxBase attributes
instead.
| pWin | A pointer to the ncurses window for which to enable the attributes (will usually be mWindow). Note that this parameter is ignored, and each single-line input's mWindow is used instead. This parameter is here to override enableAttrs() from cxWindow. |
| pItem | The item type to retrieve attributes for - see the e_cxWidgetItems enumeration (defined in cxWidgetItems.h). |
Reimplemented from cx::cxWindow.
Referenced by setInputOption().
|
virtual |
Enables or disables the input loop.
If the input loop is disabled, you can still
call setFocus() and showModal() on the
input - the onFocus and onLeave functions
will still run, but the input won't
wait for user input.
| pDoInputLoop | Whether to enable or disable the input loop (true/false) |
| bool cx::cxMultiLineInput::enterAlwaysExits | ( | ) | const |
Returns whether the enter key always causes the input.
to exit.
|
overridevirtual |
Erases the window.
| pEraseSubwindows | Whether or not to erase the subwindows (defaults to true) |
Reimplemented from cx::cxWindow.
Reimplemented in cx::cxComboBox.
References cx::cxWindow::erase().
Referenced by cx::cxComboBox::erase().
|
overridevirtual |
Tells the input to exit the input loop now, with a return value.
of cxID_EXIT.
Reimplemented from cx::cxWindow.
References cx::cxWindow::exitNow().
Referenced by exitNow().
|
virtual |
After this is called, the code returned by showModal will.
be cxID_EXIT. Also, if the input is on a cxForm, the form
will go onto the next or previous input, depending on the
value of pMoveForward (via a call to setCurrentInput()).
| pMoveForward | If this is true, and the input is on a cxForm, the form will be told to go onto its next input; otherwise, the form will be told to go onto its previous input. |
References exitNow(), cx::cxForm::getInputIndex(), and cx::cxForm::setCurrentInput().
|
protected |
Returns whether the onFocus and onLeave functions will be run.
References mRunFocusFunctions.
|
protected |
Frees the memory used by the single-line inputs.
Referenced by copyCxMultiLineInputStuff(), and ~cxMultiLineInput().
|
virtual |
Returns the option for allowing a blank value.
|
overridevirtual |
Returns the set of ncurses attributes for a given item.
| pItem | The item to retrieve attributes for (see the e_WidgetItems enumeration). |
| pAttrs | This will contain the attributes for the item. |
Reimplemented from cx::cxWindow.
| bool cx::cxMultiLineInput::getAutoWrapAtBeginning | ( | ) | const |
Returns whether or not auto-wrapping of text.
moves the cursor to the beginning of the
next line.
References getCursorLeftAlign().
|
virtual |
Returns whether the cursor will be left-aligned when the.
input is shown modally.
Referenced by doInputLoop(), and getAutoWrapAtBeginning().
|
virtual |
Returns the current error state of the input. This can be.
one of the following values:
eNO_ERROR (no error)
eOUT_OF_RANGE (numeric out of range error)
eINVALID_VALUE (value is not in the list of valid strings)
eBLANK (the input is blank, and blank is not allowed)
eCUSTOM_VALIDATION_FAILED (custom validation failed - This is
a generic error that can be used by deriving classes if
any additional validation fails)
| bool cx::cxMultiLineInput::getExitOnBackspaceAtFront | ( | ) | const |
Returns whether the input will exit the input loop when the.
user presses backspace in the first input position.
| bool cx::cxMultiLineInput::getExitOnFull | ( | ) | const |
Returns whether the input will exit automatically when full.
|
virtual |
Returns the extended help set in the input.
|
virtual |
Returns the attribute used for the extended help message.
|
virtual |
Returns the color used for the extended help message.
|
virtual |
Returns the keys currently set up to display extended help.
|
virtual |
Returns a comma-separated list of strings representing the.
extended help keys for the input.
References cx::getKeyStr().
Referenced by cxMultiLineInputExtendedHelpKey().
|
inline |
Returns the pointer to the external variable storing user input
|
virtual |
Returns the option for forcing text to upper-case.
References getForceUpper().
Referenced by getForceUpper().
| int cx::cxMultiLineInput::getInputLen | ( | ) | const |
Returns the maximum length of input that can be accepted
|
virtual |
Returns the input option for the input (i.e., eINPUT_EDITABLE,.
eINPUT_READONLY)
References cx::eINPUT_READONLY, and getInputOption().
Referenced by doInputLoop(), getInputOption(), isEditable(), modalGetsKeypress(), resize(), and showModal().
| eInputTypes cx::cxMultiLineInput::getInputType | ( | ) | const |
Returns the input type. This is a member of the cxInputTypes.
enumeration (defines in cxInputTypes.h) and can be
eINPUT_TYPE_TEXT, eINPUT_TYPE_NUMERIC_FLOATING_PT, or
eINPUT_TYPE_NUMERIC_WHOLE.
|
virtual |
Returns the label of the input
References getLabel().
Referenced by copyCxMultiLineInputStuff(), doInputLoop(), getLabel(), cx::cxComboBox::move(), and cx::cxComboBox::toggleMenu().
| e_cxColors cx::cxMultiLineInput::getLabelColor | ( | ) | const |
Gets the label color
References cx::eDEFAULT.
| char cx::cxMultiLineInput::getMaskChar | ( | ) | const |
Accessor for the masking character
| bool cx::cxMultiLineInput::getMasked | ( | ) |
Returns whether or not input is masked
|
virtual |
Returns the currently-set maximum input length.
Referenced by cxMultiLineInputMaxInputLength().
|
virtual |
Returns the input's list of what it considers "navigational".
keys.
| pNavKeys | This will contain the navigational keys for the input. |
|
overridevirtual |
Returns a pointer to the parent window. If the cxMultiLineInput.
has a parent cxForm, a pointer to that will be
returned; otherwise, a pointer to the parent cxWindow
will be returned.
Reimplemented from cx::cxWindow.
References cx::cxWindow::getParent().
Referenced by searchParentFormsForFKey().
| cxForm * cx::cxMultiLineInput::getParentForm | ( | ) | const |
Returns the parent cxForm pointer.
Referenced by cx::cxComboBox::showModal().
| void cx::cxMultiLineInput::getRangeDouble | ( | long double & | pLow, |
| long double & | pHigh | ||
| ) | const |
Returns the floating-point numeric range for in the input.
| pLow | (OUT) This will be set to the low end of the range |
| pHigh | (OUT) This will be set to the high end of the range |
| long double cx::cxMultiLineInput::getRangeHighDouble | ( | ) | const |
Returns the high end of the floating-point numeric range for.
the input.
| long int cx::cxMultiLineInput::getRangeHighInt | ( | ) | const |
Returns the high end of the whole numeric range for the input.
| void cx::cxMultiLineInput::getRangeInt | ( | long int & | pLow, |
| long int & | pHigh | ||
| ) |
Returns the whole number range for the input.
| pLow | (OUT) This will be set to the low end of the range |
| pHigh | (OUT) This will be set to the high end of the range |
| long double cx::cxMultiLineInput::getRangeLowDouble | ( | ) | const |
Returns the low end of the floating-point numeric range for.
the input.
| long int cx::cxMultiLineInput::getRangeLowInt | ( | ) | const |
Returns the low end of the whole numeric range for the input.
|
virtual |
Returns the text of the right label.
|
virtual |
Returns the bottom row of the right label window.
|
virtual |
Returns the color used for the right label.
References cx::eMESSAGE.
|
virtual |
Returns the height of the right label window.
|
virtual |
Returns the leftmost column of the right label window.
|
virtual |
Returns the offset of the right label from the right edge of.
the input.
|
virtual |
Returns the rightmost column of the right label window.
|
virtual |
Returns the size of the right label.
| pHeight | (OUT) This will contain the height of the right label |
| pWidth | (OUT) This will contain the width of the right label |
|
virtual |
Returns the top row of the right label window.
|
virtual |
Returns the width of the right label window.
|
virtual |
Returns whether or not the label to the right of the input.
will be shown.
| bool cx::cxMultiLineInput::getSkipIfReadOnly | ( | ) | const |
Returns whether the input will skip all.
input processing in showModal() or
| int cx::cxMultiLineInput::getTimeout | ( | ) | const |
Returns the amount of time that the input will wait before.
exiting the input loop (0 = no timeout).
|
virtual |
Returns whether or not the clear key will be used.
|
virtual |
Returns whether the extended help keys are set to be used.
|
virtual |
Returns whether or not the validator function should be used.
Reimplemented in cx::cxComboBox.
Referenced by setValue().
|
virtual |
Returns whether or not the validator function will.
run when the user wants to move in reverse.
Referenced by cx::cxComboBox::showModal().
|
virtual |
|
virtual |
Returns the help text for one of the valid input strings. If.
the given input string is not in the collection of valid input
strings, then this will return a blank string.
| pInput | A valid input string to look for |
|
virtual |
Returns the collection of valid input strings that can be typed.
into the input. It is a map, where each key is the valid text,
and the value is the help text.
| pValidOptions | (OUT) This will contain the map of valid strings for the input & help text. |
| string cx::cxMultiLineInput::getValidOptionStrings | ( | const eMLIF & | pMLIF = eMLIF_COMMA_SEP | ) | const |
Get the valid input strings formatted.
| pMLIF | (format enum) eMLIF_COMMA_SEP=Comma separated list of inputs, eMLIF_COMMA_SEP_WITH_DESC=Comma Separated list of inputs with the description |
References cx::eMLIF_COMMA_SEP_WITH_DESC.
| void cx::cxMultiLineInput::getValidOptionStrings | ( | std::set< std::string > & | pValidOptionStrings | ) | const |
Returns a set of all the valid input strings currently set.
| pValidOptionStrings | (OUT) This will hold the valid input strings currently set in the input. |
|
virtual |
Returns the user's input
Referenced by addValidOption(), addValidOptions(), autoFillFromValidOptions(), cxComboBoxNotEditableMenuEnabled(), cxMultiLineInputBorderChange(), cxMultiLineInputForceUpper(), cxMultiLineInputMasking(), cxMultiLineInputMaxInputLength(), cxMultiLineInputNonBlank(), cxMultiLineInputNumericFloatingPt(), cxMultiLineInputNumericFloatingPtWithRange(), cxMultiLineInputNumericWhole(), cxMultiLineInputNumericWholeWithRange(), cxMultiLineInputSetValue(), cxMultiLineInputTextValidation(), cxMultiLineInputTextValidationAutoCompletion(), cxMultiLineInputTextValidationNonBlankForceUpper(), cxPanelTest(), doInputLoop(), cxValidators::floatingPtOnKeyValidator(), floatingPtValidate(), inputValidator(), inputYesNo(), integerValidate(), cxValidators::intOnKeyValidator(), main(), multiLineInput(), multiLineInputResize(), onKeypress(), cx::floatingPtInputWithRightLabel::onKeypress(), resize(), setValue(), showModal(), someFunction3(), storeOnLeave(), storeSearch(), testInputValidator(), and updateMenu().
| e_cxColors cx::cxMultiLineInput::getValueColor | ( | ) | const |
Gets the value color
References cx::eDEFAULT.
|
overrideprotectedvirtual |
Looks for a function tied to the last keypress and.
runs it, if one exists. If one exists, the return
value of the function may be set in the input if its
mUseReturnValue is true.
| pFunctionExists | A pointer to a bool (if non-null, it will store whether or not a function existed for the key). Defaults to nullptr. |
| pRunOnLeaveFunction | A pointer to a bool: If non-NUL, it will store whether or not to run the onLeave function when the window exits (this is an option for cxFunction). |
Reimplemented from cx::cxWindow.
References cx::cxWindow::getLastKey(), cx::cxWindow::mKeyFunctions, refreshValue(), and setValue().
Referenced by doInputLoop().
|
overridevirtual |
Returns whether or not the input currently has focus.
Reimplemented from cx::cxWindow.
|
virtual |
Returns whether a key is in the input's list of what it.
considers to be "navigational" keys. Normally, when the
user presses a key, a cxMultiLineInput will check its parent
window (if it's on a cxForm or cxPanel) to see if it has a
function associated with that key, and if so, the input
will exit its input loop without running its validator.
However, navigational keys are an exception, because usually
you would want to run the validator function to run before
the user leaves the input. The default navigational
keys are pageUp, pageDown, arrow keys, tab, and shift-tab.
| pKey | The key to test |
Referenced by searchParentFormsForFKey().
|
virtual |
Returns whether a key is in the list of keys that cause the.
input not to run the validator when it is pressed to run a
function.
| pKey | The key to look for |
Referenced by showModal(), and cx::cxComboBox::showModal().
|
virtual |
Returns whether or not a string exists in the input's set of.
valid input strings.
| pStr | The string to look for |
|
overridevirtual |
Hides the input (the input still exists; it just won't be displayed).
| pHideSubwindows | Whether or not to also hide the subwindows (always uses false) |
Reimplemented from cx::cxWindow.
References cx::cxWindow::hide().
Referenced by cx::cxComboBox::hide(), and show().
|
virtual |
Returns whether the input loop is enabled.
Referenced by isEditable(), and cx::cxComboBox::showModal().
|
virtual |
onLeave validator function - This runs just before the user
leaves the input to validate the value. If the input is a
numeric input, this will make sure the value in the input is
within the set range. For a text input, this will make sure
the value is valid according to mValidOptionStrings. This
function can be overridden in derived classes to add additional
validation.
References cx::eBLANK, cx::eINPUT_TYPE_NUMERIC_FLOATING_PT, cx::eINPUT_TYPE_NUMERIC_WHOLE, cx::eINPUT_TYPE_TEXT, cx::eINVALID_VALUE, cx::eNO_ERROR, getValue(), cx::messageBox(), and setRightLabel().
|
overridevirtual |
Returns whether the input is above another window.
| pThatWindow | The other window |
Reimplemented from cx::cxWindow.
References cx::cxWindow::isAbove(), and isAbove().
Referenced by isAbove().
|
overridevirtual |
Returns whether the input is below another window.
| pThatWindow | The other window |
Reimplemented from cx::cxWindow.
References cx::cxWindow::isBelow(), and isBelow().
Referenced by isBelow().
|
virtual |
Returns whether or not the input is editable. An input is editable if it passes the 3 following criteria:
References cx::eINPUT_READONLY, getInputOption(), inputLoopEnabled(), and cx::cxWindow::isEnabled().
Referenced by cx::cxComboBox::doInputLoop().
| bool cx::cxMultiLineInput::isFull | ( | ) | const |
Returns whether the value in the input takes up the maximum possible space for the input.
Referenced by doInputLoop().
|
virtual |
Returns whether or not a key is set up as an extended help key.
| pKey | A key to check for in the set of extended help keys |
Referenced by doInputLoop().
|
virtual |
Returns the maximum length of the value that may be set.
Referenced by cx::cxComboBox::resize().
|
overridevirtual |
Returns whether or not a call to showModal() will wait for a.
keypress from the user. This will be true if the input
is enabled and the input type is eINPUT_EDITABLE; it will be
false otherwise.
Reimplemented from cx::cxWindow.
References cx::eINPUT_EDITABLE, getInputOption(), and cx::cxWindow::isEnabled().
|
overridevirtual |
Changes the window's position, based on a new upper-left corner
| pNewRow | The new topmost row of the form |
| pNewCol | The new leftmost column of the form |
| pRefresh | Whether or not to refresh the window (defaults to true) |
Reimplemented from cx::cxWindow.
Reimplemented in cx::cxComboBox.
References cx::eBS_NOBORDER, cx::cxWindow::getBorderStyle(), cx::cxWindow::hasBorder(), cx::cxWindow::left(), cx::cxWindow::move(), cx::cxWindow::right(), show(), and cx::cxWindow::top().
Referenced by copyCxMultiLineInputStuff(), and cx::cxComboBox::move().
| bool cx::cxMultiLineInput::onKeyFunctionEnabled | ( | ) | const |
Returns whether or not the onKey function will be run.
References onKeyFunctionEnabled().
Referenced by onKeyFunctionEnabled().
|
virtual |
This runs each time the user presses a key. If built-in.
validation is used, this function will be automatically set up
to fire. If the input is a whole numeric input, this runs
cxValidators::intOnKeyValidator() to only allow whole numbers.
If the input is a floating-point numeric input, this runs
cxValidators::floatingPtOnKeyValidator() to only allow
floating-point numbers. This function can be overridden in
derived classes to add additional per-key validation or other
functionality.
Reimplemented in cx::floatingPtInputWithRightLabel.
References cx::eBLANK, cx::eINPUT_TYPE_NUMERIC_FLOATING_PT, cx::eINPUT_TYPE_NUMERIC_WHOLE, cx::eINPUT_TYPE_TEXT, cx::eNO_ERROR, cxValidators::floatingPtOnKeyValidator(), getValue(), and cxValidators::intOnKeyValidator().
Referenced by cx::floatingPtInputWithRightLabel::onKeypress().
| cxMultiLineInput & cx::cxMultiLineInput::operator= | ( | const cxMultiLineInput & | pThatInput | ) |
Assignment operator.
| pThatInput | Another cxMultiLineInput to copy |
References copyCxMultiLineInputStuff().
|
overridevirtual |
Tells the input to exit the input loop now, with a return value.
of cxID_QUIT.
Reimplemented from cx::cxWindow.
References cx::cxWindow::quitNow().
Referenced by quitNow().
|
virtual |
After this is called, the code returned by showModal will.
be cxID_QUIT. Also, if the input is on a cxForm, the form
will go onto the next or previous input, depending on the
value of pMoveForward (via a call to setCurrentInput()).
| pMoveForward | If this is true, and the input is on a cxForm, the form will be told to go onto its next input; otherwise, the form will be told to go onto its previous input. |
References cx::cxForm::getInputIndex(), quitNow(), and cx::cxForm::setCurrentInput().
|
virtual |
Returns whether the input ran a key function that was set up.
to have the input exit when it was done.
|
virtual |
Refreshes just the value portion of the input.
| pRefresh | Whether or not to refresh the window after re-drawing the value (defaults to true). |
Referenced by cxValidators::floatingPtOnKeyValidator(), handleFunctionForLastKey(), cxValidators::intOnKeyValidator(), and setValue().
|
overridevirtual |
Removes an ncurses attribute from one of the item lists.
| pItem | The item to remove the attribute for (see the e_WidgetItems enumeration). |
| pAttr | The ncurses attribute to remove |
Reimplemented from cx::cxWindow.
|
overridevirtual |
Removes all attributes for a given window item.
| pItem | The item to remove attributes for (see the e_WidgetItems enumeration). |
Reimplemented from cx::cxWindow.
|
overridevirtual |
Removes an exit key.
| pKey | The key to remove from the list of exit keys |
Reimplemented from cx::cxWindow.
References cx::cxWindow::mExitKeys.
|
virtual |
Removes a key from the input's list of "navigational" keys (see.
the description for hasNavKey()).
| pKey | The key to be removed |
|
virtual |
Removes all keys that the input considers "navigational" keys.
|
overridevirtual |
Removes a quit key (but doesn't work for ESC)
| pKey | The key to remove from the list of quit keys |
Reimplemented from cx::cxWindow.
References cx::cxWindow::mQuitKeys.
|
virtual |
Removes a key from the list of keys that skip the validator.
function.
| pKey | The key to remove |
|
overridevirtual |
Changes input's width and height. The upper-left coordinate.
stays the same.
| pNewHeight | The new height |
| pNewWidth | The new width |
| pRefresh | Whether or not to refresh the window (defaults to true) |
Reimplemented from cx::cxWindow.
Reimplemented in cx::cxComboBox.
References cx::eBS_NOBORDER, cx::cxWindow::getBorderStyle(), getInputOption(), getValue(), cx::height(), cx::cxWindow::height(), cx::cxWindow::left(), cx::cxWindow::resize(), setMaxInputLength(), setValue(), cx::cxWindow::top(), cx::width(), and cx::cxWindow::width().
Referenced by multiLineInputResize(), cx::cxComboBox::resize(), and cx::cxComboBox::toggleMenu().
|
virtual |
Re-sizes the right label.
| pHeight | A height for the right label |
| pWidth | A width for the right label |
| pRefresh | Whether or not to refresh the right label on the screen (defaults to false) |
Referenced by cxMultiLineInputWithRightLabel().
|
virtual |
Returns whether or not the right label window is enabled.
| void cx::cxMultiLineInput::runFieldFunction | ( | int | pKey | ) |
Runs the function that was set with setKeyFunction for this key.
| the | key to run the function for |
References cx::cxWindow::mKeyFunctions, setValue(), and show().
|
protected |
Enables or disables the onFocus and onLeave functions.
| pRunFocusFunctions | Whether or not to run the onFocus and onLeave functions (true/false). |
References mRunFocusFunctions.
Referenced by cx::cxComboBox::cxComboBox().
|
overridevirtual |
Runs the onFocus function, if it's set. If the.
onFocus function's mUseReturnVal is true, the return
value of the onFocus function will be set in the
input.
| pFunctionRetval | If not nullptr, the string that this points to will contain the return value of the onFocus function. Defaults to nullptr. |
Reimplemented from cx::cxWindow.
References cx::cxWindow::mOnFocusFunction, cx::cxWindow::onFocusFunctionIsSet(), and setValue().
Referenced by showModal(), and cx::cxComboBox::showModal().
|
virtual |
Runs the input's validator function and returns its return.
value. If the validator function is not set, this returns
a blank string.
References mValidatorFunction.
Referenced by setValue(), showModal(), and cx::cxComboBox::showModal().
|
protected |
Searches the parent cxForm (if mParentForm isn't nullptr)
for a key that runs a function. Returns true if it is found
or false if not.
| pFunctionKey | The function key to look for |
| pIncludeNavigationalKeys | If this is true, navigational keys (such as pageUp, pageDown, arrow keys, tab, and shift-tab) will be included in looking for keys that run a function. This defaults to false. |
References cx::cxForm::formKeyIsSet(), cx::cxForm::getInputJumpKey(), cx::cxWindow::getParent(), cx::cxForm::getParent(), getParent(), cx::cxForm::getParentMultiForm(), cx::cxWindow::hasKeyFunction(), and hasNavKey().
Referenced by cx::cxComboBox::doInputLoop(), showModal(), and cx::cxComboBox::showModal().
|
virtual |
Sets whether or not to allow a blank value.
| pAllowBlank | Whether or not to allow a blank value (true/false) |
Referenced by cxMultiLineInputNonBlank(), cxMultiLineInputSetValue(), and cxMultiLineInputTextValidationNonBlankForceUpper().
|
overridevirtual |
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 to apply the attribute for (see the e_WidgetItems enumeration). |
| pAttr | The ncurses atribute to apply. |
Reimplemented from cx::cxWindow.
| void cx::cxMultiLineInput::setAutoWrapAtBeginning | ( | bool | pWrapAtBeginning | ) |
Sets whether auto-wrapping of text.
should move the cursor to the beginning
of the next line.
| pWrapAtBeginning | Whether or not auto-wrapping of text should move the cursor to the beginning of the next line. If true, then as the user is typing text, when one line fills up, the cursor will move to the beginning of the next line. If false, the cursor will move to the end of the text in the next line. |
|
overridevirtual |
Sets the border style.
| pBorderStyle | The type of border to use |
Reimplemented from cx::cxWindow.
References cx::eBS_NOBORDER, cx::cxWindow::getBorderStyle(), cx::cxWindow::height(), cx::cxWindow::left(), cx::cxWindow::resize(), cx::cxWindow::setBorderStyle(), cx::cxWindow::top(), and cx::cxWindow::width().
Referenced by cxMultiLineInputBorderChange().
| void cx::cxMultiLineInput::setCanBeEditable | ( | bool | pCanBeEditable | ) |
Sets whether the input can be set editable. If this is called.
with false, then the input will be set read-only, and any calls
to setInputOption(eINPUT_EDITABLE), which would normally set it
editable, will not set it editable.
| pCanBeEditable | If true, the input can be set editable; if false, the input will always be read-only. |
|
overridevirtual |
Sets the color of one of the window items.
| pItem | The item to set the color of (see the e_WidgetItems enumeration in cxWidgetItems.h). |
| pColor | The color to set the item to (see the e_cxColors enumeration in cxColors.h) |
Reimplemented from cx::cxWindow.
|
virtual |
Sets whether the cursor should be left-aligned when the.
input is shown modally.
| pCursorLeftAlign | Whether or not the cursor should be left-aligned when the input is shown modally. |
Referenced by doInputLoop().
|
overridevirtual |
Sets whether the window should disable the cursor.
when it's shown (this is the default behavior).
| pDisableCursorOnShow | Whether or not to disable the cursor when shown |
Reimplemented from cx::cxWindow.
References cx::cxWindow::setDisableCursorOnShow().
|
virtual |
Enables or disables editing of the input. If disabled, the.
user won't be able to type in the input. This calls
setInputOption() with either eINPUT_EDITABLE or
eINPUT_READONLY, depending on the value of pEditable.
| pEditable | Whether or not to enable editing (true/false) |
References cx::eINPUT_EDITABLE, cx::eINPUT_READONLY, and setInputOption().
Referenced by cxComboBoxNotEditableMenuEnabled().
|
overridevirtual |
Enables or disables the input.
| pEnabled | Whether the input should be enabled or not (true/false) |
Reimplemented from cx::cxWindow.
References cx::cxWindow::setEnabled().
| void cx::cxMultiLineInput::setEnterAlwaysExits | ( | bool | pEnterAlwaysExits | ) |
Sets whether the enter key always causes the input.
to exit, rather than going onto the next line in
the input.
| pEnterAlwaysExits | If true, enter will always cause the input to exit. If false, enter will cause the cursor to go to the next line in the input. |
|
virtual |
Sets the error state for the input. This can be one of the.
following values:
eNO_ERROR (no error)
eOUT_OF_RANGE (numeric out of range error)
eINVALID_VALUE (value is not in the list of valid strings)
eBLANK (the input is blank, and blank is not allowed)
eCUSTOM_VALIDATION_FAILED (custom validation failed - This is
a generic error that can be used by deriving classes if
any additional validation fails)
| pErrorState | The error state to set in the input |
| void cx::cxMultiLineInput::setExitOnBackspaceAtFront | ( | bool | pExitOnBackspaceAtFront | ) |
Sets whether the input should exit the input loop when the.
user presses backspace in the first input position.
| pExitOnBackspaceAtFront | Whether or not the input should exit the input loop when the user presses backspace in the first input position. |
| void cx::cxMultiLineInput::setExitOnFull | ( | bool | pExitOnFull | ) |
Sets whether the input should exit automatically when it's full.
| pExitOnFull | Whether or not to exit automatically when full |
Referenced by cxMultiLineInputBorderChange().
|
virtual |
Sets the "extended" help text for the input (this can be as.
long as desired).
| pExtendedHelp | New extended help |
Referenced by cxMultiLineInputExtendedHelpColorsAndAttrs(), and cxMultiLineInputExtendedHelpKey().
|
virtual |
Sets the attribute to use for the extended help message.
| pAttr | An ncurses attribute (see the man page for wattron for a list of attributes) |
Referenced by cxMultiLineInputExtendedHelpColorsAndAttrs().
|
virtual |
Sets the color to use for the extended help message.
| pColor | A value of the e_cxColors enumeration (see cxColors.h) |
Referenced by cxMultiLineInputExtendedHelpColorsAndAttrs().
|
virtual |
Sets a single key to be used to display the extended help.
| pKey | A key to be used to display the extended help |
References addExtendedHelpKey(), and clearExtendedHelpKeys().
Referenced by cxMultiLineInputExtendedHelpKey().
|
virtual |
Sets the keys to be used to display the extended help.
| pKeys | A set of keys to use to display the extended help |
References clearExtendedHelpKeys().
| void cx::cxMultiLineInput::setExtValue | ( | std::string * | pExtVal, |
| bool | pRefresh = false |
||
| ) |
Mutator for the "external" user value variable pointer
| pExtVal | The new pointer to the external variable |
| pRefresh | Whether or not to refresh the input |
References setValue(), and show().
|
virtual |
Toggles the option to force text to be upper-case.
| pForceUpper | true if text should be upper-case, or false if not. |
Referenced by cxMultiLineInputAutoGenerateHelpString(), cxMultiLineInputForceUpper(), cxMultiLineInputTextValidationAutoCompletion(), and cxMultiLineInputTextValidationNonBlankForceUpper().
|
virtual |
Sets the input option for the input (i.e., eINPUT_EDITABLE,.
eINPUT_READONLY) - See the eInputOptions enumeration in
| pInputKind | The new input kind |
References disableAttrs(), cx::eDATA_EDITABLE, cx::eDATA_READONLY, cx::eINPUT_EDITABLE, cx::eINPUT_READONLY, enableAttrs(), and cx::cxWindow::mWindow.
Referenced by setEditable(), and showModal().
|
virtual |
Sets the input type. This is a member of the cxInputTypes.
enumeration (defined in cxInputTypes.h) and can be
eINPUT_TYPE_TEXT, eINPUT_TYPE_NUMERIC_FLOATING_PT, or
eINPUT_TYPE_NUMERIC_WHOLE. Note that if the type is set to
a numeric type, then one of the validators from cxValidators.h
will be set up to validate the input for every keypress.
| pInputType | The input type |
Referenced by cxMultiLineInputNumericFloatingPt(), cxMultiLineInputNumericFloatingPtWithRange(), cxMultiLineInputNumericWhole(), cxMultiLineInputNumericWholeWithRange(), cxMultiLineInputSetValue(), cxMultiLineInputTextValidation(), cxMultiLineInputTextValidationNonBlankForceUpper(), floatingPtValidate(), and integerValidate().
|
overridevirtual |
Sets a function to be called when a key is pressed.
| pKey | The key to use for the function |
| pFunction | The function to call. This can be an instance of one of the derived cxFunction classes as well. |
Reimplemented from cx::cxWindow.
Referenced by cxMultiLineInputFunctionKeyNoValidator(), cxMultiLineInputNumericWhole(), setKeyFunction(), setKeyFunction(), and setKeyFunction().
|
virtual |
Just like the above function, but also lets you specify whether.
to run the validator function, if the input should leave focus
after the function runs.
| pKey | A keypress to fire the function |
| pFunction | Function to point to - must have this signature: string fnctn() |
| pUseVal | Whether or not the function's return value should be set as the value in the field |
| pExitAfterRun | Whether or not this field should exit from the input loop once the function is done |
| pRunOnLeaveFunction | Whether or not to run the onLeave function when the window exits (if pExitAfterRun is true). Defaults to true. |
| pRunValidator | Whether or not to run the validator function after the function runs and the input exits its loop (useful if pExitAfterRun is true). |
References setKeyFunction().
|
overridevirtual |
Adds a function to call when the user presses some key.
| pKey | A keypress to fire the function |
| pFunction | Function to point to - must have this signature: string fnctn() |
| pUseVal | Whether or not the function's return value should be set as the value in the field |
| pExitAfterRun | Whether or not this field should exit from the input loop once the function is done |
| pRunOnLeaveFunction | Whether or not to run the onLeave function when the window exits (if pExitAfterRun is true). Defaults to true. |
Reimplemented from cx::cxWindow.
References cx::cxWindow::removeExitKey(), cx::cxWindow::removeQuitKey(), and cx::cxWindow::setKeyFunction().
|
virtual |
Just like the above function, but also lets you specify whether.
to run the validator function, if the input should leave focus
after the function runs.
| pKey | A keypress to fire the function |
| pFunction | Function to point to - must have this signature: string (fnctn)(void, void*) |
| p1 | Pointer to the first parameter to be used for the function |
| p2 | Pointer to the second parameter to be used for the function |
| pUseVal | Whether or not the function's return value should be set as the value in the field |
| pExitAfterRun | Whether or not this field should exit from the input loop once the function is done |
| pRunOnLeaveFunction | Whether or not to run the onLeave function when the window exits (if pExitAfterRun is true). Defaults to true. |
| pRunValidator | Whether or not to run the validator function after the function runs and the input exits its loop (useful if pExitAfterRun is true). |
References setKeyFunction().
|
overridevirtual |
Adds a function to call when the user presses some key.
| pKey | A keypress to fire the function |
| pFunction | Function to point to - must have this signature: string (fnctn)(void, void*) |
| p1 | Pointer to the first parameter to be used for the function |
| p2 | Pointer to the second parameter to be used for the function |
| pUseVal | Whether or not the function's return value should be set as the value in the field |
| pExitAfterRun | Whether or not this field should exit from the input loop once the function is done |
| pRunOnLeaveFunction | Whether or not to run the onLeave function when the window exits (if pExitAfterRun is true). Defaults to true. |
Reimplemented from cx::cxWindow.
References cx::cxWindow::removeExitKey(), cx::cxWindow::removeQuitKey(), and cx::cxWindow::setKeyFunction().
|
virtual |
Just like the above function, but also lets you specify whether.
to run the validator function, if the input should leave focus
after the function runs.
| pKey | A keypress to fire the function |
| pFunction | Function to point to - must have this signature: string func(void*, void*, void*, void*) |
| p1 | Pointer to the first parameter to be used for the function |
| p2 | Pointer to the second parameter to be used for the function |
| p3 | Pointer to the 3rd parameter to be used for the function |
| p4 | Pointer to the 4th parameter to be used for the function |
| pUseVal | Whether or not the function's return value should be set as the value in the field |
| pExitAfterRun | Whether or not this field should exit from the input loop once the function is done |
| pRunOnLeaveFunction | Whether or not to run the onLeave function when the window exits (if pExitAfterRun is true). Defaults to true. |
| pRunValidator | Whether or not to run the validator function after the function runs and the input exits its loop (useful if pExitAfterRun is true). |
References setKeyFunction().
|
overridevirtual |
Adds a function to call when the user presses some key.
This version adds a pointer to a function with this signature:
string func(void*, void*, void*, void*).
Note that functions added with this method take precedence
over functions added with the next version of this method.
| pKey | A keypress to fire the function |
| pFunction | Function to point to - must have this signature: string func(void*, void*, void*, void*) |
| p1 | Pointer to the first parameter to be used for the function |
| p2 | Pointer to the second parameter to be used for the function |
| p3 | Pointer to the 3rd parameter to be used for the function |
| p4 | Pointer to the 4th parameter to be used for the function |
| pUseVal | Whether or not the function's return value should be set as the value in the field |
| pExitAfterRun | Whether or not this field should exit from the input loop once the function is done |
| pRunOnLeaveFunction | Whether or not to run the onLeave function when the window exits (if pExitAfterRun is true). Defaults to true. |
Reimplemented from cx::cxWindow.
References cx::cxWindow::removeExitKey(), cx::cxWindow::removeQuitKey(), and cx::cxWindow::setKeyFunction().
|
virtual |
Sets the label for the input
| pLabel | The new label |
Referenced by copyCxMultiLineInputStuff(), and setMultiLineInputLabel().
| void cx::cxMultiLineInput::setLabelColor | ( | e_cxColors | pColor | ) |
Sets the label color.
| pColor | A member of the e_cxColors enumeration from cxColors.h |
References setLabelColor().
Referenced by inputsWithDifferentColors(), and setLabelColor().
|
overridevirtual |
Sets the last keypress.
| pLastKey | A key (represented by an int) |
Reimplemented from cx::cxWindow.
References cx::cxWindow::setLastKey(), and cx::cxForm::setLastKey().
Referenced by cx::cxComboBox::copyCxComboBoxStuff(), doInputLoop(), cx::cxInput::setLastKey(), and showModal().
| void cx::cxMultiLineInput::setMaskChar | ( | char | pMaskChar | ) |
Mutator for the masking character
| pMaskChar | The new masking character to use |
|
virtual |
Sets the maximum text length that can be accepted by the input.
| pLength | The maximum text length that can be accepted by the input |
Referenced by cxMultiLineInputMaxInputLength(), and resize().
|
virtual |
Sets a function to be run whenever a key is pressed.
| pFunction | Function to point to–must have signature string func(void*, void*, void*, void*) |
| p1 | Pointer to the first parameter to be used for the function |
| p2 | Pointer to the second parameter to be used for the function |
| p3 | Pointer to the 3rd parameter to be used for the function |
| p4 | Pointer to the 4th parameter to be used for the function |
Referenced by comboBox(), comboBoxMenuDisable(), and useBuiltInOnKeyFunction().
|
virtual |
Sets a function to be run whenever a key is pressed.
| pFunction | Function to point to–must have signature string func() |
| p1 | Pointer to the first parameter to be used for the function |
| p2 | Pointer to the second parameter to be used for the function |
| p3 | Pointer to the 3rd parameter to be used for the function |
| p4 | Pointer to the 4th parameter to be used for the function |
|
virtual |
Sets a function to be run whenever a key is pressed.
| pFunction | Function to point to–must have signature string func(void*, void*) |
| p1 | Pointer to the first parameter to be used for the function |
| p2 | Pointer to the second parameter to be used for the function |
| p3 | Pointer to the 3rd parameter to be used for the function |
| p4 | Pointer to the 4th parameter to be used for the function |
|
virtual |
Sets a function to be run whenever a key is pressed.
| pFunction | Function to point to–must have signature string func(void*, void*, void*, void*) |
| p1 | Pointer to the first parameter to be used for the function |
| p2 | Pointer to the second parameter to be used for the function |
| p3 | Pointer to the 3rd parameter to be used for the function |
| p4 | Pointer to the 4th parameter to be used for the function |
|
protected |
| void cx::cxMultiLineInput::setRangeDouble | ( | const long double & | pLow, |
| const long double & | pHigh | ||
| ) |
Sets the floating-point numeric range for the input.
| pLow | The value for the low end |
| pHigh | The value for the high end |
Referenced by cxMultiLineInputNumericFloatingPtWithRange().
| void cx::cxMultiLineInput::setRangeHighDouble | ( | const long double & | pRangeHighDouble | ) |
Sets the high end of the floating-point numeric range for the.
input.
| pRangeLowDouble | A value for the high end of the floating-point range |
| void cx::cxMultiLineInput::setRangeHighInt | ( | const long int & | pRangeHighInt | ) |
Sets the high end of the whole numeric range for the input.
| pRangeLowInt | A value for the high whole numeric range |
| void cx::cxMultiLineInput::setRangeInt | ( | const long int & | pLow, |
| const long int & | pHigh | ||
| ) |
Sets the whole number range for the input.
| pLow | The value for the low end |
| pHigh | The value for the high end |
Referenced by cxMultiLineInputNumericWholeWithRange().
| void cx::cxMultiLineInput::setRangeLowDouble | ( | const long double & | pRangeLowDouble | ) |
Sets the low end of the floating-point numeric range for the.
input.
| pRangeLowDouble | A value for the low end of the floating-point range |
| void cx::cxMultiLineInput::setRangeLowInt | ( | const long int & | pRangeLowInt | ) |
Sets the low end of the whole numeric range for the input.
| pRangeLowInt | A value for the low whole numeric range |
|
virtual |
Sets whether the input should go read-only when setFocus() exits.
| pReadOnlyOnLeave | If true, the input will change to read-only when setFocus() exits. |
|
virtual |
Sets the text of the right label.
| pText | The text for the right label |
| pRefresh | Whether or not to refresh the right label on the screen (defaults to false) |
Referenced by autoFillFromValidOptions(), cxMultiLineInputWithRightLabel(), inputValidator(), cx::floatingPtInputWithRightLabel::onKeypress(), and storeOnLeave().
|
virtual |
Sets the offset & the text of the right label.
| pOffset | The offset from the right side of the input |
| pText | The text for the right label |
| pRefresh | Whether or not to refresh the right label on the screen (defaults to false) |
|
virtual |
Sets the ncurses attribute for the right label message.
| pAttr | The ncurses atribute to apply. |
References cx::eMESSAGE.
|
virtual |
Sets the color to use for the right label.
| pColor | A member of the e_cxColors enumeration (see cxColors.h) |
|
virtual |
Sets the height of the right label.
| pHeight | A height for the right label |
| pRefresh | Whether or not to refresh the right label on the screen (defaults to false) |
|
virtual |
Sets the horizontal distance of the right label from the right.
edge of the input. For instance, an offset of 1 means the
right label will be one space to the right of the input window.
| pOffset | The offset of the right label |
| pRefresh | Whether or not to refresh the right label on the screen (defaults to false) |
References cx::cxWindow::right().
Referenced by cxMultiLineInputTextValidationAutoCompletion(), and cxMultiLineInputWithRightLabel().
|
virtual |
Sets the width of the right label.
| pWidth | A width for the right label |
| pRefresh | Whether or not to refresh the right label on the screen (defaults to false) |
Referenced by cxMultiLineInputTextValidationAutoCompletion().
|
virtual |
Sets whether or not to show the label to the right of the input.
| pShowRightLabel | Whether or not to show the label to the right of the input (true/false) |
Referenced by cxMultiLineInputTextValidationAutoCompletion(), and cxMultiLineInputWithRightLabel().
| void cx::cxMultiLineInput::setSkipIfReadOnly | ( | bool | pSkipIfReadOnly | ) |
Sets whether the input should skip.
all input processing in showModal()
or setFocus(). By default, this is
true when a cxMultiLineInput is created.
| pSkipIfReadOnly | Whether or not the input should skip all input processing in showModal() or setFocus(). |
|
virtual |
Sets the amount of time (in seconds) that the input should.
wait when idle before exiting the input loop (0 = no timeout).
| pTimeout | The amount of time (in seconds) that the input should wait when idle before exiting the input loop (0 = no timeout). |
|
virtual |
Sets whether or not the clear key should be used.
| pUseClearKey | Boolean: Whether or not the clear key should be used |
|
virtual |
Toggles whether or not to use the extended help keys.
| pUseExtendedHelpKey | true if the extended help keys should be used, or false if not. |
Referenced by cxMultiLineInputExtendedHelpKey().
|
virtual |
Sets whether or not to run the validator function.
when the user wants to move in reverse (i.e., by
pressing shift-tab or the up arrow to exit the
input). The default behavior is true when a
cxMultiLineInput is created.
| pValidateOnReverse | Whether or not to run the validator function when the user wants to move in reverse |
|
virtual |
Sets a validator function to be run before focus is lost. If the function returns a blank string, it is assumed that the text is valid; if the function returns a non-blank string, it is assumed that the text was incorrect.
| pFunction | Function pointer |
References clearValidatorFunction(), mValidatorFunction, and toggleValidatorFunction().
Referenced by cxMultiLineInputFunctionKeyNoValidator(), and useBuiltInValidator().
| bool cx::cxMultiLineInput::setValidatorFunction | ( | funcPtr0 | pFunction | ) |
Sets a validator function to be run before focus is lost. If the function returns a blank string, it is assumed that the text is valid; if the function returns a non-blank string, it is assumed that the text was incorrect.
| pFunction | Function to point to–must have signature string func() |
| p1 | Pointer to the first parameter to be used for the function |
| p2 | Pointer to the second parameter to be used for the function |
| p3 | Pointer to the 3rd parameter to be used for the function |
| p4 | Pointer to the 4th parameter to be used for the function |
References clearValidatorFunction(), mValidatorFunction, and toggleValidatorFunction().
| bool cx::cxMultiLineInput::setValidatorFunction | ( | funcPtr2 | pFunction, |
| void * | p1, | ||
| void * | p2 | ||
| ) |
Sets a validator function to be run before focus is lost. If the function returns a blank string, it is assumed that the text is valid; if the function returns a non-blank string, it is assumed that the text was incorrect.
| pFunction | Function to point to–must have signature string func(void*, void*) |
| p1 | Pointer to the first parameter to be used for the function |
| p2 | Pointer to the second parameter to be used for the function |
| p3 | Pointer to the 3rd parameter to be used for the function |
| p4 | Pointer to the 4th parameter to be used for the function |
References clearValidatorFunction(), mValidatorFunction, and toggleValidatorFunction().
| bool cx::cxMultiLineInput::setValidatorFunction | ( | funcPtr4 | pFunction, |
| void * | p1, | ||
| void * | p2, | ||
| void * | p3, | ||
| void * | p4 | ||
| ) |
Sets a validator function to be run before focus is lost. If the function returns a blank string, it is assumed that the text is valid; if the function returns a non-blank string, it is assumed that the text was incorrect.
| pFunction | Function to point to–must have signature string func(void*, void*, void*, void*) |
| p1 | Pointer to the first parameter to be used for the function |
| p2 | Pointer to the second parameter to be used for the function |
| p3 | Pointer to the 3rd parameter to be used for the function |
| p4 | Pointer to the 4th parameter to be used for the function |
References clearValidatorFunction(), mValidatorFunction, and toggleValidatorFunction().
|
virtual |
Sets the validator string for this input.
| pValidator | The new validator string. See README.txt for format. |
Referenced by main().
|
virtual |
Sets all the strings that may be typed into the input.
| pValidOptions | A map where each key is a valid string that may be typed into the input, and the value is help text that goes along with the valid string. |
| pValidate | Whether or not to validate the text currently in the input against the valid option strings. Defaults to true. |
|
virtual |
Sets single-character valid input strings to the input. This.
is the same as addValidOptions(), except that this clears the
valid input collection first.
| pValidOptions | A string containing characters that are valid inputs |
| pValidate | Whether or not to validate the text currently in the input against the valid option strings. Defaults to true. |
Referenced by cxMultiLineInputSetValue(), cxMultiLineInputTextValidation(), and cxMultiLineInputTextValidationNonBlankForceUpper().
|
virtual |
Sets the text in the input.
| pValue | String to set as input text |
| pRefresh | Whether or not to refresh the input (defaults to false) |
References cx::eINPUT_TYPE_NUMERIC_FLOATING_PT, cx::eINPUT_TYPE_NUMERIC_WHOLE, cx::eINPUT_TYPE_TEXT, cx::eNO_ERROR, getUseValidatorFunction(), getValue(), refreshValue(), runValidatorFunction(), cx::cxForm::setChanged(), setValue(), toggleValidatorFunction(), and usingBuiltInValidator().
Referenced by addValidOption(), addValidOptions(), autoFillFromValidOptions(), clearInput(), copyCxMultiLineInputStuff(), cxMultiLineInput(), cxMultiLineInputSetValue(), doInputLoop(), cxValidators::floatingPtOnKeyValidator(), handleFunctionForLastKey(), inputsWithDifferentColors(), inputYesNo(), cxValidators::intOnKeyValidator(), main(), resize(), runFieldFunction(), runOnFocusFunction(), setExtValue(), setValue(), show(), showModal(), cx::cxComboBox::showModal(), someFunction2(), and storeSearch().
| void cx::cxMultiLineInput::setValueColor | ( | e_cxColors | pColor | ) |
Sets the color of the value typed into the input.
| pColor | A member of the e_cxColors enumeration from cxColors.h |
Referenced by inputsWithDifferentColors().
|
overridevirtual |
Shows the window, along with the user's input
| pBringToTop | Whether or not to bring this window to the top. Defaults to false. |
| pShowSubwindows | Whether or not to show sub-windows also. Always uses false. |
Reimplemented from cx::cxWindow.
References bringToTop(), cx::cxID_EXIT, cx::cxWindow::drawBorder(), cx::cxWindow::drawStatus(), cx::cxWindow::drawTitle(), cx::eBS_NOBORDER, cx::cxWindow::getBorderStyle(), cx::cxWindow::getShowSelfBeforeSubwins(), hide(), cx::cxWindow::isEnabled(), setValue(), cx::cxWindow::showSubwindows(), and unhide().
Referenced by clearInput(), cxMultiLineInputWithRightLabel(), doInputLoop(), inputsWithDifferentColors(), cx::cxComboBox::move(), move(), runFieldFunction(), setExtValue(), setMultiLineInputLabel(), showModal(), and cx::cxComboBox::showModal().
|
overridevirtual |
Enters a loop for user input. Returns cxID_EXIT or cxID_QUIT,.
depending on whether the user exited or quit the input.
| pShowSelf | Whether or not to show the window before running the input loop. Defaults to true. |
| pBringToTop | Whether or not to bring the window to the top (always uses true). |
| pShowSubwindows | Whether or not to show sub-windows also. Always uses false. |
Reimplemented from cx::cxWindow.
Reimplemented in cx::cxComboBox.
References bringToTop(), cx::cxID_EXIT, cx::cxID_QUIT, doInputLoop(), cx::eINPUT_READONLY, cx::eINPUT_TYPE_TEXT, ESC, getInputOption(), cx::cxWindow::getLastKey(), cx::cxWindow::getLeaveNow(), cx::cxWindow::getReturnCode(), getValue(), hasSkipValidatorKey(), cx::cxWindow::isEnabled(), cx::cxWindow::lastKeyWasMouseEvt(), cx::cxWindow::mExitKeys, cx::cxWindow::mIsModal, cx::cxWindow::mouseEvtWasInWindow(), cx::cxWindow::mQuitKeys, mRunFocusFunctions, cx::cxWindow::mWindow, cx::cxWindow::pointIsInWindow(), runOnFocusFunction(), cx::cxWindow::runOnLeaveFunction(), runValidatorFunction(), searchParentFormsForFKey(), setInputOption(), setLastKey(), cx::cxWindow::setReturnCode(), setValue(), SHIFT_TAB, show(), and validatorFunctionIsSet().
Referenced by cxMultiLineInputAutoGenerateHelpString(), cxMultiLineInputBorderChange(), cxMultiLineInputExtendedHelpColorsAndAttrs(), cxMultiLineInputExtendedHelpKey(), cxMultiLineInputForceUpper(), cxMultiLineInputFunctionKeyNoValidator(), cxMultiLineInputMasking(), cxMultiLineInputMaxInputLength(), cxMultiLineInputNonBlank(), cxMultiLineInputNumericFloatingPt(), cxMultiLineInputNumericFloatingPtWithRange(), cxMultiLineInputNumericWhole(), cxMultiLineInputNumericWholeWithRange(), cxMultiLineInputOverrideOnKeypress(), cxMultiLineInputTextValidation(), cxMultiLineInputTextValidationAutoCompletion(), cxMultiLineInputTextValidationNonBlankForceUpper(), doInputLoop(), cx::cxComboBox::doInputLoop(), floatingPtValidate(), integerValidate(), multiLineInput(), and multiLineInputResize().
|
virtual |
Returns whether the text entered into the input is valid.
|
virtual |
Returns whether some text is valid according to the input's validator.
| pText | The text to be validated |
| void cx::cxMultiLineInput::toggleCursor | ( | bool | pShowCursor | ) |
Enables/disables the display of the cursor.
| pShowCursor | Whether or not to show the cursor (true/false). |
| void cx::cxMultiLineInput::toggleMasking | ( | bool | pMasking | ) |
Enable/disable input masking
| pMasking | Whether to mask user input |
Referenced by cxMultiLineInputMasking().
|
virtual |
Sets whether the onKey function should be fired or not.
| pRunOnKeyFunction | Whether or not the onKey function should be fired |
|
virtual |
Sets whether or not the validator function should be used.
| pRunValidatorFunction | Whether or not the validator function should be used |
Reimplemented in cx::cxComboBox.
Referenced by setValidatorFunction(), setValidatorFunction(), setValidatorFunction(), setValidatorFunction(), and setValue().
| void cx::cxMultiLineInput::trapNonAssignedFKeys | ( | bool | pTrapNonAssignedFKeys | ) |
Sets whether non-assigned function keys should.
be trapped within the input loop and not cause
the input to stop its input loop.
| pTrapNonAssignedFKeys | If true, pressing function keys that are not assigned (when modal) will do nothing. If false, pressing non-assigned function keys while focus is set will cause the input to exit the input loop. |
|
overridevirtual |
Un-hides the window.
| pUnhideSubwindows | Whether or not to also unhide the subwindows (always uses false) |
Reimplemented from cx::cxWindow.
References cx::cxWindow::isEnabled(), and cx::cxWindow::unhide().
Referenced by show(), and cx::cxComboBox::unhide().
|
virtual |
Sets up the input's built-in onKey function for the input.
After this is called, onKeypress() will be called whenever
the user presses a key. onKeypress() provides per-keypress
validation, depending on the type of input, and it can be
overridden in derived classes to add additional per-key
validation or other onKeypress functionality.
References setOnKeyFunction().
|
virtual |
Sets up the input's built-in validator function for the input.
After this is called, inputValidator() will be called just
before the user leaves the input to validate the input.
inputValidator() can be overridden in derived classes to add
additional validation.
The built-in validator function is set up by default when a
cxMultiLineInput is created.
References setValidatorFunction().
Referenced by cxMultiLineInputSetValue().
|
virtual |
Returns whether or not the built-in onKeypress function is.
set up for the input.
References cx::cxFunction2::getFunction().
|
virtual |
Returns whether or not the built-in validator function is set.
up for the input.
References cx::cxFunction2::getFunction(), and mValidatorFunction.
Referenced by setValue().
| bool cx::cxMultiLineInput::validatorFuncMessageBox | ( | ) | const |
Returns whether or not the message box for errors is enabled.
in the input validator.
| void cx::cxMultiLineInput::validatorFuncMessageBox | ( | bool | pEnable | ) |
Sets whether or not a message box should be shown in the.
built-in validator function if the input is invalid.
| pEnable | Whether or not to enable showing a message box for errors in the input validator |
Referenced by cxMultiLineInputForceUpper(), cxMultiLineInputNonBlank(), cxMultiLineInputNumericFloatingPtWithRange(), cxMultiLineInputNumericWholeWithRange(), cxMultiLineInputTextValidation(), cxMultiLineInputTextValidationAutoCompletion(), and cxMultiLineInputTextValidationNonBlankForceUpper().
| bool cx::cxMultiLineInput::validatorFunctionIsSet | ( | ) | const |
Returns whether or not the validator function is set (if.
mValidatorFunction is not nullptr and if its function pointer is set)
References mValidatorFunction.
Referenced by showModal(), and cx::cxComboBox::showModal().
|
friend |
|
friend |
|
protected |
Whether or not to run the onFocus and onLeave functions.
Referenced by copyCxMultiLineInputStuff(), focusFunctionsWillRun(), runFocusFunctions(), and showModal().
|
protected |
This is the function to be run to validate.
the text bfore focus is lost.
Referenced by clearValidatorFunction(), runValidatorFunction(), setValidatorFunction(), setValidatorFunction(), setValidatorFunction(), setValidatorFunction(), usingBuiltInValidator(), and validatorFunctionIsSet().