diff options
| author | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 19:04:24 +0500 |
|---|---|---|
| committer | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 19:04:24 +0500 |
| commit | 793fa5a91f24358aa7ce21abf6ee4e93a17b04ee (patch) | |
| tree | e81d1e60ffdf068ac1e93e8d36d9c2046b2d7c50 /fluid/widgets/Node_Browser.cxx | |
| parent | b4995f979d127cea667b4e2b71c91e9db4ab52ef (diff) | |
wip
Diffstat (limited to 'fluid/widgets/Node_Browser.cxx')
| -rw-r--r-- | fluid/widgets/Node_Browser.cxx | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/fluid/widgets/Node_Browser.cxx b/fluid/widgets/Node_Browser.cxx index 7482298b5..4aa3660ab 100644 --- a/fluid/widgets/Node_Browser.cxx +++ b/fluid/widgets/Node_Browser.cxx @@ -28,7 +28,7 @@ // ---- global variables /// Global access to the widget browser. -fld::widget::Node_Browser *widget_browser = 0; +Node_Browser *widget_browser = 0; @@ -49,18 +49,18 @@ fld::widget::Node_Browser *widget_browser = 0; // ---- static variables -Fl_Color fld::widget::Node_Browser::label_color = 72; -Fl_Font fld::widget::Node_Browser::label_font = FL_HELVETICA; -Fl_Color fld::widget::Node_Browser::class_color = FL_FOREGROUND_COLOR; -Fl_Font fld::widget::Node_Browser::class_font = FL_HELVETICA_BOLD; -Fl_Color fld::widget::Node_Browser::func_color = FL_FOREGROUND_COLOR; -Fl_Font fld::widget::Node_Browser::func_font = FL_HELVETICA; -Fl_Color fld::widget::Node_Browser::name_color = FL_FOREGROUND_COLOR; -Fl_Font fld::widget::Node_Browser::name_font = FL_HELVETICA; -Fl_Color fld::widget::Node_Browser::code_color = FL_FOREGROUND_COLOR; -Fl_Font fld::widget::Node_Browser::code_font = FL_HELVETICA; -Fl_Color fld::widget::Node_Browser::comment_color = FL_DARK_GREEN; -Fl_Font fld::widget::Node_Browser::comment_font = FL_HELVETICA; +Fl_Color Node_Browser::label_color = 72; +Fl_Font Node_Browser::label_font = FL_HELVETICA; +Fl_Color Node_Browser::class_color = FL_FOREGROUND_COLOR; +Fl_Font Node_Browser::class_font = FL_HELVETICA_BOLD; +Fl_Color Node_Browser::func_color = FL_FOREGROUND_COLOR; +Fl_Font Node_Browser::func_font = FL_HELVETICA; +Fl_Color Node_Browser::name_color = FL_FOREGROUND_COLOR; +Fl_Font Node_Browser::name_font = FL_HELVETICA; +Fl_Color Node_Browser::code_color = FL_FOREGROUND_COLOR; +Fl_Font Node_Browser::code_font = FL_HELVETICA; +Fl_Color Node_Browser::comment_color = FL_DARK_GREEN; +Fl_Font Node_Browser::comment_font = FL_HELVETICA; // ---- global functions @@ -75,7 +75,7 @@ void redraw_browser() { Shortcut to create the widget browser. */ Fl_Widget *make_widget_browser(int x,int y,int w,int h) { - return (widget_browser = new fld::widget::Node_Browser(x,y,w,h)); + return (widget_browser = new Node_Browser(x,y,w,h)); } /** @@ -213,7 +213,7 @@ static char *copy_trunc(char *p, const char *str, int maxl, int quote, int trunc \todo It would be nice to be able to grab one or more nodes and move them within the hierarchy. */ -fld::widget::Node_Browser::Node_Browser(int X,int Y,int W,int H,const char*l) : +Node_Browser::Node_Browser(int X,int Y,int W,int H,const char*l) : Fl_Browser_(X,Y,W,H,l) { type(FL_MULTI_BROWSER); @@ -225,7 +225,7 @@ fld::widget::Node_Browser::Node_Browser(int X,int Y,int W,int H,const char*l) : Override the method to find the first item in the list of elements. \return the first item */ -void *fld::widget::Node_Browser::item_first() const { +void *Node_Browser::item_first() const { return Fluid.proj.tree.first; } @@ -234,7 +234,7 @@ void *fld::widget::Node_Browser::item_first() const { \param l this item \return the next item, irregardless of tree depth, or 0 at the end */ -void *fld::widget::Node_Browser::item_next(void *l) const { +void *Node_Browser::item_next(void *l) const { return ((Node*)l)->next; } @@ -243,7 +243,7 @@ void *fld::widget::Node_Browser::item_next(void *l) const { \param l this item \return the previous item, irregardless of tree depth, or 0 at the start */ -void *fld::widget::Node_Browser::item_prev(void *l) const { +void *Node_Browser::item_prev(void *l) const { return ((Node*)l)->prev; } @@ -253,7 +253,7 @@ void *fld::widget::Node_Browser::item_prev(void *l) const { \return 1 if selected, 0 if not \todo what is the difference between selected and new_selected, and why do we do this? */ -int fld::widget::Node_Browser::item_selected(void *l) const { +int Node_Browser::item_selected(void *l) const { return ((Node*)l)->new_selected; } @@ -262,7 +262,7 @@ int fld::widget::Node_Browser::item_selected(void *l) const { \param l this item \param[in] v 1 if selecting, 0 if not */ -void fld::widget::Node_Browser::item_select(void *l,int v) { +void Node_Browser::item_select(void *l,int v) { ((Node*)l)->new_selected = v; } @@ -271,7 +271,7 @@ void fld::widget::Node_Browser::item_select(void *l,int v) { \param l this item \return height in FLTK units (used to be pixels before high res screens) */ -int fld::widget::Node_Browser::item_height(void *l) const { +int Node_Browser::item_height(void *l) const { Node *t = (Node*)l; if (t->visible) { if (Fluid.show_comments && t->comment()) @@ -286,7 +286,7 @@ int fld::widget::Node_Browser::item_height(void *l) const { Override the method to return the estimated height of all items. \return height in FLTK units */ -int fld::widget::Node_Browser::incr_height() const { +int Node_Browser::incr_height() const { return textsize() + 5 + linespacing(); } @@ -311,7 +311,7 @@ int fld::widget::Node_Browser::incr_height() const { \param X,Y these give the position in window coordinates of the top left corner of this line */ -void fld::widget::Node_Browser::item_draw(void *v, int X, int Y, int, int) const { +void Node_Browser::item_draw(void *v, int X, int Y, int, int) const { // cast to a more general type Node *l = (Node *)v; @@ -455,7 +455,7 @@ void fld::widget::Node_Browser::item_draw(void *v, int X, int Y, int, int) const \param v this item \return width in FLTK units */ -int fld::widget::Node_Browser::item_width(void *v) const { +int Node_Browser::item_width(void *v) const { char buf[500]; // edit buffer: large enough to hold 80 UTF-8 chars + nul @@ -490,7 +490,7 @@ int fld::widget::Node_Browser::item_width(void *v) const { /** Callback to tell the Fluid UI when the list of selected items changed. */ -void fld::widget::Node_Browser::callback() { +void Node_Browser::callback() { selection_changed((Node*)selection()); } @@ -508,7 +508,7 @@ void fld::widget::Node_Browser::callback() { \param[in] e the incoming event type \return 0 if the event is not supported, and 1 if the event was "used up" */ -int fld::widget::Node_Browser::handle(int e) { +int Node_Browser::handle(int e) { static Node *title; Node *l; int X,Y,W,H; bbox(X,Y,W,H); @@ -576,7 +576,7 @@ int fld::widget::Node_Browser::handle(int e) { /** Save the current scrollbar position during rebuild. */ -void fld::widget::Node_Browser::save_scroll_position() { +void Node_Browser::save_scroll_position() { saved_h_scroll_ = hposition(); saved_v_scroll_ = vposition(); } @@ -584,7 +584,7 @@ void fld::widget::Node_Browser::save_scroll_position() { /** Restore the previous scrollbar position after rebuild. */ -void fld::widget::Node_Browser::restore_scroll_position() { +void Node_Browser::restore_scroll_position() { hposition(saved_h_scroll_); vposition(saved_v_scroll_); } @@ -594,7 +594,7 @@ void fld::widget::Node_Browser::restore_scroll_position() { This clears internal caches, recalculates the scroll bar sizes, and sends a redraw() request to the widget. */ -void fld::widget::Node_Browser::rebuild() { +void Node_Browser::rebuild() { save_scroll_position(); new_list(); damage(FL_DAMAGE_SCROLL); @@ -606,7 +606,7 @@ void fld::widget::Node_Browser::rebuild() { Rebuild the browser layout and make sure that the given item is visible. \param[in] inNode pointer to a widget node derived from Node. */ -void fld::widget::Node_Browser::display(Node *inNode) { +void Node_Browser::display(Node *inNode) { if (!inNode) { // Alternative: find the first (last?) visible selected item. return; @@ -640,7 +640,7 @@ void fld::widget::Node_Browser::display(Node *inNode) { vposition(newV); } -void fld::widget::Node_Browser::load_prefs() { +void Node_Browser::load_prefs() { int c; Fl_Preferences p(Fluid.preferences, "widget_browser"); p.get("label_color", c, 72); label_color = c; @@ -657,7 +657,7 @@ void fld::widget::Node_Browser::load_prefs() { p.get("comment_font", c, FL_HELVETICA); comment_font = c; } -void fld::widget::Node_Browser::save_prefs() { +void Node_Browser::save_prefs() { Fl_Preferences p(Fluid.preferences, "widget_browser"); p.set("label_color", (int)label_color); p.set("label_font", (int)label_font); |
