47 void init(
bool pEnableMouse =
true);
119 bool resizeTerm(
int pNewHeight,
int pNewWidth);
189 void messageBox(
int pRow,
int pCol,
int pHeight,
int pWidth,
const std::string& pTitle,
190 const std::string& pMessage,
const std::string& pStatus =
"",
201 void messageBox(
int pRow,
int pCol,
const std::string& pTitle,
202 const std::string& pMessage,
const std::string& pStatus);
211 void messageBox(
int pRow,
int pCol,
const std::string& pMessage);
213 void messageBox(
const std::string& pTitle,
const std::string& pMessage,
214 const std::string& pStatus =
"");
224 void messageBox(
const std::string& pTitle,
const std::string& pMessage,
225 const std::string& pStatus,
int pHeight,
int pWidth);
235 void messageBox(
const std::string& pMessage,
const std::string& pStatus,
int pHeight,
int pWidth);
249 attr_t pMessageAttr = A_NORMAL,
272 void splash(
const std::string& pTitle,
const std::string& pMessage,
int pSleep);
279 void splash(
const std::string& pMessage,
int pSleep);
375 std::string
bringToTop(
void* theWindow,
void* unused);
416 std::string
noOp(
void *p1,
void *p2);
429 std::string
noOp(
void *p1,
void *p2,
void *p3,
void *p4);
475 bool pConvertCase =
false,
bool pToUpper =
false);
580 bool promptYesNo(
const std::string& pMessage,
const std::string& pTitle =
"",
727 std::string
dump(
bool pFancy=
false,
const std::string& pFilename=
"");
768 std::string
getString(
int pRow,
int pCol,
int pNumber, WINDOW *pWin =
nullptr);
781 bool findString(
const std::string& pSearch,
int& pRow,
int& pCol, WINDOW *pWin =
nullptr);
Represents a text-based window on the screen. Can contain a title, status, and a message to appear wi...
Definition cxWindow.h:195
cxBorderChars.h - Defines border characters to be used in drawing a box (i.e., in cxWindow and all it...
Definition cxApp.cpp:5
std::string cxMenuShowModal(void *theMenu, void *unused)
Runs showModal() on a cxMenu and returns the result. This.
Definition cxUtils.cpp:607
std::string stringWithoutHotkeyChars(const std::string &pStr)
Takes a string and returns a version without the & characters.
std::string getTermType()
Returns a string representing the terminal type. This is the.
Definition cxUtils.cpp:508
e_cxColors getDefaultTitleColor()
Returns the default title color.
Definition cxUtils.cpp:333
void signalHandler(int pSignal)
Handler for system signals.
Definition cxUtils.cpp:1154
attr_t getAttr(const std::string &pAttr)
Figure out the appropriate ncurses attr_t from a "string".
void setAttr(e_WidgetItems pItem, attr_t pAttr)
Sets the ncurses attribute to use for one of the items in the.
Definition cxUtils.cpp:1237
std::string getWidgetItemStr(e_WidgetItems pItem)
Returns a string version of an e_WidgetItems value.
Definition cxUtils.cpp:1585
void messageDialog(const std::string &pMessage)
Shows a message dialog (a message box with an OK button)
void disableAttrs(WINDOW *pWindow, e_WidgetItems pItem)
Disables all of a set of attributes for a given item type on an.
Definition cxUtils.cpp:1472
int top()
Returns the top row # of the main screen.
Definition cxUtils.cpp:246
void messageBox(int pRow, int pCol, int pHeight, int pWidth, const std::string &pTitle, const std::string &pMessage, const std::string &pStatus="", eBorderStyle pBorderStyle=eBS_SINGLE_LINE)
Shows a message box.
void removeNavKey(int pKey)
Removes a key from cx's list of "navigational" keys.
Definition cxUtils.cpp:1900
e_cxColors getDefaultStatusColor()
Returns the default status color.
Definition cxUtils.cpp:343
e_WidgetItems
Definition cxWidgetItems.h:42
void enableAttrs(WINDOW *pWindow, e_WidgetItems pItem)
Enables all of a set of attributes for a given item type on an.
Definition cxUtils.cpp:1420
bool isFunctionKey(int pKey)
Returns whether a key is a function key, pageDown, or pageUp (these keys are tested by cxInput and cx...
Definition cxUtils.cpp:483
void addNavKey(int pKey)
Add a key to be considered a "navigational" key. The key will.
Definition cxUtils.cpp:1895
eInputTypes
Definition cxInputTypes.h:20
bool findString(const std::string &pSearch, int &pRow, int &pCol, WINDOW *pWin=nullptr)
Look for a string on the screen (for debugging/testing)
void removeAttrs(e_WidgetItems pItem)
Removes all attributes for a given window item.
Definition cxUtils.cpp:1328
cxWindow * getTopWindow()
Gets a pointer to the topmost cxWindow on the stack. This could.
Definition cxUtils.cpp:721
std::string getMouseStateStr(int pMouseState)
Returns a string version of a mouse state.
Definition cxUtils.cpp:983
void cleanup()
Cleans up the cxWidgets library. Must be called after all.
Definition cxUtils.cpp:231
void updateWindows()
Updates (refreshes) all windows on the screen.
Definition cxUtils.cpp:472
int bottom()
Returns the bottom row # of the main screen.
Definition cxUtils.cpp:261
void getAttrs(e_WidgetItems pItem, std::set< attr_t > &pAttrs)
Returns the set of ncurses attributes for a given item.
int runSystemCmd(const std::string &pCmd)
Runs a command on the system, calling the system() function.
std::string bringToTop(void *theWindow, void *unused)
Brings a cxWindow to the top of the stack. Doesn't refresh.
Definition cxUtils.cpp:583
bool isNavKey(int pKey)
Returns whether a key is a navigational key, according to.
Definition cxUtils.cpp:1890
std::string getKeyStr(int pKey)
Returns a string version of a key.
Definition cxUtils.cpp:751
cxWindow * getBottomWindow()
Gets a pointer to the bottom-most cxWindow on the stack. This could.
Definition cxUtils.cpp:736
static const std::string termType
Contains the terminal type string.
Definition cxUtils.h:322
void setDefaultBorderColor(e_cxColors pColor)
Sets the default border color.
Definition cxUtils.cpp:358
eInputOptions
Definition cxInputOptions.h:20
void setDefaultMessageColor(e_cxColors pColor)
Sets the default message color.
Definition cxUtils.cpp:328
void init(bool pEnableMouse=true)
Initializes the cxWidgets library. This must be called before.
Definition cxUtils.cpp:79
std::string dump(bool pFancy=false, const std::string &pFilename="")
dump the contents to the screen to a file
bool cxInitialized()
Returns whether or not cxWidgets has been initialized.
Definition cxUtils.cpp:1187
std::string getInputTypeStr(eInputTypes pInputType)
Returns a string version of an eInputType value.
Definition cxUtils.cpp:1131
std::string noOp(void *p1, void *p2)
Does nothing. Can be used, for example, as an event function.
Definition cxUtils.cpp:620
std::string getReturnCodeStr(long pReturnCode)
Returns a string version of a return code.
Definition cxUtils.cpp:1059
void setDefaultTitleColor(e_cxColors pColor)
Sets the default title color.
Definition cxUtils.cpp:338
e_cxColors getDefaultMessageColor()
Returns the default message color.
Definition cxUtils.cpp:323
int right()
Returns the rightmost column # of the main screen.
Definition cxUtils.cpp:286
bool colorIsBright(e_cxColors pColor)
Returns whether a color has the brightness bit set.
Definition cxUtils.cpp:527
void eraseScreen()
Erases the screen.
Definition cxUtils.cpp:461
eBorderStyle
Definition cxBorderStyles.h:26
@ eBS_SINGLE_LINE
Definition cxBorderStyles.h:28
int countHotkeys(const std::string &pStr)
Counts the number of hotkeys in a string. This is useful when working with cxMenu,...
int height()
Returns the height of the main screen.
Definition cxUtils.cpp:305
std::string getBorderStyleStr(eBorderStyle pBorderStyle)
Returns a string version of an eBorderStyle value.
Definition cxUtils.cpp:1108
void getHotkeyChars(const std::string &pStr, std::set< char > &pHotkeys, bool pConvertCase=false, bool pToUpper=false)
Scans a string for hotkeys (characters preceeded by an ampersand)
bool toggleCursor(bool pToggleCursor)
Enables or disables the display of the cursor.
Definition cxUtils.cpp:501
std::string getString(int pRow, int pCol, int pNumber, WINDOW *pWin=nullptr)
Get the contents of the screen (for debugging/testing)
Definition cxUtils.cpp:1905
void setDefaultStatusColor(e_cxColors pColor)
Sets the default status color.
Definition cxUtils.cpp:348
bool resizeTerm(int pNewHeight, int pNewWidth)
Resizes the terminal screen.
Definition cxUtils.cpp:318
@ cxYES_NO
Definition cxMessageDialogStyles.h:18
void writeText(int pRow, int pCol, const std::string &pText, attr_t pAttr=A_NORMAL, e_cxColors pColor=eGRAY_BLACK)
Writes text on the screen.
e_cxColors getDefaultBorderColor()
Returns the default border color.
Definition cxUtils.cpp:353
bool promptYesNo(const std::string &pMessage, const std::string &pTitle="", long pButtons=cxYES_NO)
Prompts the user with a cxMessageDialog for a yes/no choice.
int width()
Returns the width of the main screen.
Definition cxUtils.cpp:296
void splash(const std::string &pTitle, const std::string &pMessage, int pSleep)
Shows a splash message.
std::string getAttrStr(attr_t pAttr)
Returns a string version of an ncurses attribute.
Definition cxUtils.cpp:1554
bool hasAttr(e_WidgetItems pItem, attr_t pAttr)
Determine if the widget has an attribute "set".
Definition cxUtils.cpp:1410
void removeAttr(e_WidgetItems pItem, attr_t pAttr)
Removes an ncurses attribute from one of the item lists.
Definition cxUtils.cpp:1283
int left()
Returns the leftmost column # of the main screen.
Definition cxUtils.cpp:270
std::string getInputOptionStr(eInputOptions pInputOption)
Returns a string version of a value from the eInputOptions.
Definition cxUtils.cpp:1088
void showAllWindows(bool pBringToTop=false)
Shows all windows currently in use everywhere, from the.
Definition cxUtils.cpp:692
void getTermDimensions(int &pHeight, int &pWidth)
Returns the terminal's current height & width.
Definition cxUtils.cpp:312
int centerCol()
Returns the center column # of the main screen.
Definition cxUtils.cpp:278
int getMenuClearKeywordKey()
Returns the key that is set to clear the "Keyword" input for.
Definition cxUtils.cpp:1631
int centerRow()
Returns the center row # of the main screen.
Definition cxUtils.cpp:253
unsigned visualStrLen(const std::string &pStr)
Returns the length of a string without its hotkey characters -.
std::string cxFormShowModal(void *theForm, void *unused)
Runs showModal() on a cxForm and returns the result. This.
Definition cxUtils.cpp:594
void addAttr(e_WidgetItems pItem, attr_t pAttr)
Adds an ncurses attribute to use for one of the items in the.
Definition cxUtils.cpp:1192
e_cxColors
Definition cxColors.h:46
@ eGRAY_BLACK
Definition cxColors.h:67
void setMenuClearKeywordKey(int pKey)
Sets the key that should be used to clear the "Keyword" input.
Definition cxUtils.cpp:1626