summaryrefslogtreecommitdiff
path: root/fluid/Fl_Window_Type.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <git@matthiasm.com>2021-12-08 15:52:15 +0100
committerMatthias Melcher <git@matthiasm.com>2021-12-08 15:52:15 +0100
commit16dae3ea063ae134b8b87ca199575e904dfbb7d4 (patch)
treeff0ce9e635bb39f49bfcce2c5e7fe099334a0d15 /fluid/Fl_Window_Type.cxx
parent2d18c6f650c0001319c8883f8deb819d12984ac0 (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_Window_Type.cxx')
-rw-r--r--fluid/Fl_Window_Type.cxx29
1 files changed, 12 insertions, 17 deletions
diff --git a/fluid/Fl_Window_Type.cxx b/fluid/Fl_Window_Type.cxx
index ff196d2e1..c42d62af7 100644
--- a/fluid/Fl_Window_Type.cxx
+++ b/fluid/Fl_Window_Type.cxx
@@ -18,6 +18,16 @@
// https://www.fltk.org/bugs.php
//
+#include "Fl_Window_Type.h"
+
+#include "fluid.h"
+#include "widget_browser.h"
+#include "undo.h"
+#include "alignment_panel.h"
+#include "file.h"
+#include "code.h"
+#include "widget_panel.h"
+
#include <FL/Fl.H>
#include <FL/Fl_Overlay_Window.H>
#include <FL/fl_message.H>
@@ -25,18 +35,12 @@
#include <FL/platform.H>
#include <FL/Fl_Menu_Item.H>
#include <FL/Fl_Round_Button.H>
-#include "Fl_Widget_Type.h"
-#include "undo.h"
+#include "../src/flstring.h"
+
#include <math.h>
#include <stdlib.h>
-#include "alignment_panel.h"
#include <stdio.h>
-extern int gridx;
-extern int gridy;
-extern int snap;
-extern int show_guides;
-
int include_H_from_C = 1;
int use_FL_COMMAND = 0;
extern int i18n_type;
@@ -49,8 +53,6 @@ extern Fl_Preferences fluid_prefs;
inline int fl_min(int a, int b) { return (a < b ? a : b); }
-#include "widget_panel.h"
-
// Update the XYWH values in the widget panel...
static void update_xywh() {
if (current_widget && current_widget->is_widget()) {
@@ -174,9 +176,6 @@ void i18n_int_cb(Fl_Int_Input *i, void *) {
set_modflag(1);
}
-extern const char* header_file_name;
-extern const char* code_file_name;
-
void show_project_cb(Fl_Widget *, void *) {
if(project_window==0) make_project_window();
include_H_from_C_button->value(include_H_from_C);
@@ -1350,9 +1349,6 @@ int Fl_Window_Type::handle(int event) {
////////////////////////////////////////////////////////////////
-#include <stdio.h>
-#include "../src/flstring.h"
-
void Fl_Window_Type::write_code1() {
Fl_Widget_Type::write_code1();
}
@@ -1393,7 +1389,6 @@ void Fl_Window_Type::write_properties() {
if (o->visible()) write_string("visible");
}
-extern int pasteoffset;
void Fl_Window_Type::read_property(const char *c) {
if (!strcmp(c,"modal")) {
modal = 1;