33 #include <wx/propgrid/propgrid.h>
35 #include <wx/stattext.h>
72 const wxString& caption,
const wxPoint& pos,
const wxSize&
size,
long style )
73 : m_MacroRep(¯o_rep)
87 SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
88 CDialog::Create( parent,
id, caption, pos,
size, style );
92 GetSizer()->SetSizeHints(
this);
137 wxBoxSizer* bs_vertical =
new wxBoxSizer(wxVERTICAL);
138 SetSizer(bs_vertical);
140 const int width = 350;
141 string msg =
"Please choose values for variables for the macro:\n";
143 wxStaticText*
label =
new wxStaticText(
this, wxID_STATIC,
ToWxString(
msg), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
145 bs_vertical->Add(
label, 0, wxALL, 5);
148 wxBoxSizer* bs_horizontal =
new wxBoxSizer(wxHORIZONTAL);
151 bs_vertical->Add(bs_horizontal, 0, wxALIGN_CENTER | wxALL, 5);
153 wxButton* ResetButton =
new wxButton(
this,
ID_BUTTON_RESET,
_(
"Reset"), wxDefaultPosition, wxDefaultSize, 0 );
154 bs_horizontal->Add(ResetButton, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
156 wxButton* CancelButton =
new wxButton(
this,
ID_BUTTON_CANCEL,
_(
"Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
157 bs_horizontal->Add(CancelButton, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
159 wxButton* DoneButton =
new wxButton(
this,
ID_BUTTON_DONE,
_(
"Done"), wxDefaultPosition, wxDefaultSize, 0 );
160 bs_horizontal->Add(DoneButton, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
166 wxPGProperty* property;
175 wxArrayString tchoices;
177 while (stored_value) {
181 property =
new wxEnumProperty (
ToWxString(pChoice->
GetName()), wxPG_LABEL, tchoices );
184 wxVariant variant =
property->GetValue();
virtual void SetRegistryPath(const string &path)
Class for parsed macro representation.
Class for "ask" variable representation (i.e.
Class for "choice" variable representation (i.e.
wxPropertyGrid * m_PropGridCtrl
void OnButtonCancelClick(wxCommandEvent &event)
bool Create(wxWindow *parent, wxWindowID id=ID_CVARRESOLVERDLG, const wxString &caption=_("Variable Resolver"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
CVarResolverDlg()
Constructor for DYNAMIC CLASS.
CRef< macro::CMacroRep > m_MacroRep
void OnButtonResetClick(wxCommandEvent &event)
void CreateControls()
Creates the controls and sizers.
~CVarResolverDlg()
Destructor.
TPropPairsList m_PropPairsList
void OnButtonDoneClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON
void Init()
Initialises member variables.
Abstract interface for variable representation.
const string & GetName() const
Get the name of stored variable.
virtual bool IsGUIResolvable() const =0
Returns true is the variable can be resolved via GUI.
const string * GetFirstChoice()
Get functions for stored choices.
const string & GetDefaultValue() const
Get default value.
const string * GetNextChoice()
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static const char label[]
const struct ncbi::grid::netcache::search::fields::SIZE size
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
Private types and data members.
macro::IMacroVar * m_MacroVar
wxString m_DefaultVisible
wxString ToWxString(const string &s)
string ToStdString(const wxString &s)