wxValidator& validator,
constwxString& name) :
84wxTextCtrl(parent,
id,
value, pos,
size, style | wxTE_PROCESS_ENTER, validator, name),
92SetBackgroundColour(*wxWHITE);
94SetBackgroundColour(*wxRED);
114 if(!GetValue().ToLong(&longVal))
return false;
115intVal = (
int) longVal;
125 int min,
int max,
intincrement,
intinitial,
126 constwxPoint& textCtrlPos,
constwxSize& textCtrlSize,
longtextCtrlStyle,
127 constwxPoint& spinCtrlPos,
constwxSize& spinCtrlSize) :
128minVal(
min), maxVal(
max), incrVal(increment)
138 if(initial <
min) initial =
min;
139 if(initial >
max) initial =
max;
146 if(value < minVal || value >
maxVal)
return false;
149strVal.Printf(
wxT(
"%i"),
value);
176 if(!
iTextCtrl->GetValue().ToLong(&longValue))
return false;
184 if(!
iTextCtrl->GetValue().ToLong(&longValue))
return false;
186 ERR_POST(
Warning<<
"IntegerSpinCtrl::GetUnsignedInteger() - possible signed/unsigned mismatch");
187*
value= (
unsigned int) longValue;
203 constwxValidator& validator,
constwxString& name) :
204wxTextCtrl(parent,
id,
value, pos,
size, style | wxTE_PROCESS_ENTER, validator, name),
212SetBackgroundColour(*wxWHITE);
214SetBackgroundColour(*wxRED);
232 return(GetValue().ToDouble(&doubleVal) && doubleVal >=
minVal&& doubleVal <=
maxVal);
241 double min,
double max,
doubleincrement,
doubleinitial,
242 constwxPoint& textCtrlPos,
constwxSize& textCtrlSize,
longtextCtrlStyle,
243 constwxPoint& spinCtrlPos,
constwxSize& spinCtrlSize) :
244minVal(
min), maxVal(
max), incrVal(increment)
254 if(initial <
min) initial =
min;
255 if(initial >
max) initial =
max;
262 if(value < minVal || value >
maxVal)
return false;
265strVal.Printf(
wxT(
"%g"),
value);
305 constwxString& message,
constwxString& title,
306 double min,
double max,
doubleincrement,
doubleinitial) :
307wxDialog(parent, -1, title, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
310wxPanel *panel =
newwxPanel(
this, -1);
311wxBoxSizer *item0 =
newwxBoxSizer(wxVERTICAL);
312wxStaticText *item1 =
newwxStaticText(panel, -1, message, wxDefaultPosition, wxDefaultSize, 0);
313item0->Add(item1, 0, wxALIGN_CENTRE|wxALL, 5);
314wxFlexGridSizer *
grid=
newwxFlexGridSizer(1, 0, 0, 0);
315 grid->AddGrowableCol(1);
317buttonOK =
newwxButton(panel, -1,
wxT(
"OK"), wxDefaultPosition, wxDefaultSize, 0);
318 grid->Add(buttonOK, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxRIGHT, 5);
321 min,
max, increment, initial,
322wxDefaultPosition, wxSize(80, SPIN_CTRL_HEIGHT), 0,
323wxDefaultPosition, wxSize(-1, SPIN_CTRL_HEIGHT));
324 grid->Add(fpSpinCtrl->GetTextCtrl(), 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5);
327item0->Add(
grid, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
328panel->SetAutoLayout(
true);
329panel->SetSizer(item0);
332item0->SetSizeHints(
this);
349 if(event.GetEventObject() ==
buttonOK) {
virtual void OnSpinButtonDown(wxSpinEvent &event)=0
bool GetDouble(double *value) const
void OnSpinButtonDown(wxSpinEvent &event)
FloatingPointSpinCtrl(wxWindow *parent, double min, double max, double increment, double initial, const wxPoint &textCtrlPos, const wxSize &textCtrlSize, long textCtrlStyle, const wxPoint &spinCtrlPos, const wxSize &spinCtrlSize)
void OnSpinButtonUp(wxSpinEvent &event)
FloatingPointTextCtrl * fpTextCtrl
bool SetDouble(double value)
void SetAllowedRange(double min, double max)
bool IsValidDouble(void) const
void OnChange(wxCommandEvent &event)
void DoValidate(wxCommandEvent &event)
FloatingPointSpinCtrl * fpSpinCtrl
~GetFloatingPointDialog(void)
void OnButton(wxCommandEvent &event)
void OnCloseWindow(wxCloseEvent &event)
IntegerTextCtrl * iTextCtrl
IntegerSpinCtrl(wxWindow *parent, int min, int max, int increment, int initial, const wxPoint &textCtrlPos, const wxSize &textCtrlSize, long textCtrlStyle, const wxPoint &spinCtrlPos, const wxSize &spinCtrlSize)
bool GetUnsignedInteger(unsigned int *value) const
bool GetInteger(int *value) const
void OnSpinButtonUp(wxSpinEvent &event)
bool SetInteger(int value)
void OnSpinButtonDown(wxSpinEvent &event)
void SetAllowedRange(int min, int max, int incr)
bool IsValidInteger(void) const
void DoValidate(wxCommandEvent &event)
void OnChange(wxCommandEvent &event)
void OnSpinButtonUp(wxSpinEvent &event)
void OnSpinButtonDown(wxSpinEvent &event)
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define test(a, b, c, d, e)
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
void Warning(CExceptionArgs_Base &args)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
unsigned int
A callback function used to compare two keys in a database.
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4