diff options
| author | Matthias Melcher <github@matthiasm.com> | 2025-03-08 00:14:09 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2025-03-08 00:14:27 +0100 |
| commit | 15ad447e2a0301b2aa4ea350615ae71f0e5e5ef5 (patch) | |
| tree | 706f8f9a6317f1074951e6174a4857ebafbca117 /fluid/app/project.h | |
| parent | ca22660bbb7efe4b38ab5af6a233a1ef5ef33389 (diff) | |
Fluid: last incremental chage, restructuring
Diffstat (limited to 'fluid/app/project.h')
| -rw-r--r-- | fluid/app/project.h | 116 |
1 files changed, 5 insertions, 111 deletions
diff --git a/fluid/app/project.h b/fluid/app/project.h index 3d5720330..058ce1764 100644 --- a/fluid/app/project.h +++ b/fluid/app/project.h @@ -14,91 +14,12 @@ // https://www.fltk.org/bugs.php // -#ifndef _FLUID_FLUID_H -#define _FLUID_FLUID_H -#include "tools/filename.h" - -#include <FL/Fl_Preferences.H> -#include <FL/Fl_Menu_Item.H> -#include <FL/filename.H> +#ifndef FLUID_APP_PROJECT_H +#define FLUID_APP_PROJECT_H #include <string> -#define BROWSERWIDTH 300 -#define BROWSERHEIGHT 500 -#define WINWIDTH 300 -#define MENUHEIGHT 25 -#define WINHEIGHT (BROWSERHEIGHT+MENUHEIGHT) - -// ---- types - -class Fl_Double_Window; -class Fl_Window; -class Fl_Menu_Bar; -class Fl_Type; -class Fl_Choice; -class Fl_Button; -class Fl_Check_Button; - -/** - Indicate the storage location for tools like layout suites and shell macros. - \see class Fd_Shell_Command, class Fd_Layout_Suite - */ -typedef enum { - FD_STORE_INTERNAL, ///< stored inside FLUID app - FD_STORE_USER, ///< suite is stored in the user wide FLUID settings - FD_STORE_PROJECT, ///< suite is stored within the current .fl project file - FD_STORE_FILE ///< store suite in external file -} Fd_Tool_Store; - -// ---- global variables - -extern Fl_Preferences fluid_prefs; -extern Fl_Menu_Item Main_Menu[]; -extern Fl_Menu_Bar *main_menubar; -extern Fl_Window *main_window; - -extern int show_guides; -extern int show_restricted; -extern int show_ghosted_outline; -extern int show_comments; - -extern int G_use_external_editor; -extern int G_debug; -extern char G_external_editor_command[512]; - -// File history info... -extern char absolute_history[10][FL_PATH_MAX]; -extern char relative_history[10][FL_PATH_MAX]; -extern void load_history(); -extern void update_history(const char *); - -extern Fl_Menu_Item *save_item; -extern Fl_Menu_Item *history_item; -extern Fl_Menu_Item *widgetbin_item; -extern Fl_Menu_Item *codeview_item; -extern Fl_Menu_Item *overlay_item; -extern Fl_Button *overlay_button; -extern Fl_Menu_Item *guides_item; -extern Fl_Menu_Item *restricted_item; -extern Fl_Check_Button *guides_button; - -extern int modflag; - -extern int update_file; // fluid -u -extern int compile_file; // fluid -c -extern int compile_strings; // fluic -cs -extern int batch_mode; - -extern int pasteoffset; - -extern std::string g_code_filename_arg; -extern std::string g_header_filename_arg; -extern std::string g_launch_path; - -extern std::string g_autodoc_path; - // ---- project class declaration /** @@ -167,6 +88,8 @@ public: /// If set, command line overrides source code file name in .fl file. int code_file_set; int write_mergeback_data; + /// Filename of the current .fl project file + const char *proj_filename { nullptr }; /// Hold the default extension for header files, or the entire filename if set via command line. std::string header_file_name; /// Hold the default extension for source code files, or the entire filename if set via command line. @@ -175,35 +98,6 @@ public: extern Fluid_Project g_project; -// ---- public functions - -extern int fluid_main(int argc,char **argv); - -extern bool new_project(bool user_must_confirm = true); -extern void enter_project_dir(); -extern void leave_project_dir(); -extern void set_filename(const char *c); -extern void set_modflag(int mf, int mfc=-1); - -extern const std::string &get_tmpdir(); - -// ---- public callback functions - -extern void save_cb(Fl_Widget *, void *v); -extern void save_template_cb(Fl_Widget *, void *); -extern void revert_cb(Fl_Widget *,void *); -extern void exit_cb(Fl_Widget *,void *); - -extern int write_code_files(bool dont_show_completion_dialog=false); -extern void write_strings_cb(Fl_Widget *, void *); -extern void align_widget_cb(Fl_Widget *, long); -extern void toggle_widgetbin_cb(Fl_Widget *, void *); - -extern char position_window(Fl_Window *w, const char *prefsName, int Visible, int X, int Y, int W=0, int H=0); - -inline int fd_min(int a, int b) { return (a < b ? a : b); } -inline int fd_max(int a, int b) { return (a > b ? a : b); } -inline int fd_min(int a, int b, int c) { return fd_min(a, fd_min(b, c)); } +#endif // FLUID_APP_PROJECT_H -#endif // _FLUID_FLUID_H |
