2#ifndef __CXSEARCHPANEL_H__
3#define __CXSEARCHPANEL_H__
41 int pRow = 0,
int pCol = 0,
44 const std::string& pFormTitle =
"",
45 const std::string& pMenuTitle =
"",
63 const std::shared_ptr<cxForm>&
getForm()
const;
70 const std::shared_ptr<cxMenu>&
getMenu()
const;
94 virtual std::shared_ptr<cxMultiLineInput>
appendToForm(
int pRow,
int pCol,
int pHeight,
95 int pWidth,
const std::string& pLabel,
96 const std::string& pValidator =
"",
97 const std::string& pHelpString =
"",
99 const std::string& pName =
"",
100 std::string *pExtValue =
nullptr);
123 int pWidth,
const std::string& pLabel,
124 const std::string& pValidator =
"",
125 const std::string& pHelpString =
"",
127 const std::string& pName =
"",
128 std::string *pExtValue =
nullptr);
141 virtual void appendToMenu(
const std::string& pDisplayText,
long pReturnCode,
142 const std::string& pHelpString =
"",
143 const std::string& pItemText =
"",
157 virtual void appendToMenu(
const std::string& pDisplayText,
const std::string& pHelpString =
"",
158 const std::string& pItemText =
"",
168 virtual void clearFormInputs(
bool pRefresh =
false,
bool pOnlyEditable =
false);
175 virtual void clearMenu(
bool pRefresh =
false);
193 void *p3,
void *p4,
bool pUseVal =
false,
194 bool pExitAfterRun =
false);
210 bool pUseVal =
false,
211 bool pExitAfterRun =
false);
225 bool pExitAfterRun =
false);
272 void *p3,
void *p4,
bool pUseVal =
false,
273 bool pExitAfterRun =
false);
287 bool pUseVal =
false,
bool pExitAfterRun =
false);
299 bool pUseVal =
false,
bool pExitAfterRun =
false);
340 virtual void resize(
int pNewHeight,
int pNewWidth,
bool pRefresh =
true)
override;
349 virtual void setFormHeight(
int pNewHeight,
bool pRefresh =
true);
358 virtual void setMenuHeight(
int pNewHeight,
bool pRefresh =
true);
365 virtual std::string
cxTypeStr()
const override;
436 void *p1,
void *p2,
void *p3,
void *p4,
437 bool pUseReturnVal =
false,
438 bool pExitAfterRun =
false,
439 bool pRunOnLeaveFunction =
true);
464 bool pUseReturnVal =
false,
465 bool pExitAfterRun =
false,
466 bool pRunOnLeaveFunction =
true);
488 bool pUseReturnVal =
false,
489 bool pExitAfterRun =
false,
490 bool pRunOnLeaveFunction =
true);
540 void *p1,
void *p2,
void *p3,
void *p4,
541 bool pUseReturnVal =
false,
542 bool pExitAfterRun =
false,
543 bool pRunOnLeaveFunction =
true);
568 bool pUseReturnVal =
false,
569 bool pExitAfterRun =
false,
570 bool pRunOnLeaveFunction =
true);
592 bool pUseReturnVal =
false,
593 bool pExitAfterRun =
false,
594 bool pRunOnLeaveFunction =
true);
638 void *p2,
void *p3,
void *p4,
640 bool pRunOnLeaveFunction);
658 void *p2,
bool pExitAfterRun,
659 bool pRunOnLeaveFunction);
676 bool pRunOnLeaveFunction);
720 std::shared_ptr<cxForm> mForm;
721 std::shared_ptr<cxMenu> mMenu;
732 void checkEventFunctionPointers(
const cxSearchPanel& pPanel);
741 static std::string formReverseNavigation(
void *theSearchPanel,
void *unused);
746 static std::string menuOnESC(
void *theSearchPanel,
void *unused);
750 static std::string menuOnSelect(
void *theSearchPanel,
void *unused);
cxPanel is a window that contains other windows. When showModal()
Definition cxPanel.h:46
This class is based on cxPanel, and it contains a cxForm at the top.
Definition cxSearchPanel.h:25
virtual std::shared_ptr< cxComboBox > appendComboBoxToForm(int pRow, int pCol, int pHeight, int pWidth, const std::string &pLabel, const std::string &pValidator="", const std::string &pHelpString="", eInputOptions pInputKind=eINPUT_EDITABLE, const std::string &pName="", std::string *pExtValue=nullptr)
Adds a combo box to the form. Returns a pointer to the new input.
Definition cxSearchPanel.cpp:133
virtual std::string getSelectedItem(bool pDisplayText=true) const
Returns text of the item selected from the menu, if there was.
Definition cxSearchPanel.cpp:558
virtual void clearFormKeyFunctions()
Clears the form's list of external functions fired by hotkeys.
Definition cxSearchPanel.cpp:405
cxSearchPanel(cxWindow *pParentWindow=nullptr, int pRow=0, int pCol=0, int pHeight=DEFAULT_HEIGHT, int pWidth=DEFAULT_WIDTH, const std::string &pFormTitle="", const std::string &pMenuTitle="", eBorderStyle pFormBorderStyle=eBS_SINGLE_LINE, eBorderStyle pMenuBorderStyle=eBS_SINGLE_LINE)
Default constructor.
const std::shared_ptr< cxForm > & getForm() const
Returns a pointer to the cxForm on the panel.
Definition cxSearchPanel.cpp:114
virtual void clearFormOnEnterFunction()
Removes the onEnter function from the form.
Definition cxSearchPanel.cpp:334
virtual bool setFormCurrent()
Makes the form be the current window.
Definition cxSearchPanel.cpp:573
virtual void clearFormInputs(bool pRefresh=false, bool pOnlyEditable=false)
Clears the inputs on the form.
Definition cxSearchPanel.cpp:159
virtual std::string cxTypeStr() const override
Returns the name of the cxWidgets class ("cxSearchPanel").
Definition cxSearchPanel.cpp:284
virtual bool setFormKeyFunction(int pFunctionKey, funcPtr4 pFunction, void *p1, void *p2, void *p3, void *p4, bool pUseReturnVal=false, bool pExitAfterRun=false, bool pRunOnLeaveFunction=true)
Adds a function to the form to call when the user presses some.
Definition cxSearchPanel.cpp:347
virtual void setMenuOnFocusFunction(funcPtr4 pFunction, void *p1, void *p2, void *p3, void *p4, bool pUseVal=false, bool pExitAfterRun=false)
Sets the onFocus function for the menu.
Definition cxSearchPanel.cpp:203
virtual void clearMenu(bool pRefresh=false)
Removes the menu items.
Definition cxSearchPanel.cpp:164
virtual void setMenuHeight(int pNewHeight, bool pRefresh=true)
Sets the menu's height. The form will also be re-sized accordingly.
Definition cxSearchPanel.cpp:270
virtual void resize(int pNewHeight, int pNewWidth, bool pRefresh=true) override
Changes the width and height, and re-sizes the form and menu.
Definition cxSearchPanel.cpp:237
virtual void clearMenuKeyFunction(int pFunctionKey)
Removes a hotkey from the menu so that it will not.
Definition cxSearchPanel.cpp:472
virtual void appendToMenu(const std::string &pDisplayText, long pReturnCode, const std::string &pHelpString="", const std::string &pItemText="", cxMenuItemType pType=cxITEM_NORMAL)
Adds a string item to the end of the menu.
virtual void appendToMenu(const std::string &pDisplayText, const std::string &pHelpString="", const std::string &pItemText="", cxMenuItemType pType=cxITEM_NORMAL)
Adds a string item to the end of the menu, defaulting the.
void setFormOnFocusFunction(funcPtr4 pFuncPtr, void *p1, void *p2, void *p3, void *p4, bool pUseVal=false, bool pExitAfterRun=false)
Sets the onFocus funtion for the form.
Definition cxSearchPanel.cpp:169
virtual bool setMenuCurrent()
Makes the menu be the current window.
Definition cxSearchPanel.cpp:578
void copyCxSearchPanelStuff(const cxSearchPanel *pThatPanel)
Makes a copy of another cxSearchPanel.
Definition cxSearchPanel.cpp:585
virtual bool setMenuKeyFunction(int pFunctionKey, funcPtr4 pFunction, void *p1, void *p2, void *p3, void *p4, bool pUseReturnVal=false, bool pExitAfterRun=false, bool pRunOnLeaveFunction=true)
Adds a function to the menu to call when the user presses some.
Definition cxSearchPanel.cpp:425
virtual bool itemWasSelected() const
Returns whether or not an item was selected from the menu.
Definition cxSearchPanel.cpp:546
const std::shared_ptr< cxMenu > & getMenu() const
Returns a pointer to the cxMenu on the panel.
Definition cxSearchPanel.cpp:119
virtual void setFormHeight(int pNewHeight, bool pRefresh=true)
Sets the form's height. The menu will also be re-sized accordingly.
Definition cxSearchPanel.cpp:256
virtual void setMenuOnLeaveFunction(funcPtr4 pFunction, void *p1, void *p2, void *p3, void *p4)
Sets the onLeave function for the menu.
Definition cxSearchPanel.cpp:221
virtual bool setFormOnEnterFunction(funcPtr4 pFunction, void *p1, void *p2, void *p3, void *p4)
Sets a function to be called when the enter key is pressed on.
Definition cxSearchPanel.cpp:289
virtual bool menuHasKeyFunction(int pFunctionKey) const
Returns whether the menu has a function hotkey set up to.
Definition cxSearchPanel.cpp:488
virtual bool setMenuOnSelectItemFunction(funcPtr4 pFunction, void *p1, void *p2, void *p3, void *p4, bool pExitAfterRun, bool pRunOnLeaveFunction)
Sets a function to run when the user selects an item from the.
Definition cxSearchPanel.cpp:500
virtual std::shared_ptr< cxMultiLineInput > appendToForm(int pRow, int pCol, int pHeight, int pWidth, const std::string &pLabel, const std::string &pValidator="", const std::string &pHelpString="", eInputOptions pInputKind=eINPUT_EDITABLE, const std::string &pName="", std::string *pExtValue=nullptr)
Adds an input to the form and returns a pointer to the new.
Definition cxSearchPanel.cpp:124
virtual void clearMenuKeyFunctions()
Clears the menu's list of external functions fired by hotkeys.
Definition cxSearchPanel.cpp:480
virtual ~cxSearchPanel()
Definition cxSearchPanel.cpp:110
void setFormOnLeaveFunction(funcPtr4 pFuncPtr, void *p1, void *p2, void *p3, void *p4)
Sets the onLeave function for the form.
Definition cxSearchPanel.cpp:187
virtual bool formHasKeyFunction(int pFunctionKey) const
Returns whether the form has a function hotkey set up to.
Definition cxSearchPanel.cpp:413
virtual void clearFormKeyFunction(int pFunctionKey)
Removes a hotkey from the form so that it will not.
Definition cxSearchPanel.cpp:397
Represents a text-based window on the screen. Can contain a title, status, and a message to appear wi...
Definition cxWindow.h:195
#define DEFAULT_HEIGHT
Definition cxWindow.h:68
#define DEFAULT_WIDTH
Definition cxWindow.h:69
cxBorderChars.h - Defines border characters to be used in drawing a box (i.e., in cxWindow and all it...
Definition cxApp.cpp:5
std::string(* funcPtr4)(void *p1, void *p2, void *p3, void *p4)
Definition cxFunction.h:21
std::string(* funcPtr0)()
Definition cxFunction.h:19
std::string(* funcPtr2)(void *p1, void *p2)
Definition cxFunction.h:20
cxMenuItemType
Definition cxMenuItemType.h:14
@ cxITEM_NORMAL
Definition cxMenuItemType.h:15
eInputOptions
Definition cxInputOptions.h:20
@ eINPUT_EDITABLE
Definition cxInputOptions.h:21
eBorderStyle
Definition cxBorderStyles.h:26
@ eBS_SINGLE_LINE
Definition cxBorderStyles.h:28