fltk  1.3.5-source
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X.
  Fossies Dox: fltk-1.3.5-source.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

fluid.cxx File Reference
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_File_Icon.H>
#include <FL/Fl_Help_Dialog.H>
#include <FL/Fl_Hold_Browser.H>
#include <FL/Fl_Menu_Bar.H>
#include <FL/Fl_Input.H>
#include <FL/Fl_Plugin.H>
#include <FL/fl_ask.H>
#include <FL/fl_draw.H>
#include <FL/Fl_File_Chooser.H>
#include <FL/Fl_PNG_Image.H>
#include <FL/fl_message.H>
#include <FL/filename.H>
#include <FL/Fl_Native_File_Chooser.H>
#include <FL/Fl_Printer.H>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/stat.h>
#include <time.h>
#include "../src/flstring.h"
#include "alignment_panel.h"
#include "function_panel.h"
#include "template_panel.h"
#include <unistd.h>
#include "about_panel.h"
#include "undo.h"
#include "Fl_Type.h"
#include <signal.h>
Include dependency graph for fluid.cxx:

Go to the source code of this file.

Classes

class  Fl_Process
 

Macros

#define BROWSERWIDTH   300
 
#define BROWSERHEIGHT   500
 
#define WINWIDTH   300
 
#define MENUHEIGHT   25
 
#define WINHEIGHT   (BROWSERHEIGHT+MENUHEIGHT)
 
#define SIGARG   int
 

Functions

void load_history ()
 
void update_history (const char *)
 
void show_shell_window ()
 
void set_filename (const char *c)
 
void set_modflag (int mf)
 
void goto_source_dir ()
 
void leave_source_dir ()
 
char position_window (Fl_Window *w, const char *prefsName, int Visible, int X, int Y, int W=0, int H=0)
 
void save_position (Fl_Window *w, const char *prefsName)
 
static char * cutfname (int which=0)
 
static void external_editor_timer (void *)
 
void save_cb (Fl_Widget *, void *v)
 
void save_template_cb (Fl_Widget *, void *)
 
void revert_cb (Fl_Widget *, void *)
 
void exit_cb (Fl_Widget *, void *)
 
void open_cb (Fl_Widget *, void *v)
 
void open_history_cb (Fl_Widget *, void *v)
 
void new_cb (Fl_Widget *, void *v)
 
void write_cb (Fl_Widget *, void *)
 
void write_strings_cb (Fl_Widget *, void *)
 
void openwidget_cb (Fl_Widget *, void *)
 
void toggle_overlays (Fl_Widget *, void *)
 
void select_all_cb (Fl_Widget *, void *)
 
void select_none_cb (Fl_Widget *, void *)
 
void group_cb (Fl_Widget *, void *)
 
void ungroup_cb (Fl_Widget *, void *)
 
void copy_cb (Fl_Widget *, void *)
 
void select_only (Fl_Type *)
 
void cut_cb (Fl_Widget *, void *)
 
void delete_cb (Fl_Widget *, void *)
 
void paste_cb (Fl_Widget *, void *)
 
void duplicate_cb (Fl_Widget *, void *)
 
void earlier_cb (Fl_Widget *, void *)
 
void later_cb (Fl_Widget *, void *)
 
Fl_Typesort (Fl_Type *parent)
 
static void sort_cb (Fl_Widget *, void *)
 
void show_project_cb (Fl_Widget *, void *)
 
void show_grid_cb (Fl_Widget *, void *)
 
void show_settings_cb (Fl_Widget *, void *)
 
void show_global_settings_cb (Fl_Widget *, void *)
 
void align_widget_cb (Fl_Widget *, long)
 
void widget_size_cb (Fl_Widget *, long)
 
void about_cb (Fl_Widget *, void *)
 
void show_help (const char *name)
 
void help_cb (Fl_Widget *, void *)
 
void manual_cb (Fl_Widget *, void *)
 
void print_menu_cb (Fl_Widget *, void *)
 
void toggle_widgetbin_cb (Fl_Widget *, void *)
 
void toggle_sourceview_cb (Fl_Double_Window *, void *)
 
void fill_in_New_Menu ()
 
void scheme_cb (Fl_Choice *, void *)
 
void toggle_sourceview_b_cb (Fl_Button *, void *)
 
void make_main_window ()
 
static bool prepare_shell_command (const char *&command)
 
void shell_pipe_cb (FL_SOCKET, void *)
 
void do_shell_command (Fl_Return_Button *, void *)
 
void update_sourceview_position ()
 
void update_sourceview_position_cb (Fl_Tabs *, void *)
 
void update_sourceview_cb (Fl_Button *, void *)
 
void update_sourceview_timer (void *)
 
static int arg (int argc, char **argv, int &i)
 
static void sigint (int)
 
int main (int argc, char **argv)
 

Variables

static Fl_Help_Dialoghelp_dialog = 0
 
Fl_Preferences fluid_prefs (Fl_Preferences::USER, "fltk.org", "fluid")
 
int gridx = 5
 
int gridy = 5
 
int snap = 1
 
int show_guides = 1
 
int show_comments = 1
 
int G_use_external_editor = 0
 
int G_debug = 0
 
char G_external_editor_command [512]
 
int show_coredevmenus = 1
 
char absolute_history [10][FL_PATH_MAX]
 
char relative_history [10][FL_PATH_MAX]
 
Fl_Menu_Itemsave_item = 0L
 
Fl_Menu_Itemhistory_item = 0L
 
Fl_Menu_Itemwidgetbin_item = 0L
 
Fl_Menu_Itemsourceview_item = 0L
 
static const char * filename
 
int modflag
 
static char * pwd
 
static char in_source_dir
 
Fl_Windowmain_window
 
Fl_Menu_Barmain_menubar
 
int exit_early = 0
 
int update_file = 0
 
int compile_file = 0
 
int compile_strings = 0
 
int batch_mode = 0
 
int header_file_set = 0
 
int code_file_set = 0
 
const char * header_file_name = ".h"
 
const char * code_file_name = ".cxx"
 
int i18n_type = 0
 
const char * i18n_include = ""
 
const char * i18n_function = ""
 
const char * i18n_file = ""
 
const char * i18n_set = ""
 
char i18n_program [FL_PATH_MAX] = ""
 
int pasteoffset
 
static int ipasteoffset
 
int force_parent
 
Fl_Menu_Item New_Menu []
 
Fl_Menu_Item Main_Menu []
 
static Fl_Process s_proc
 
static char * sv_source_filename = 0
 
static char * sv_header_filename = 0
 
int quit_flag = 0
 

Macro Definition Documentation

◆ BROWSERHEIGHT

#define BROWSERHEIGHT   500

Definition at line 1151 of file fluid.cxx.

◆ BROWSERWIDTH

#define BROWSERWIDTH   300

Definition at line 1150 of file fluid.cxx.

◆ MENUHEIGHT

#define MENUHEIGHT   25

Definition at line 1153 of file fluid.cxx.

◆ SIGARG

#define SIGARG   int

Definition at line 1759 of file fluid.cxx.

◆ WINHEIGHT

#define WINHEIGHT   (BROWSERHEIGHT+MENUHEIGHT)

Definition at line 1154 of file fluid.cxx.

◆ WINWIDTH

#define WINWIDTH   300

Definition at line 1152 of file fluid.cxx.

Function Documentation

◆ about_cb()

void about_cb ( Fl_Widget ,
void *   
)

Definition at line 896 of file fluid.cxx.

References about_panel, make_about_panel(), and Fl_Double_Window::show().

◆ align_widget_cb()

◆ arg()

◆ copy_cb()

void copy_cb ( Fl_Widget ,
void *   
)

Definition at line 789 of file fluid.cxx.

References Fl_Type::current, cutfname(), fl_beep(), fl_message(), ipasteoffset, and write_file().

◆ cut_cb()

◆ cutfname()

static char* cutfname ( int  which = 0)
static

◆ delete_cb()

void delete_cb ( Fl_Widget ,
void *   
)

◆ do_shell_command()

◆ duplicate_cb()

void duplicate_cb ( Fl_Widget ,
void *   
)

◆ earlier_cb()

void earlier_cb ( Fl_Widget ,
void *   
)

Definition at line 873 of file Fl_Type.cxx.

References f, Fl_Type::first, Fl_Type::level, Fl_Type::prev, Fl_Type::selected, and set_modflag().

◆ exit_cb()

◆ external_editor_timer()

static void external_editor_timer ( void *  )
static

Definition at line 198 of file fluid.cxx.

References ExternalCodeEditor::editors_open(), Fl_Type::first, G_debug, p, Fl::repeat_timeout(), and set_modflag().

Referenced by main().

◆ fill_in_New_Menu()

◆ goto_source_dir()

void goto_source_dir ( )

◆ group_cb()

◆ help_cb()

void help_cb ( Fl_Widget ,
void *   
)

Definition at line 975 of file fluid.cxx.

References show_help().

◆ later_cb()

void later_cb ( Fl_Widget ,
void *   
)

◆ leave_source_dir()

void leave_source_dir ( )

Definition at line 143 of file fluid.cxx.

References in_source_dir, and pwd.

Referenced by Fluid_Image::find(), Fl_Data_Type::open(), ui_find_image(), write_cb(), and write_strings_cb().

◆ load_history()

◆ main()

◆ make_main_window()

◆ manual_cb()

void manual_cb ( Fl_Widget ,
void *   
)

Definition at line 979 of file fluid.cxx.

References show_help().

◆ new_cb()

◆ open_cb()

◆ open_history_cb()

void open_history_cb ( Fl_Widget ,
void *  v 
)

◆ openwidget_cb()

void openwidget_cb ( Fl_Widget ,
void *   
)

Definition at line 769 of file fluid.cxx.

References Fl_Type::current, fl_message(), and Fl_Type::open().

◆ paste_cb()

void paste_cb ( Fl_Widget ,
void *   
)

◆ position_window()

char position_window ( Fl_Window w,
const char *  prefsName,
int  Visible,
int  X,
int  Y,
int  W = 0,
int  H = 0 
)

◆ prepare_shell_command()

◆ print_menu_cb()

◆ revert_cb()

void revert_cb ( Fl_Widget ,
void *   
)

◆ save_cb()

◆ save_position()

void save_position ( Fl_Window w,
const char *  prefsName 
)

◆ save_template_cb()

◆ scheme_cb()

void scheme_cb ( Fl_Choice ,
void *   
)

◆ select_all_cb()

void select_all_cb ( Fl_Widget ,
void *   
)

◆ select_none_cb()

void select_none_cb ( Fl_Widget ,
void *   
)

◆ select_only()

void select_only ( Fl_Type )

Definition at line 245 of file Fl_Type.cxx.

Referenced by cut_cb(), and delete_cb().

◆ set_filename()

void set_filename ( const char *  c)

Definition at line 1568 of file fluid.cxx.

References batch_mode, filename, free(), modflag, NULL, set_modflag(), and update_history().

Referenced by main(), new_cb(), open_cb(), open_history_cb(), and save_cb().

◆ set_modflag()

void set_modflag ( int  mf)

Definition at line 1687 of file fluid.cxx.

References Fl_Menu_Item::activate(), Fl::add_timeout(), Fl_Menu_Item::deactivate(), filename, FL_PATH_MAX, Fl_Window::label(), main_window, modflag, NULL, Fl::remove_timeout(), save_item, snprintf, sourceview_panel, sv_autorefresh, title, update_sourceview_timer(), Fl_Button::value(), and Fl_Widget::visible().

Referenced by active_cb(), Fl_Type::add(), align_cb(), align_position_cb(), align_text_image_cb(), align_widget_cb(), border_cb(), box_cb(), callback_cb(), cb(), Fl_Tabs_Type::click_test(), code_input_cb(), color2_cb(), color_cb(), comment_cb(), cut_cb(), delete_cb(), down_box_cb(), earlier_cb(), external_editor_timer(), h_cb(), header_input_cb(), hotspot_cb(), i18n_int_cb(), i18n_text_cb(), i18n_type_cb(), image_browse_cb(), image_cb(), inactive_browse_cb(), inactive_cb(), include_H_from_C_button_cb(), label_cb(), labelcolor_cb(), labelfont_cb(), labelsize_cb(), labeltype_cb(), later_cb(), main(), max_cb(), max_h_cb(), max_w_cb(), min_cb(), min_h_cb(), min_w_cb(), modal_cb(), Fl_Window_Type::moveallchildren(), name_public_cb(), name_public_member_cb(), new_cb(), non_modal_cb(), Fl_Function_Type::open(), Fl_Decl_Type::open(), Fl_Data_Type::open(), Fl_DeclBlock_Type::open(), Fl_Comment_Type::open(), Fl_Class_Type::open(), open_cb(), open_history_cb(), redo_cb(), resizable_cb(), Overlay_Window::resize(), revert_cb(), save_cb(), set_filename(), set_max_size_cb(), set_min_size_cb(), shortcut_in_cb(), slider_size_cb(), step_cb(), storestring(), subclass_cb(), subtype_cb(), textcolor_cb(), textfont_cb(), textsize_cb(), tooltip_cb(), type_make_cb(), undo_cb(), use_FL_COMMAND_button_cb(), user_data_cb(), user_data_type_cb(), v_input_cb(), value_cb(), visible_cb(), w_cb(), wc_relative_cb(), when_button_cb(), when_cb(), widget_size_cb(), x_cb(), xclass_cb(), and y_cb().

◆ shell_pipe_cb()

◆ show_global_settings_cb()

void show_global_settings_cb ( Fl_Widget ,
void *   
)

◆ show_grid_cb()

◆ show_help()

◆ show_project_cb()

◆ show_settings_cb()

void show_settings_cb ( Fl_Widget ,
void *   
)

◆ show_shell_window()

void show_shell_window ( )

◆ sigint()

static void sigint ( int  )
static

Definition at line 1764 of file fluid.cxx.

References quit_flag.

Referenced by main().

◆ sort()

◆ sort_cb()

static void sort_cb ( Fl_Widget ,
void *   
)
static

Definition at line 884 of file fluid.cxx.

References sort().

◆ toggle_overlays()

void toggle_overlays ( Fl_Widget ,
void *   
)

◆ toggle_sourceview_b_cb()

void toggle_sourceview_b_cb ( Fl_Button ,
void *   
)

Definition at line 1226 of file fluid.cxx.

References toggle_sourceview_cb().

Referenced by make_sourceview().

◆ toggle_sourceview_cb()

◆ toggle_widgetbin_cb()

◆ ungroup_cb()

◆ update_history()

◆ update_sourceview_cb()

◆ update_sourceview_position()

◆ update_sourceview_position_cb()

void update_sourceview_position_cb ( Fl_Tabs ,
void *   
)

Definition at line 1624 of file fluid.cxx.

References update_sourceview_position().

Referenced by make_sourceview().

◆ update_sourceview_timer()

void update_sourceview_timer ( void *  )

Definition at line 1681 of file fluid.cxx.

References update_sourceview_cb().

Referenced by set_modflag().

◆ widget_size_cb()

void widget_size_cb ( Fl_Widget ,
long   
)

◆ write_cb()

◆ write_strings_cb()

Variable Documentation

◆ absolute_history

char absolute_history[10][FL_PATH_MAX]

Definition at line 103 of file fluid.cxx.

Referenced by load_history(), main(), and update_history().

◆ batch_mode

◆ code_file_name

◆ code_file_set

int code_file_set = 0

Definition at line 699 of file fluid.cxx.

Referenced by arg(), and read_children().

◆ compile_file

int compile_file = 0

Definition at line 695 of file fluid.cxx.

Referenced by arg(), and main().

◆ compile_strings

int compile_strings = 0

Definition at line 696 of file fluid.cxx.

Referenced by arg(), and main().

◆ exit_early

int exit_early = 0

Definition at line 693 of file fluid.cxx.

Referenced by main().

◆ filename

◆ fluid_prefs

◆ force_parent

int force_parent

Definition at line 41 of file Fl_Widget_Type.cxx.

Referenced by duplicate_cb(), Fl_Widget_Type::make(), and paste_cb().

◆ G_debug

◆ G_external_editor_command

char G_external_editor_command[512]

Definition at line 99 of file fluid.cxx.

Referenced by cb_editor_command_input(), make_settings_window(), and Fl_Code_Type::open().

◆ G_use_external_editor

int G_use_external_editor = 0

◆ gridx

◆ gridy

◆ header_file_name

const char* header_file_name = ".h"

◆ header_file_set

int header_file_set = 0

Definition at line 698 of file fluid.cxx.

Referenced by arg(), and read_children().

◆ help_dialog

Fl_Help_Dialog* help_dialog = 0
static

Definition at line 89 of file fluid.cxx.

Referenced by exit_cb(), and show_help().

◆ history_item

Fl_Menu_Item* history_item = 0L

Definition at line 113 of file fluid.cxx.

Referenced by load_history(), make_main_window(), and update_history().

◆ i18n_file

◆ i18n_function

◆ i18n_include

const char* i18n_include = ""

◆ i18n_program

char i18n_program[FL_PATH_MAX] = ""

Definition at line 707 of file fluid.cxx.

Referenced by update_sourceview_cb(), write_cb(), and write_code().

◆ i18n_set

◆ i18n_type

◆ in_source_dir

char in_source_dir
static

Definition at line 125 of file fluid.cxx.

Referenced by goto_source_dir(), and leave_source_dir().

◆ ipasteoffset

int ipasteoffset
static

Definition at line 787 of file fluid.cxx.

Referenced by copy_cb(), cut_cb(), delete_cb(), and paste_cb().

◆ Main_Menu

◆ main_menubar

Fl_Menu_Bar* main_menubar

Definition at line 177 of file fluid.cxx.

Referenced by make_main_window().

◆ main_window

◆ modflag

◆ New_Menu

Fl_Menu_Item New_Menu[]

Definition at line 976 of file factory.cxx.

Referenced by fill_in_New_Menu(), and Fl_Type_make().

◆ pasteoffset

int pasteoffset

◆ pwd

char* pwd
static

Definition at line 124 of file fluid.cxx.

Referenced by fl_filename_expand(), goto_source_dir(), and leave_source_dir().

◆ quit_flag

int quit_flag = 0

Definition at line 1751 of file fluid.cxx.

Referenced by main(), and sigint().

◆ relative_history

char relative_history[10][FL_PATH_MAX]

Definition at line 104 of file fluid.cxx.

Referenced by load_history(), and update_history().

◆ s_proc

Fl_Process s_proc
static

Definition at line 1464 of file fluid.cxx.

Referenced by do_shell_command(), prepare_shell_command(), and shell_pipe_cb().

◆ save_item

Fl_Menu_Item* save_item = 0L

Definition at line 112 of file fluid.cxx.

Referenced by make_main_window(), and set_modflag().

◆ show_comments

◆ show_coredevmenus

int show_coredevmenus = 1

Definition at line 100 of file fluid.cxx.

◆ show_guides

int show_guides = 1

Definition at line 95 of file fluid.cxx.

Referenced by Fl_Window_Type::draw_overlay(), guides_cb(), make_main_window(), and show_grid_cb().

◆ snap

int snap = 1

◆ sourceview_item

Fl_Menu_Item* sourceview_item = 0L

Definition at line 115 of file fluid.cxx.

Referenced by make_main_window(), and toggle_sourceview_cb().

◆ sv_header_filename

char* sv_header_filename = 0
static

Definition at line 1630 of file fluid.cxx.

Referenced by update_sourceview_cb().

◆ sv_source_filename

char* sv_source_filename = 0
static

Definition at line 1629 of file fluid.cxx.

Referenced by update_sourceview_cb().

◆ update_file

int update_file = 0

Definition at line 694 of file fluid.cxx.

Referenced by arg(), and main().

◆ widgetbin_item

Fl_Menu_Item* widgetbin_item = 0L

Definition at line 114 of file fluid.cxx.

Referenced by make_main_window(), and toggle_widgetbin_cb().