summaryrefslogtreecommitdiff
path: root/fluid/app/project.h
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2025-03-16 17:16:12 -0400
committerGitHub <noreply@github.com>2025-03-16 17:16:12 -0400
commit51a55bc73660f64e8f4b32b8b4d3858f2a786f7b (patch)
tree122ad9f838fcf8f61ed7cf5fa031e8ed69817e10 /fluid/app/project.h
parent13a7073a1e007ce5b71ef70bced1a9b15158820d (diff)
Fluid: restructuring and rejuvenation of the source code.
* Add classes for application and project * Removed all globals from Fluid.h * Extracting args and project history into their own classes * Moving globals into Application class * Initialize values inside headers for some classes. * Undo functionality wrapped in a class inside Project. * File reader and writer are now linked to a project. * Avoid global project access * Nodes (former Types) will be managed by a new Tree class. * Removed static members (hidden globals) form Node/Fl_Type. * Adding Tree iterator. * Use nullptr instead of 0, NULL, or 0L * Renamed Fl_..._Type to ..._Node, FL_OVERRIDE -> override * Renaming ..._type to ...::prototype * Splitting Widget Panel into multiple files. * Moved callback code into widget panel file. * Cleaning up Fluid_Image -> Image_asset * Moving Fd_Snap_Action into new namespace fld::app::Snap_Action etc. * Moved mergeback into proj folder. * `enum ID` is now `enum class Type`.
Diffstat (limited to 'fluid/app/project.h')
-rw-r--r--fluid/app/project.h103
1 files changed, 0 insertions, 103 deletions
diff --git a/fluid/app/project.h b/fluid/app/project.h
deleted file mode 100644
index 058ce1764..000000000
--- a/fluid/app/project.h
+++ /dev/null
@@ -1,103 +0,0 @@
-//
-// FLUID main entry for the Fast Light Tool Kit (FLTK).
-//
-// Copyright 1998-2025 by Bill Spitzak and others.
-//
-// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
-// file is missing or damaged, see the license at:
-//
-// https://www.fltk.org/COPYING.php
-//
-// Please see the following page on how to report bugs and issues:
-//
-// https://www.fltk.org/bugs.php
-//
-
-
-#ifndef FLUID_APP_PROJECT_H
-#define FLUID_APP_PROJECT_H
-
-#include <string>
-
-// ---- project class declaration
-
-/**
- Enumeration of available internationalization types.
- */
-typedef enum {
- FD_I18N_NONE = 0, ///< No i18n, all strings are litearals
- FD_I18N_GNU, ///< GNU gettext internationalization
- FD_I18N_POSIX ///< Posix catgets internationalization
-} Fd_I18n_Type;
-
-/**
- Data and settings for a FLUID project file.
- */
-class Fluid_Project {
-public:
- Fluid_Project();
- ~Fluid_Project();
- void reset();
- void update_settings_dialog();
-
- std::string projectfile_path() const;
- std::string projectfile_name() const;
- std::string codefile_path() const;
- std::string codefile_name() const;
- std::string headerfile_path() const;
- std::string headerfile_name() const;
- std::string stringsfile_path() const;
- std::string stringsfile_name() const;
- std::string basename() const;
-
- /// One of the available internationalization types.
- Fd_I18n_Type i18n_type;
- /// Include file for GNU i18n, writes an #include statement into the source
- /// file. This is usually `<libintl.h>` or `"gettext.h"` for GNU gettext.
- std::string i18n_gnu_include;
- // Optional name of a macro for conditional i18n compilation.
- std::string i18n_gnu_conditional;
- /// For the gettext/intl.h options, this is the function that translates text
- /// at runtime. This is usually "gettext" or "_".
- std::string i18n_gnu_function;
- /// For the gettext/intl.h options, this is the function that marks the translation
- /// of text at initialisation time. This is usually "gettext_noop" or "N_".
- std::string i18n_gnu_static_function;
-
- /// Include file for Posix i18n, write a #include statement into the source
- /// file. This is usually `<nl_types.h>` for Posix catgets.
- std::string i18n_pos_include;
- // Optional name of a macro for conditional i18n compilation.
- std::string i18n_pos_conditional;
- /// Name of the nl_catd database
- std::string i18n_pos_file;
- /// Message set ID for the catalog.
- std::string i18n_pos_set;
-
- /// If set, generate code to include the header file form the c++ file
- int include_H_from_C;
- /// If set, handle keyboard shortcut Ctrl on macOS using Cmd instead
- int use_FL_COMMAND;
- /// Clear if UTF-8 characters in statics texts are written as escape sequences
- int utf8_in_src;
- /// If set, <FL/Fl.H> will not be included from the header code before anything else
- int avoid_early_includes;
- /// If set, command line overrides header file name in .fl file.
- int header_file_set;
- /// 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.
- std::string code_file_name;
-};
-
-extern Fluid_Project g_project;
-
-#endif // FLUID_APP_PROJECT_H
-
-