2#ifndef __CXMULTILINEINPUT_H__
3#define __CXMULTILINEINPUT_H__
178 int pCol = 0,
int pHeight = 1,
180 const std::string& pLabel =
"",
184 std::string *pExtValue =
nullptr,
185 int pRightLabelOffset = 0,
186 int pRightLabelHeight = 1,
187 int pRightLabelWidth = 7,
188 bool pShowRightLabel =
false);
216 virtual long show(
bool pBringToTop =
false,
bool pShowSubwindows =
false)
override;
232 virtual long showModal(
bool pShowSelf =
true,
bool pBringToTop =
true,
233 bool pShowSubwindows =
false)
override;
240 void hide(
bool pHideSubwindows =
false)
override;
247 void unhide(
bool pUnhideSubwindows =
false)
override;
254 virtual void erase(
bool pEraseSubwindows =
true)
override;
260 virtual std::string
getLabel()
const;
266 virtual void setLabel(
const std::string& pLabel);
274 virtual void clearValue(
bool pRefresh =
false);
283 virtual void clear(
bool pRefresh =
false)
override;
289 virtual std::string
getValue()
const;
299 virtual bool setValue(std::string pValue,
bool pRefresh =
false);
312 void setExtValue(std::string *pExtVal,
bool pRefresh =
false);
375 virtual bool move(
int pNewRow,
int pNewCol,
bool pRefresh =
true)
override;
384 virtual void resize(
int pNewHeight,
int pNewWidth,
bool pRefresh =
true)
override;
395 virtual bool setKeyFunction(
int pKey,
const std::shared_ptr<cxFunction>& pFunction)
override;
422 void *p1,
void *p2,
void *p3,
void *p4,
423 bool pUseVal,
bool pExitAfterRun =
false,
424 bool pRunOnLeaveFunction =
true)
override;
452 void *p1,
void *p2,
void *p3,
void *p4,
453 bool pUseVal,
bool pExitAfterRun,
454 bool pRunOnLeaveFunction,
bool pRunValidator);
475 void *p1,
void *p2,
bool pUseVal,
476 bool pExitAfterRun =
false,
477 bool pRunOnLeaveFunction =
true)
override;
503 void *p1,
void *p2,
bool pUseVal,
504 bool pExitAfterRun,
bool pRunOnLeaveFunction,
525 bool pExitAfterRun =
false,
526 bool pRunOnLeaveFunction =
true)
override;
551 bool pExitAfterRun,
bool pRunOnLeaveFunction,
668 static std::string
clearInput(
void* theInput,
void* unused);
832 virtual bool hasFocus()
const override;
903 virtual void bringToTop(
bool pRefresh =
true)
override;
967 virtual bool addQuitKey(
int pKey,
bool pRunOnLeaveFunction =
true,
968 bool pOverride =
false)
override;
991 virtual bool addExitKey(
int pKey,
bool pRunOnLeaveFunction =
true,
992 bool pOverride =
false)
override;
1134 virtual void setLastKey(
int pLastKey)
override;
1152 virtual void setEnabled(
bool pEnabled)
override;
1164 virtual void quitNow(
bool pMoveForward);
1170 virtual void quitNow()
override;
1182 virtual void exitNow(
bool pMoveForward);
1188 virtual void exitNow()
override;
1365 virtual void getNavKeys(std::set<int>& pNavKeys)
const;
1392 virtual std::string
cxTypeStr()
const override;
1484 void getRangeDouble(
long double &pLow,
long double &pHigh)
const;
1492 void setRangeDouble(
const long double &pLow,
const long double &pHigh);
1500 void getRangeInt(
long int &pLow,
long int &pHigh);
1508 void setRangeInt(
const long int &pLow,
const long int &pHigh);
1608 bool pValidate =
true);
1621 bool pValidate =
true);
1633 bool pValidate =
true);
1646 const std::string& pRightLabelText =
"",
1647 bool pValidate =
true);
1657 virtual void getValidOptions(std::map<std::string, std::string>& pValidOptions)
const;
1987 virtual void resizeRightLabel(
int pHeight,
int pWidth,
bool pRefresh =
false);
2006 virtual void setRightLabel(
int pOffset,
const std::string& pText,
bool pRefresh =
false);
2163 long doInputLoop(
bool pShowInputs,
bool& pRunOnLeaveFunction);
2202 bool pIncludeNavigationalKeys =
false);
2225 bool *pRunOnLeaveFunction =
nullptr)
override;
2257 typedef std::vector<std::shared_ptr<cxInput> > cxInputPtrContainer;
2258 cxInputPtrContainer mInputs;
2263 std::string *mExtValue;
2264 int mCurrentInputLine = 0;
2269 bool mEnterAlwaysExits =
true;
2270 bool mReadOnlyOnLeave =
false;
2271 bool mExitOnFull =
true;
2272 bool mDoInputLoop =
true;
2273 bool mSkipIfReadOnly =
true;
2274 bool mRunValidatorFunction =
true;
2275 bool mUseClearKey =
true;
2279 bool mValidateOnReverse =
true;
2283 cxForm *mParentForm =
nullptr;
2287 bool mApplyAttrDefaults =
true;
2291 bool mRanFunctionAndShouldExit =
false;
2295 std::set<int> mSkipValidatorKeys;
2306 std::set<int> mNavKeys;
2317 std::map<std::string, std::string> mValidOptionStrings;
2321 bool mAutoGenerateExtendedHelp =
false;
2326 long double mRangeLowDouble = 0.0;
2327 long double mRangeHighDouble = 0.0;
2331 long int mRangeLowInt = 0;
2332 long int mRangeHighInt = 0;
2336 bool mValidatorFuncMessageBox =
false;
2338 bool mAllowBlank =
true;
2342 std::string mExtendedHelp;
2344 attr_t mExtendedHelpAttribute = A_NORMAL;
2348 std::set<int> mExtendedHelpKeys;
2349 bool mUseExtendedHelpKeys =
true;
2355 std::unique_ptr<cxWindow> mRightLabel;
2356 int mRightLabelOffset;
2357 bool mShowRightLabel;
2359 int mMaxInputLength = 32000;
2367 void setHotkeyHighlighting(
bool pMessageUnderlines)
override;
2371 virtual void draw()
override;
2384 bool usingOnKeyNumericValidator()
const;
2392 static std::string inputValidatorStatic(
void *theInput,
void *unused);
2400 static std::string onKeypressStatic(
void *theInput,
void *unused);
2404 void generateExtendedHelp();
2410 bool checkValidOptionStrings(
const std::string& pValue);
2421 bool valueInRange(
const std::string& pValue)
const;
2430 void reflowFrom(
int pFromLine);
2434 std::string getAllText()
const;
2438 void setAllTextWrapped(
const std::string& pText);
2441 bool mWordWrap =
true;
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_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
e_WidgetItems
Definition cxWidgetItems.h:42
std::string(* funcPtr0)()
Definition cxFunction.h:19
eInputTypes
Definition cxInputTypes.h:20
@ eINPUT_TYPE_TEXT
Definition cxInputTypes.h:21
std::string(* funcPtr2)(void *p1, void *p2)
Definition cxFunction.h:20
eInputOptions
Definition cxInputOptions.h:20
@ eINPUT_EDITABLE
Definition cxInputOptions.h:21
eMLIF
Definition cxMultiLineInput.h:37
@ eMLIF_COMMA_SEP_WITH_DESC
Definition cxMultiLineInput.h:39
@ eMLIF_COMMA_SEP
Definition cxMultiLineInput.h:38
eBorderStyle
Definition cxBorderStyles.h:26
@ eBS_NOBORDER
Definition cxBorderStyles.h:27
eInputErrors
Definition cxMultiLineInput.h:46
@ eOUT_OF_RANGE
Definition cxMultiLineInput.h:48
@ eINVALID_VALUE
Definition cxMultiLineInput.h:49
@ eNO_ERROR
Definition cxMultiLineInput.h:47
@ eBLANK
Definition cxMultiLineInput.h:50
@ eCUSTOM_VALIDATION_FAILED
Definition cxMultiLineInput.h:51
e_cxColors
Definition cxColors.h:46