diff options
Diffstat (limited to 'fluid/app/Snap_Action.cxx')
| -rw-r--r-- | fluid/app/Snap_Action.cxx | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/fluid/app/Snap_Action.cxx b/fluid/app/Snap_Action.cxx index 2ec7affad..51cdb9817 100644 --- a/fluid/app/Snap_Action.cxx +++ b/fluid/app/Snap_Action.cxx @@ -112,13 +112,13 @@ static Layout_Suite static_suite_list[] = { Fl_Menu_Item main_layout_submenu_[] = { { static_suite_list[0].menu_label, 0, select_layout_suite_cb, (void*)0, FL_MENU_RADIO|FL_MENU_VALUE }, { static_suite_list[1].menu_label, 0, select_layout_suite_cb, (void*)1, FL_MENU_RADIO }, - { nullptr } + { 0 } }; static Fl_Menu_Item static_choice_menu[] = { { static_suite_list[0].menu_label }, { static_suite_list[1].menu_label }, - { nullptr } + { 0 } }; @@ -131,17 +131,17 @@ void layout_suite_marker(Fl_Widget *, void *) { void select_layout_suite_cb(Fl_Widget *, void *user_data) { int index = (int)(fl_intptr_t)user_data; assert(index >= 0); - assert(index < Fluid.layout_list.list_size_); - Fluid.layout_list.current_suite(index); - Fluid.layout_list.update_dialogs(); + assert(index < Fluid.layout_list->list_size_); + Fluid.layout_list->current_suite(index); + Fluid.layout_list->update_dialogs(); } void select_layout_preset_cb(Fl_Widget *, void *user_data) { int index = (int)(fl_intptr_t)user_data; assert(index >= 0); assert(index < 3); - Fluid.layout_list.current_preset(index); - Fluid.layout_list.update_dialogs(); + Fluid.layout_list->current_preset(index); + Fluid.layout_list->update_dialogs(); } void edit_layout_preset_cb(Fl_Button *w, void *user_data) { @@ -149,10 +149,10 @@ void edit_layout_preset_cb(Fl_Button *w, void *user_data) { assert(index >= 0); assert(index < 3); if (user_data == LOAD) { - w->value(Fluid.layout_list.current_preset() == index); + w->value(Fluid.layout_list->current_preset() == index); } else { - Fluid.layout_list.current_preset(index); - Fluid.layout_list.update_dialogs(); + Fluid.layout_list->current_preset(index); + Fluid.layout_list->update_dialogs(); } } @@ -412,7 +412,7 @@ void Layout_Suite::update_label() { if (menu_label) ::free(menu_label); menu_label = fl_strdup(sym.c_str()); - Fluid.layout_list.update_menu_labels(); + Fluid.layout_list->update_menu_labels(); } /** @@ -425,7 +425,7 @@ void Layout_Suite::name(const char *n) { if (n) name_ = fl_strdup(n); else - name_ = nullptr; + name_ = 0; update_label(); } @@ -433,9 +433,9 @@ void Layout_Suite::name(const char *n) { Initialize the class for first use. */ void Layout_Suite::init() { - name_ = nullptr; - menu_label = nullptr; - layout[0] = layout[1] = layout[2] = nullptr; + name_ = 0; + menu_label = 0; + layout[0] = layout[1] = layout[2] = 0; storage_ = FLD_TOOL_STORE_INTERNAL; } @@ -630,7 +630,7 @@ Layout_List::~Layout_List() { Update the Setting dialog and menus to reflect the current Layout selection state. */ void Layout_List::update_dialogs() { - static Fl_Menu_Item *preset_menu = nullptr; + static Fl_Menu_Item *preset_menu = 0; if (!preset_menu) { preset_menu = (Fl_Menu_Item*)Fluid.main_menubar->find_item(select_layout_preset_cb); assert(preset_menu); @@ -665,7 +665,7 @@ void Layout_List::update_menu_labels() { */ int Layout_List::load(const std::string &filename) { remove_all(FLD_TOOL_STORE_FILE); - Fl_Preferences prefs(filename.c_str(), "layout.fluid.fltk.org", nullptr, Fl_Preferences::C_LOCALE); + Fl_Preferences prefs(filename.c_str(), "layout.fluid.fltk.org", 0, Fl_Preferences::C_LOCALE); read(prefs, FLD_TOOL_STORE_FILE); return 0; } @@ -675,7 +675,7 @@ int Layout_List::load(const std::string &filename) { */ int Layout_List::save(const std::string &filename) { assert(this); - Fl_Preferences prefs(filename.c_str(), "layout.fluid.fltk.org", nullptr, (Fl_Preferences::Root)(Fl_Preferences::C_LOCALE|Fl_Preferences::CLEAR)); + Fl_Preferences prefs(filename.c_str(), "layout.fluid.fltk.org", 0, (Fl_Preferences::Root)(Fl_Preferences::C_LOCALE|Fl_Preferences::CLEAR)); prefs.clear(); write(prefs, FLD_TOOL_STORE_FILE); return 0; @@ -829,7 +829,7 @@ void Layout_List::current_preset(int ix) { Allocate enough space for n entries in the list. */ void Layout_List::capacity(int n) { - static Fl_Menu_Item *suite_menu = nullptr; + static Fl_Menu_Item *suite_menu = 0; if (!suite_menu) suite_menu = (Fl_Menu_Item*)Fluid.main_menubar->find_item(layout_suite_marker); @@ -1467,11 +1467,11 @@ class Fd_Snap_Sibling : public Snap_Action { protected: Fl_Widget *best_match; public: - Fd_Snap_Sibling() : best_match(nullptr) { } + Fd_Snap_Sibling() : best_match(0) { } virtual int sibling_check(Snap_Data &d, Fl_Widget *s) = 0; void check(Snap_Data &d) override { clr(); - best_match = nullptr; + best_match = 0; if (!d.wgt) return; if (!d.wgt->parent->is_a(FLD_NODE_TYPE_Group)) return; int dsib_min = 1024; @@ -1707,7 +1707,7 @@ Snap_Action *Snap_Action::list[] = { &snap_widget_ideal_width, &snap_widget_ideal_height, - nullptr + 0 }; // ---- draw alignment marks ------------------------------------------- MARK: - |
