#include <AdamDlg.h>
List of all members.
Public Member Functions |
| AdamModalDialog (const std::string &sheet_definition, const adobe::dictionary_t &input, const adobe::dictionary_t &previous_property_state, AdamDialogDisplayOption display_option, GG::Wnd *dlg, AdamDialogActionCallback callback, boost::filesystem::path working_directory) |
bool | NeedUI () const |
template<class AdamValueType , class GGValueType , class ControlType > |
void | BindCell (ControlType &control, adobe::name_t cell) |
AdamDialogResult | Result () |
Public Attributes |
boost::signal< void(adobe::name_t,
const adobe::any_regular_t &)> | DialogActionSignal |
Detailed Description
The class that does the heavy lifting for the Adam modal dialog system.
Definition at line 106 of file AdamDlg.h.
Constructor & Destructor Documentation
GG::AdamModalDialog::AdamModalDialog |
( |
const std::string & |
sheet_definition, |
|
|
const adobe::dictionary_t & |
input, |
|
|
const adobe::dictionary_t & |
previous_property_state, |
|
|
AdamDialogDisplayOption |
display_option, |
|
|
GG::Wnd * |
dlg, |
|
|
AdamDialogActionCallback |
callback, |
|
|
boost::filesystem::path |
working_directory |
|
) |
| |
Ctor.
- Parameters:
-
sheet_definition | is a stream that will be parsed as the Adam sheet definition for this dialog. Note that the only requirement on the Adam sheet is that there exist an output cell called result that is defined to be a dictionary of values. The value of the result cell will be handed back in the m_result_values field of the AdamDialogResult upon return from this procedure. |
input | contains the input values for input cells as they are defined in the sheet. Each key in this dictionary should correspond to an input cell in the sheet to which the relevant value will be imposed. This can be a default-constructed dictionary, in which case input cells will be set to the values defined in their sheet initializers. |
previous_property_state | is the previously recorded property sheet state for the dialog, to be used to execute the dialog when running from an action or to retain the previoud instance of the dialog's values for the new dialog instance. |
display_option | is one of the three enumerations specified above, according to which semantic behavior you would like to get out of this routine. |
dlg | is the GG::Wnd that will act as the user-interactable dialog. |
callback | is the function proc that is called when a UI interaction in the modal dialog is performed by the user. |
- See also:
- AdamDialogActionCallback.
- Parameters:
-
working_directory | is the directory from which the dialog widgets should use to fetch disk-based resources. Whether or not this is necessary is predicated on the resource requirements of the widgets used in the dialog. |
Member Function Documentation
bool GG::AdamModalDialog::NeedUI |
( |
| ) |
const |
Returns true if the GG::Wnd dialog should be run, based on the display_option, and previous_property_state parameters passed to the ctor.
template<class AdamValueType , class GGValueType , class ControlType >
void GG::AdamModalDialog::BindCell |
( |
ControlType & |
control, |
|
|
adobe::name_t |
cell |
|
) |
| |
Binds a GG control to the Adam property sheet maintained by *this.
Definition at line 200 of file AdamDlg.h.
Member Data Documentation
Connect UI interaction signals from the GG::Wnd to this signal to have them handled by AdamDialogActionCallback passed to the ctor.
Definition at line 171 of file AdamDlg.h.
The documentation for this class was generated from the following file: