2#ifndef __CXMESSAGEDIALOG_H__
3#define __CXMESSAGEDIALOG_H__
17#define CANCELBTN_HEIGHT 3
18#define CANCELBTN_WIDTH 8
19#define YESBTN_HEIGHT 3
47 const std::string& pTitle =
"",
48 const std::string& pMessage =
"",
50 const std::string& pStatus =
"");
70 cxMessageDialog(
cxWindow *pParentWindow,
const std::string& pTitle,
const std::string& pMessage,
int pHeight,
int pWidth);
96 virtual long showModal(
bool pShowSelf =
true,
bool pBringToTop =
true,
97 bool pShowSubwindows =
true)
override;
104 virtual void hide(
bool pHideSubwindows =
true)
override;
111 virtual void unhide(
bool pUnhideSubwindows =
true)
override;
121 virtual bool move(
int pNewRow,
int pNewCol,
bool pRefresh =
true)
override;
127 virtual std::shared_ptr<cxButton>
getOKButton()
const {
return(mOKBtn); }
136 virtual long setFocus(
bool pShowSelf =
true,
bool pBringToTop =
true,
bool pShowSubwindows =
true)
override;
143 void setFocus(
const std::shared_ptr<cxButton>& pButton,
bool pShow=
true);
152 virtual std::string
cxTypeStr()
const override;
162 std::shared_ptr<cxButton> mOKBtn;
163 std::shared_ptr<cxButton> mCancelBtn;
166 virtual long show(
bool pBringToTop =
false,
bool pShowSubwindows =
true)
override
168 return(
showModal(
true, pBringToTop, pShowSubwindows));
Represents a dialog window on the screen (i.e., something to be shown.
Definition cxDialog.h:20
Represents a dialog box with "OK" and/or "Cancel".
Definition cxMessageDialog.h:29
virtual long setFocus(bool pShowSelf=true, bool pBringToTop=true, bool pShowSubwindows=true) override
Alias for showModal()
Definition cxMessageDialog.cpp:304
long doInputLoop()
Definition cxMessageDialog.cpp:360
cxMessageDialog(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="", long pStyle=cxOK|cxCANCEL, const std::string &pStatus="")
virtual ~cxMessageDialog()
Definition cxMessageDialog.cpp:195
virtual long showModal(bool pShowSelf=true, bool pBringToTop=true, bool pShowSubwindows=true) override
Shows the dialog, waits for input, and returns the code.
Definition cxMessageDialog.cpp:199
virtual void unhide(bool pUnhideSubwindows=true) override
Definition cxMessageDialog.cpp:251
virtual void hide(bool pHideSubwindows=true) override
Definition cxMessageDialog.cpp:236
cxMessageDialog(cxWindow *pParentWindow, const std::string &pTitle, const std::string &pMessage)
virtual std::string cxTypeStr() const override
Returns the name of the cxWidgets class. This can be used to.
Definition cxMessageDialog.cpp:353
virtual bool move(int pNewRow, int pNewCol, bool pRefresh=true) override
Changes the window's position, based on a new upper-left corner.
Definition cxMessageDialog.cpp:269
virtual std::shared_ptr< cxButton > getOKButton() const
get a pointer to the the OK/Yes button
Definition cxMessageDialog.h:127
virtual std::shared_ptr< cxButton > getCancelButton() const
get a pointer to the the Cancel/NO button
Definition cxMessageDialog.h:133
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
@ cxCANCEL
Definition cxMessageDialogStyles.h:17
@ cxOK
Definition cxMessageDialogStyles.h:15