|
|
@ -1,5 +1,5 @@ |
|
|
|
//
|
|
|
|
//
|
|
|
|
// Widget factory code for the Fast Light Tool Kit (FLTK).
|
|
|
|
// Button type factory code for the Fast Light Tool Kit (FLTK).
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Type classes for most of the fltk widgets. Most of the work
|
|
|
|
// Type classes for most of the fltk widgets. Most of the work
|
|
|
|
// is done by code in Fl_Widget_Type.C. Also a factory instance
|
|
|
|
// is done by code in Fl_Widget_Type.C. Also a factory instance
|
|
|
@ -9,7 +9,7 @@ |
|
|
|
// to a factory instance for every class (both the ones defined
|
|
|
|
// to a factory instance for every class (both the ones defined
|
|
|
|
// here and ones in other files)
|
|
|
|
// here and ones in other files)
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Copyright 1998-2017 by Bill Spitzak and others.
|
|
|
|
// Copyright 1998-2023 by Bill Spitzak and others.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// This library is free software. Distribution and use rights are outlined in
|
|
|
|
// 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
|
|
|
|
// the file "COPYING" which should have been included with this file. If this
|
|
|
@ -24,52 +24,15 @@ |
|
|
|
|
|
|
|
|
|
|
|
#include "Fl_Button_Type.h" |
|
|
|
#include "Fl_Button_Type.h" |
|
|
|
|
|
|
|
|
|
|
|
#include "fluid.h" |
|
|
|
|
|
|
|
#include "Fl_Window_Type.h" |
|
|
|
|
|
|
|
#include "Fl_Group_Type.h" |
|
|
|
|
|
|
|
#include "Fd_Snap_Action.h" |
|
|
|
#include "Fd_Snap_Action.h" |
|
|
|
#include "pixmaps.h" |
|
|
|
|
|
|
|
#include "undo.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <FL/Fl.H> |
|
|
|
#include <FL/Fl.H> |
|
|
|
#include <FL/Fl_Adjuster.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Box.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Browser.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Button.H> |
|
|
|
#include <FL/Fl_Button.H> |
|
|
|
#include <FL/Fl_Check_Browser.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Check_Button.H> |
|
|
|
#include <FL/Fl_Check_Button.H> |
|
|
|
#include <FL/Fl_Clock.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Counter.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Dial.H> |
|
|
|
|
|
|
|
#include <FL/Fl_File_Browser.H> |
|
|
|
|
|
|
|
#include <FL/Fl_File_Input.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Flex.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Group.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Help_View.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Input.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Light_Button.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Menu_Item.H> |
|
|
|
#include <FL/Fl_Menu_Item.H> |
|
|
|
#include <FL/Fl_Output.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Pixmap.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Progress.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Return_Button.H> |
|
|
|
#include <FL/Fl_Return_Button.H> |
|
|
|
#include <FL/Fl_Repeat_Button.H> |
|
|
|
#include <FL/Fl_Repeat_Button.H> |
|
|
|
#include <FL/Fl_Round_Button.H> |
|
|
|
#include <FL/Fl_Round_Button.H> |
|
|
|
#include <FL/Fl_Roller.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Scrollbar.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Simple_Terminal.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Spinner.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Text_Display.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Text_Editor.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Tree.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Value_Slider.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Value_Input.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Value_Output.H> |
|
|
|
|
|
|
|
#include <FL/Fl_Window.H> |
|
|
|
|
|
|
|
#include "../src/flstring.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdio.h> |
|
|
|
|
|
|
|
#include <stdlib.h> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ---- Button Types --------------------------------------------------- MARK: -
|
|
|
|
// ---- Button Types --------------------------------------------------- MARK: -
|
|
|
@ -84,17 +47,17 @@ static Fl_Menu_Item buttontype_menu[] = { |
|
|
|
{0} |
|
|
|
{0} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
Fl_Menu_Item *Fl_Button_Type::subtypes() FL_OVERRIDE { |
|
|
|
Fl_Menu_Item *Fl_Button_Type::subtypes() { |
|
|
|
return buttontype_menu; |
|
|
|
return buttontype_menu; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void Fl_Button_Type::ideal_size(int &w, int &h) FL_OVERRIDE { |
|
|
|
void Fl_Button_Type::ideal_size(int &w, int &h) { |
|
|
|
h = layout->labelsize + 8; |
|
|
|
h = layout->labelsize + 8; |
|
|
|
w = layout->labelsize * 4 + 8; |
|
|
|
w = layout->labelsize * 4 + 8; |
|
|
|
Fd_Snap_Action::better_size(w, h); |
|
|
|
Fd_Snap_Action::better_size(w, h); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Fl_Widget *Fl_Button_Type::widget(int x, int y, int w, int h) FL_OVERRIDE { |
|
|
|
Fl_Widget *Fl_Button_Type::widget(int x, int y, int w, int h) { |
|
|
|
return new Fl_Button(x, y, w, h, "Button"); |
|
|
|
return new Fl_Button(x, y, w, h, "Button"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|