diff options
Diffstat (limited to 'fluid/widgets/Formula_Input.cxx')
| -rw-r--r-- | fluid/widgets/Formula_Input.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fluid/widgets/Formula_Input.cxx b/fluid/widgets/Formula_Input.cxx index 06f5e3672..c7daefc5e 100644 --- a/fluid/widgets/Formula_Input.cxx +++ b/fluid/widgets/Formula_Input.cxx @@ -26,7 +26,7 @@ -/** \class fld::widget::Formula_Input +/** \class Formula_Input The Formula_Input widget is an input field for entering widget coordinates and sizes. It includes basic math capabilities and allows the use of variables in formulas. This widget is useful for specifying precise positions and @@ -36,18 +36,18 @@ /** Create an input field. */ -fld::widget::Formula_Input::Formula_Input(int x, int y, int w, int h, const char *l) +Formula_Input::Formula_Input(int x, int y, int w, int h, const char *l) : Fl_Input(x, y, w, h, l) { Fl_Input::callback((Fl_Callback*)callback_handler_cb); text("0"); } -void fld::widget::Formula_Input::callback_handler_cb(Formula_Input *This, void *v) { +void Formula_Input::callback_handler_cb(Formula_Input *This, void *v) { This->callback_handler(v); } -void fld::widget::Formula_Input::callback_handler(void *v) { +void Formula_Input::callback_handler(void *v) { if (user_callback_) (*user_callback_)(this, v); // do *not* update the value to show the evaluated formula here, because the @@ -63,7 +63,7 @@ void fld::widget::Formula_Input::callback_handler(void *v) { the last character of the variable name when returning. \return the integer value that was found or calculated */ -int fld::widget::Formula_Input::eval_var(uchar *&s) const { +int Formula_Input::eval_var(uchar *&s) const { if (!vars_) return 0; // find the end of the variable name @@ -86,7 +86,7 @@ int fld::widget::Formula_Input::eval_var(uchar *&s) const { \param prio priority of current operation \return the value so far */ -int fld::widget::Formula_Input::eval(uchar *&s, int prio) const { +int Formula_Input::eval(uchar *&s, int prio) const { int v = 0, sgn = 1; uchar c = *s++; @@ -158,7 +158,7 @@ int fld::widget::Formula_Input::eval(uchar *&s, int prio) const { \param s formula as a C string \return the calculated value */ -int fld::widget::Formula_Input::eval(const char *s) const +int Formula_Input::eval(const char *s) const { // duplicate the text, so we can modify it uchar *buf = (uchar*)fl_strdup(s); @@ -180,14 +180,14 @@ int fld::widget::Formula_Input::eval(const char *s) const /** Evaluate the formula and return the result. */ -int fld::widget::Formula_Input::value() const { +int Formula_Input::value() const { return eval(text()); } /** Set the field to an integer value, replacing previous texts. */ -void fld::widget::Formula_Input::value(int v) { +void Formula_Input::value(int v) { char buf[32]; fl_snprintf(buf, sizeof(buf), "%d", v); text(buf); @@ -196,7 +196,7 @@ void fld::widget::Formula_Input::value(int v) { /** Allow vertical mouse dragging and mouse wheel to interactively change the value. */ -int fld::widget::Formula_Input::handle(int event) { +int Formula_Input::handle(int event) { switch (event) { case FL_MOUSEWHEEL: if (Fl::event_dy()) { @@ -212,7 +212,7 @@ int fld::widget::Formula_Input::handle(int event) { /** Set the list of the available variables \param vars array of variables, last entry `has name_` set to `0` \param user_data is forwarded to the Variable callback */ -void fld::widget::Formula_Input::variables(Formula_Input_Vars *vars, void *user_data) { +void Formula_Input::variables(Formula_Input_Vars *vars, void *user_data) { vars_ = vars; vars_user_data_ = user_data; } |
