diff options
| author | Matthias Melcher <git@matthiasm.com> | 2021-12-08 15:52:15 +0100 |
|---|---|---|
| committer | Matthias Melcher <git@matthiasm.com> | 2021-12-08 15:52:15 +0100 |
| commit | 16dae3ea063ae134b8b87ca199575e904dfbb7d4 (patch) | |
| tree | ff0ce9e635bb39f49bfcce2c5e7fe099334a0d15 /fluid/Fl_Menu_Type.cxx | |
| parent | 2d18c6f650c0001319c8883f8deb819d12984ac0 (diff) | |
Fluid: restructuring and commenting.
tl;dr : making Fluid maintainable, no changes in code execution and logic.
This is a pretty extensive restructuring of the Fluid source tree.
It was neccessary because source and header files were getting
much too big to handle. Many source files had no header, and many
headers declared functions that were in diffrent source files.
Reorganized much of the include statements.
Added comments to some of the files.
Added Doxygen configuration file for standalone Fluid docs.
Tested everything by rebuilding Fluid .fl designs with the resorted
version of Fluid.
Diffstat (limited to 'fluid/Fl_Menu_Type.cxx')
| -rw-r--r-- | fluid/Fl_Menu_Type.cxx | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/fluid/Fl_Menu_Type.cxx b/fluid/Fl_Menu_Type.cxx index 5c1a56f30..a93538de6 100644 --- a/fluid/Fl_Menu_Type.cxx +++ b/fluid/Fl_Menu_Type.cxx @@ -20,15 +20,27 @@ // https://www.fltk.org/bugs.php // -#include <FL/Fl.H> -#include "Fl_Widget_Type.h" +#include "Fl_Menu_Type.h" + +#include "fluid.h" +#include "Fl_Window_Type.h" #include "alignment_panel.h" +#include "file.h" +#include "code.h" +#include "Fluid_Image.h" +#include "Shortcut_Button.h" + +#include <FL/Fl.H> #include <FL/fl_message.H> #include <FL/Fl_Menu_.H> #include <FL/Fl_Button.H> #include <FL/Fl_Value_Input.H> #include <FL/Fl_Text_Display.H> +#include <FL/Fl_Menu_Button.H> +#include <FL/Fl_Output.H> +#include <FL/fl_draw.H> #include "../src/flstring.h" + #include <stdio.h> #include <stdlib.h> @@ -38,14 +50,6 @@ Fl_Menu_Item menu_item_type_menu[] = { {"Radio",0,0,(void*)FL_MENU_RADIO}, {0}}; -extern int reading_file; -extern int force_parent; -extern int i18n_type; -extern const char* i18n_include; -extern const char* i18n_function; -extern const char* i18n_file; -extern const char* i18n_set; - static char submenuflag; static uchar menuitemtype = 0; @@ -174,8 +178,6 @@ const char* Fl_Menu_Item_Type::menu_name(int& i) { return unique_id(t, "menu", t->name(), t->label()); } -#include "Fluid_Image.h" - void Fl_Menu_Item_Type::write_static() { if (callback() && is_name(callback()) && !user_defined(callback())) write_declare("extern void %s(Fl_Menu_*, %s);", callback(), @@ -525,7 +527,6 @@ void Fl_Menu_Type::copy_properties() { //////////////////////////////////////////////////////////////// -#include <FL/Fl_Menu_Button.H> Fl_Menu_Item button_type_menu[] = { {"normal",0,0,(void*)0}, {"popup1",0,0,(void*)Fl_Menu_Button::POPUP1}, @@ -582,10 +583,6 @@ Fl_Menu_Bar_Type Fl_Menu_Bar_type; //////////////////////////////////////////////////////////////// // Shortcut entry item in panel: -#include <FL/Fl_Output.H> -#include "Shortcut_Button.h" -#include <FL/fl_draw.H> - void Shortcut_Button::draw() { if (value()) draw_box(FL_DOWN_BOX, (Fl_Color)9); else draw_box(FL_UP_BOX, FL_WHITE); |
