Fluid: simplify code writer, add documentation

* looks like a huge change, but most
changes are caused by the code writer
and should be harmless
* Doxygen for Widget_Node class
This commit is contained in:
Matthias Melcher
2026-08-07 03:17:49 +02:00
parent b1e1f2aa1e
commit bb7ec208f5
22 changed files with 1814 additions and 1084 deletions
+2 -14
View File
@@ -233,10 +233,6 @@ bool Code_Writer::c_contains(void *pp) {
void Code_Writer::write_cstring(fluid::string_view text)
{
const char *next_line = "\"\n\"";
if (varused_test) {
varused = 1;
return;
}
// Handle sourcecode preview
if (write_codeview) {
@@ -329,11 +325,8 @@ void Code_Writer::write_cstring(fluid::string_view text)
\param[in] block pointer to a block of binary data, interpreted as unsigned bytes
*/
void Code_Writer::write_cdata(fluid::string_view block) {
if (varused_test) {
varused = 1;
return;
}
void Code_Writer::write_cdata(fluid::string_view block)
{
if (write_codeview) {
if (!block.empty())
crc_puts("{ /* ... " + std::to_string(block.size()) + " bytes of binary data... */ }");
@@ -370,10 +363,6 @@ void Code_Writer::write_cdata(fluid::string_view block) {
\param[in] code string containing the code to write
*/
void Code_Writer::write_c(const std::string& code) {
if (varused_test) {
varused = 1;
return;
}
crc_puts(code);
}
@@ -399,7 +388,6 @@ void Code_Writer::write_cc(const std::string& indent, const std::string& code, c
\param[in] code string containing the code to write
*/
void Code_Writer::write_h(const std::string& code) {
if (varused_test) return;
header_buffer << code;
}
+1 -7
View File
@@ -1,7 +1,7 @@
//
// Fluid C++ Code Writer header for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2025 by Bill Spitzak and others.
// Copyright 1998-2026 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
@@ -129,12 +129,6 @@ public:
/// set if we write abbreviated file for the source code previewer
/// (disables binary data blocks, for example)
bool write_codeview { false };
/// silly thing to prevent declaring unused variables:
/// When this symbol is on, all attempts to write code don't write
/// anything, but set a variable if it looks like the variable "o" is used:
int varused_test { 0 };
/// set to 1 if varused_test found that a variable is actually used
int varused { 0 };
public:
Code_Writer(Project &proj);
+1 -4
View File
@@ -296,14 +296,11 @@ Fl_Widget *Grid_Node::widget(int X,int Y,int W,int H) {
return g;
}
Fl_Widget *Grid_Node::enter_live_mode(int top) {
Fl_Widget *Grid_Node::enter_live_mode() {
Fl_Grid *grid = new Fl_Grid(o->x(), o->y(), o->w(), o->h());
return propagate_live_mode(grid);
}
void Grid_Node::leave_live_mode() {
}
void Grid_Node::copy_properties()
{
super::copy_properties();
+1 -2
View File
@@ -59,8 +59,7 @@ public:
void read_property(fluid::io::Project_Reader &f, const char *) override;
void write_parent_properties(fluid::io::Project_Writer &f, Node *child, bool encapsulate) override;
void read_parent_property(fluid::io::Project_Reader &f, Node *child, const char *property) override;
Fl_Widget *enter_live_mode(int top=0) override;
void leave_live_mode() override;
Fl_Widget *enter_live_mode() override;
void copy_properties() override;
void copy_properties_for_children() override;
void write_code1(fluid::io::Code_Writer& f) override;
+7 -13
View File
@@ -247,14 +247,11 @@ void Group_Node::move_child(Node* cc, Node* before) {
}
// live mode support
Fl_Widget* Group_Node::enter_live_mode(int) {
Fl_Widget* Group_Node::enter_live_mode() {
Fl_Group *grp = new Fl_Group(o->x(), o->y(), o->w(), o->h());
return propagate_live_mode(grp);
}
void Group_Node::leave_live_mode() {
}
/**
copy all properties from the edit widget to the live widget
*/
@@ -274,7 +271,7 @@ Fl_Menu_Item pack_type_menu[] = {
{nullptr}
};
Fl_Widget *Pack_Node::enter_live_mode(int) {
Fl_Widget *Pack_Node::enter_live_mode() {
Fl_Group *grp = new Fl_Pack(o->x(), o->y(), o->w(), o->h());
return propagate_live_mode(grp);
}
@@ -321,7 +318,7 @@ void Fl_Flex_Proxy::draw() {
Fl_Flex::draw();
}
Fl_Widget *Flex_Node::enter_live_mode(int) {
Fl_Widget *Flex_Node::enter_live_mode() {
Fl_Flex *grp = new Fl_Flex(o->x(), o->y(), o->w(), o->h());
propagate_live_mode(grp);
Fl_Flex *d = grp, *s =(Fl_Flex*)o;
@@ -710,7 +707,7 @@ void Table_Node::move_child(Node* cc, Node* before) {
o->redraw();
}
Fl_Widget *Table_Node::enter_live_mode(int) {
Fl_Widget *Table_Node::enter_live_mode() {
Fl_Group *grp = new Fl_Table_Proxy(o->x(), o->y(), o->w(), o->h());
live_widget = grp;
copy_properties();
@@ -782,7 +779,7 @@ void Tabs_Node::remove_child(Node* cc) {
Group_Node::remove_child(cc);
}
Fl_Widget *Tabs_Node::enter_live_mode(int) {
Fl_Widget *Tabs_Node::enter_live_mode() {
Fl_Tabs *original = static_cast<Fl_Tabs*>(o);
Fl_Tabs *clone = new Fl_Tabs(o->x(), o->y(), o->w(), o->h());
propagate_live_mode(clone);
@@ -807,7 +804,7 @@ Fl_Menu_Item scroll_type_menu[] = {
{"BOTH_ALWAYS", 0, nullptr, (void*)Fl_Scroll::BOTH_ALWAYS},
{nullptr}};
Fl_Widget *Scroll_Node::enter_live_mode(int) {
Fl_Widget *Scroll_Node::enter_live_mode() {
Fl_Group *grp = new Fl_Scroll(o->x(), o->y(), o->w(), o->h());
grp->show();
return propagate_live_mode(grp);
@@ -829,14 +826,11 @@ Tile_Node Tile_Node::prototype; // the "factory"
const char tile_type_name[] = "Fl_Tile";
// live mode support
Fl_Widget* Tile_Node::enter_live_mode(int) {
Fl_Widget* Tile_Node::enter_live_mode() {
Fl_Group *grp = new Fl_Tile(o->x(), o->y(), o->w(), o->h());
return propagate_live_mode(grp);
}
void Tile_Node::leave_live_mode() {
}
void Tile_Node::copy_properties() {
Group_Node::copy_properties();
// no additional properties
+7 -9
View File
@@ -62,8 +62,7 @@ public:
void move_child(Node*, Node*) override;
void remove_child(Node*) override;
int can_have_children() const override {return 1;}
Fl_Widget *enter_live_mode(int top=0) override;
void leave_live_mode() override;
Fl_Widget *enter_live_mode() override;
void copy_properties() override;
};
@@ -83,7 +82,7 @@ public:
const char *type_name() override {return pack_type_name;}
const char *alt_type_name() override {return "fltk::PackedGroup";}
Widget_Node *_make() override {return new Pack_Node();}
Fl_Widget *enter_live_mode(int top=0) override;
Fl_Widget *enter_live_mode() override;
void copy_properties() override;
};
@@ -118,7 +117,7 @@ public:
Fl_Flex *g = new Fl_Flex_Proxy(X,Y,W,H); Fl_Group::current(nullptr); return g;}
void write_properties(fluid::io::Project_Writer &f) override;
void read_property(fluid::io::Project_Reader &f, const char *) override;
Fl_Widget *enter_live_mode(int top=0) override;
Fl_Widget *enter_live_mode() override;
void copy_properties() override;
void copy_properties_for_children() override;
void postprocess_read() override;
@@ -148,7 +147,7 @@ public:
const char *alt_type_name() override { return "fltk::TableGroup"; }
Widget_Node *_make() override { return new Table_Node(); }
Fl_Widget *widget(int X, int Y, int W, int H) override;
Fl_Widget *enter_live_mode(int top=0) override;
Fl_Widget *enter_live_mode() override;
void add_child(Node*, Node*) override;
void move_child(Node*, Node*) override;
void remove_child(Node*) override;
@@ -179,7 +178,7 @@ public:
Node* click_test(int,int) override;
void add_child(Node*, Node*) override;
void remove_child(Node*) override;
Fl_Widget *enter_live_mode(int top=0) override;
Fl_Widget *enter_live_mode() override;
};
// ---- Scroll_Node ------------------------------------------------- MARK: -
@@ -198,7 +197,7 @@ public:
const char *type_name() override {return scroll_type_name;}
const char *alt_type_name() override {return "fltk::ScrollGroup";}
Widget_Node *_make() override {return new Scroll_Node();}
Fl_Widget *enter_live_mode(int top=0) override;
Fl_Widget *enter_live_mode() override;
void copy_properties() override;
};
@@ -215,8 +214,7 @@ public:
const char *type_name() override {return tile_type_name;}
const char *alt_type_name() override {return "fltk::TileGroup";}
Widget_Node *_make() override {return new Tile_Node();}
Fl_Widget *enter_live_mode(int top=0) override;
void leave_live_mode() override;
Fl_Widget *enter_live_mode() override;
void copy_properties() override;
};
+1 -9
View File
@@ -1094,19 +1094,11 @@ void Node::write_comment_inline_c(fluid::io::Code_Writer& f, const char *pre)
/**
Build widgets and dataset needed in live mode.
\return a widget pointer that the live mode initiator can 'show()'
\see leave_live_mode()
*/
Fl_Widget *Node::enter_live_mode(int) {
Fl_Widget *Node::enter_live_mode() {
return nullptr;
}
/**
Release all resources created when entering live mode.
\see enter_live_mode()
*/
void Node::leave_live_mode() {
}
/**
Copy all needed properties for this type into the live object.
*/
+1 -2
View File
@@ -260,8 +260,7 @@ public:
void write_comment_inline_c(fluid::io::Code_Writer& f, const char *ind=nullptr); // write the commentary text
// live mode
virtual Fl_Widget *enter_live_mode(int top=0); // build widgets needed for live mode
virtual void leave_live_mode(); // free allocated resources
virtual Fl_Widget *enter_live_mode(); // build widgets needed for live mode
virtual void copy_properties(); // copy properties from this type into a potential live object
virtual void copy_properties_for_children() { } // copy remaining properties after children were added
File diff suppressed because it is too large Load Diff
+108 -21
View File
@@ -40,42 +40,40 @@ extern Node* sort(Node* parent);
/**
Base class for all widget nodes including menu items.
*/
class Widget_Node : public Node {
class Widget_Node : public Node
{
typedef Node super;
virtual Fl_Widget* widget(int, int, int, int) = 0;
virtual Widget_Node* _make() = 0; // virtual constructor
void setlabel(const char*) override;
private: // Member Variables
/// Additional code blocks that can be inserted in the generated code
std::string extra_code_[NUM_EXTRA_CODE];
/// User can call the ctor for a class that is derived from the node class
std::string subclass_;
/// Keep a copy the tooltip here, also always updates the widget's tooltip
std::string tooltip_;
/// Set's a widget's hotspot, or adds a divider to a menu item
uchar hotspot_ = 0;
protected:
/// This variable is set for visible windows in batch mode.
/// We can't open a window in batch mode, even if we want the "visible" flags
/// set, so we need a second place to store this information while also
/// disabling the output of the "hide" property by the Widget Type.
uchar override_visible_ = 0;
void write_static(fluid::io::Code_Writer& f) override;
void write_code1(fluid::io::Code_Writer& f) override;
void write_widget_code(fluid::io::Code_Writer& f);
void write_block_close(fluid::io::Code_Writer& f);
void write_code2(fluid::io::Code_Writer& f) override;
void write_color(fluid::io::Code_Writer& f, const char*, Fl_Color);
/// Pointer to widget representing this node in live mode.
Fl_Widget* live_widget = nullptr;
public:
/// Pointer to widget for interactive editing.
Fl_Widget* o = nullptr;
/// Widget access mode, 0=private, 1=public, 2=protected
int public_ = 1;
@@ -83,51 +81,140 @@ public:
/// Active (normal state) image data and display options.
Widget_Image active_image;
/// Inactive (deactivated state) image data and display options.
Widget_Image inactive_image;
private: // Methods
// Override this to generate a widget, representing this node
virtual Fl_Widget* widget(int X, int Y, int W, int H) = 0;
// Override this, so the factory can build a node based on its prototype
virtual Widget_Node* _make() = 0; // virtual constructor
// Override to call `label()` for the right subclass of the widget in `o`.
void setlabel(const char*) override;
protected:
// ---- Code Writer functions for generating source code for this widget
// Write the static initializer code for the widget
void write_static(fluid::io::Code_Writer& f) override;
// Write the code that creates the widget before the children are created
void write_code1(fluid::io::Code_Writer& f) override;
// Write the code after the children of the widget are created
void write_code2(fluid::io::Code_Writer& f) override;
// Write the code to set properties, called from write_code1
void write_widget_code(fluid::io::Code_Writer& f);
// Write the code to end instantiation of this widget, called by write_code2
void write_block_close(fluid::io::Code_Writer& f);
// Helper to write code for a color property using symbolic names
void write_color(fluid::io::Code_Writer& f, const char*, Fl_Color);
// ---- Construction and Destruction
// Never called directly, called by constructor of derived class
Widget_Node() = default;
public:
// Return all resources
~Widget_Node() override;
// Delete all copy and move operators
Widget_Node(const Widget_Node&) = delete;
Widget_Node& operator=(const Widget_Node&) = delete;
Widget_Node(Widget_Node&&) = delete;
Widget_Node& operator=(Widget_Node&&) = delete;
// ---- Node Lifetime Management
// Make a new Node and add it to the tree
Node* make(Strategy strategy) override;
// Open the Node editor panel
void open() override;
// Find the ideal size for this widget
virtual void ideal_size(int& w, int& h);
/// Return a list of subtypes for this widget class as a pulldown menu
virtual Fl_Menu_Item* subtypes() { return nullptr; }
// Redraw after cahnges via widget panel, rebuilds menu item arrays if needed
void redraw();
// Return true for Widget_Node and derived classes
int is_widget() const override { return true; }
// Return true for Widget_Node and derived classes that are not menu items
int is_true_widget() const override { return 1; }
// Return true for Widget_Node and derived classes that are buttons
int is_public() const override { return public_; }
// ---- Handle user created code blocks
/// Return one of the extra code blocks
const std::string& extra_code(int n) const { return extra_code_[n]; }
// Set one of the extra code blocks cropping leading and trailing whitespace
void extra_code(int n, const std::string& code);
// Add one or more lines of code to one of the extra code blocks
void extra_code_append(int n, const std::string& code);
// ---- Getter and setter for various properties
// Subclass can be an arbitraty string
std::string subclass() const { return subclass_; }
void subclass(const std::string& name);
// Tooltip text, can contain newlines
std::string tooltip() const { return tooltip_; }
void tooltip(const std::string& text);
// Set to 1 if this widget is the hotspot for a dialog box, i.e. this
// widget will be used to position a dialog box under the mouse pointer.
// Note: hotspot is reused by menu items to indicate a divider
uchar hotspot() const { return hotspot_; }
void hotspot(uchar v) { hotspot_ = v; }
// Set to 1 if this widget is the resizable widget for a window or group
uchar resizable() const;
void resizable(uchar v);
// Read or write text attributes in widgets that support text, like Fl_Input, Fl_Text_Display, etc.
virtual int textstuff(int what, Fl_Font&, int&, Fl_Color&);
virtual Fl_Menu_Item* subtypes();
int is_widget() const override;
int is_true_widget() const override { return 1; }
int is_public() const override;
// ---- Read and write project files
// Write all properties of this node, calls super class to write more properties
void write_properties(fluid::io::Project_Writer& f) override;
// Read a property of this node, calls super class if property is not recognized
void read_property(fluid::io::Project_Reader& f, const char*) override;
// Back compatibility to Forms FDesign project files
int read_fdesign(const char*, const char*) override;
Fl_Widget* enter_live_mode(int top = 0) override;
Fl_Widget* propagate_live_mode(Fl_Group* grp);
void leave_live_mode() override;
void copy_properties() override;
// ---- Live mode support
void redraw();
// Create a live mode widget and all its children
Fl_Widget* propagate_live_mode(Fl_Group* grp);
// Create a live widget for this node
Fl_Widget* enter_live_mode() override;
// Copy the properties from the edit widget to the live widget
void copy_properties() override;
};
#endif // FLUID_NODES_WIDGET_NODE_H
+1 -4
View File
@@ -1493,14 +1493,11 @@ void Widget_Class_Node::write_code2(fluid::io::Code_Writer& f) {
////////////////////////////////////////////////////////////////
// live mode support
Fl_Widget *Window_Node::enter_live_mode(int) {
Fl_Widget *Window_Node::enter_live_mode() {
Fl_Window *win = new Fl_Window(10, 10, o->w(), o->h());
return propagate_live_mode(win);
}
void Window_Node::leave_live_mode() {
}
/**
copy all properties from the edit widget to the live widget
*/
+1 -2
View File
@@ -116,8 +116,7 @@ public:
int can_have_children() const override {return 1;}
Fl_Widget *enter_live_mode(int top=0) override;
void leave_live_mode() override;
Fl_Widget *enter_live_mode() override;
void copy_properties() override;
int sr_min_w, sr_min_h, sr_max_w, sr_max_h;
+12 -6
View File
@@ -160,16 +160,19 @@ Fl_Double_Window* make_about_panel() {
struct tm *lt = localtime(&t);
sprintf(cbuf, "Copyright © 1998 - %d\nby Bill Spitzak and others", lt->tm_year+1900);
}
{ about_panel = new Fl_Double_Window(345, 180, "About FLUID");
{ auto* o = about_panel = new Fl_Double_Window(345, 180, "About FLUID");
(void)o;
about_panel->color(FL_LIGHT1);
about_panel->selection_color(FL_DARK1);
about_panel->hotspot(about_panel);
{ Fl_Box* o = new Fl_Box(10, 10, 115, 120);
{ auto* o = new Fl_Box(10, 10, 115, 120);
(void)o;
o->image( image_fluid() );
((Fl_Anim_GIF_Image*)(image_fluid()))->canvas(o, Fl_Anim_GIF_Image::DONT_RESIZE_CANVAS);
((Fl_Anim_GIF_Image*)(o->image()))->speed(0.5f);
} // Fl_Box* o
{ Fl_Box* o = new Fl_Box(135, 10, 205, 75, "FLTK User\nInterface Designer\nVersion x.x.x");
{ auto* o = new Fl_Box(135, 10, 205, 75, "FLTK User\nInterface Designer\nVersion x.x.x");
(void)o;
o->color((Fl_Color)12);
o->selection_color(FL_DARK1);
o->labelfont(1);
@@ -180,15 +183,18 @@ Fl_Double_Window* make_about_panel() {
o->copy_label(about);
} // Fl_Box* o
{ // Label edited dynamically:
Fl_Box* o = new Fl_Box(135, 90, 200, 45, "(Copyright)");
auto* o = new Fl_Box(135, 90, 200, 45, "(Copyright)");
(void)o;
o->align(Fl_Align(132|FL_ALIGN_INSIDE));
o->label(cbuf);
} // Fl_Box* o
{ Fl_Button* o = new Fl_Button(115, 145, 123, 25, "View License...");
{ auto* o = new Fl_Button(115, 145, 123, 25, "View License...");
(void)o;
o->labelcolor(FL_DARK_BLUE);
o->callback((Fl_Callback*)cb_View);
} // Fl_Button* o
{ Fl_Return_Button* o = new Fl_Return_Button(250, 145, 83, 25, "Close");
{ auto* o = new Fl_Return_Button(250, 145, 83, 25, "Close");
(void)o;
o->callback((Fl_Callback*)cb_Close);
} // Fl_Return_Button* o
about_panel->set_non_modal();
+48 -24
View File
@@ -383,16 +383,20 @@ Fl_Menu_Item menu_cv_code_choice_w[] = {
};
Fl_Double_Window* make_codeview() {
{ codeview_panel = new Fl_Double_Window(520, 515, "Code View");
{ auto* o = codeview_panel = new Fl_Double_Window(520, 515, "Code View");
(void)o;
codeview_panel->callback((Fl_Callback*)toggle_codeview_cb);
codeview_panel->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
{ cv_tab = new Fl_Tabs(10, 10, 500, 440);
{ auto* o = cv_tab = new Fl_Tabs(10, 10, 500, 440);
(void)o;
cv_tab->selection_color((Fl_Color)4);
cv_tab->labelcolor(FL_BACKGROUND2_COLOR);
cv_tab->callback((Fl_Callback*)update_codeview_position_cb);
{ cv_source_tab = new Fl_Group(10, 35, 500, 415, "Source");
{ auto* o = cv_source_tab = new Fl_Group(10, 35, 500, 415, "Source");
(void)o;
cv_source_tab->labelsize(13);
{ fluid::widget::Code_Viewer* o = cv_source = new fluid::widget::Code_Viewer(10, 40, 500, 410);
{ auto* o = cv_source = new fluid::widget::Code_Viewer(10, 40, 500, 410);
(void)o;
cv_source->box(FL_DOWN_FRAME);
cv_source->color(FL_BACKGROUND2_COLOR);
cv_source->selection_color(FL_SELECTION_COLOR);
@@ -411,10 +415,12 @@ Fl_Double_Window* make_codeview() {
cv_source_tab->end();
Fl_Group::current()->resizable(cv_source_tab);
} // Fl_Group* cv_source_tab
{ Fl_Group* o = new Fl_Group(10, 35, 500, 415, "Header");
{ auto* o = new Fl_Group(10, 35, 500, 415, "Header");
(void)o;
o->labelsize(13);
o->hide();
{ fluid::widget::Code_Viewer* o = cv_header = new fluid::widget::Code_Viewer(10, 40, 500, 410);
{ auto* o = cv_header = new fluid::widget::Code_Viewer(10, 40, 500, 410);
(void)o;
cv_header->box(FL_DOWN_FRAME);
cv_header->color(FL_BACKGROUND2_COLOR);
cv_header->selection_color(FL_SELECTION_COLOR);
@@ -432,10 +438,12 @@ Fl_Double_Window* make_codeview() {
} // fluid::widget::Code_Viewer* cv_header
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(10, 35, 500, 415, "Strings");
{ auto* o = new Fl_Group(10, 35, 500, 415, "Strings");
(void)o;
o->labelsize(13);
o->hide();
{ fluid::widget::Text_Viewer* o = cv_strings = new fluid::widget::Text_Viewer(10, 40, 500, 410);
{ auto* o = cv_strings = new fluid::widget::Text_Viewer(10, 40, 500, 410);
(void)o;
cv_strings->box(FL_DOWN_FRAME);
cv_strings->color(FL_BACKGROUND2_COLOR);
cv_strings->selection_color(FL_SELECTION_COLOR);
@@ -453,10 +461,12 @@ Fl_Double_Window* make_codeview() {
} // fluid::widget::Text_Viewer* cv_strings
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(10, 35, 500, 415, "Project");
{ auto* o = new Fl_Group(10, 35, 500, 415, "Project");
(void)o;
o->labelsize(13);
o->hide();
{ fluid::widget::Text_Viewer* o = cv_project = new fluid::widget::Text_Viewer(10, 40, 500, 410);
{ auto* o = cv_project = new fluid::widget::Text_Viewer(10, 40, 500, 410);
(void)o;
cv_project->box(FL_DOWN_FRAME);
cv_project->color(FL_BACKGROUND2_COLOR);
cv_project->selection_color(FL_SELECTION_COLOR);
@@ -477,57 +487,71 @@ Fl_Double_Window* make_codeview() {
cv_tab->end();
Fl_Group::current()->resizable(cv_tab);
} // Fl_Tabs* cv_tab
{ cv_find_row = new Fl_Group(10, 460, 500, 20);
{ cv_find_text_case = new Fl_Button(244, 460, 25, 20, "aA");
{ auto* o = cv_find_row = new Fl_Group(10, 460, 500, 20);
(void)o;
{ auto* o = cv_find_text_case = new Fl_Button(244, 460, 25, 20, "aA");
(void)o;
cv_find_text_case->type(1);
cv_find_text_case->labelsize(11);
} // Fl_Button* cv_find_text_case
{ cv_find_text = new Fl_Input(40, 460, 200, 20, "Find:");
{ auto* o = cv_find_text = new Fl_Input(40, 460, 200, 20, "Find:");
(void)o;
cv_find_text->labelsize(11);
cv_find_text->textsize(11);
cv_find_text->callback((Fl_Callback*)cb_cv_find_text);
cv_find_text->when(FL_WHEN_RELEASE | FL_WHEN_ENTER_KEY_CHANGED);
} // Fl_Input* cv_find_text
{ Fl_Button* o = new Fl_Button(273, 460, 25, 20, "<<");
{ auto* o = new Fl_Button(273, 460, 25, 20, "<<");
(void)o;
o->labelsize(11);
o->callback((Fl_Callback*)cb_);
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(298, 460, 25, 20, ">>");
{ auto* o = new Fl_Button(298, 460, 25, 20, ">>");
(void)o;
o->labelsize(11);
o->callback((Fl_Callback*)cb_1);
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(327, 460, 61, 20, "Reveal");
{ auto* o = new Fl_Button(327, 460, 61, 20, "Reveal");
(void)o;
o->labelsize(11);
o->callback((Fl_Callback*)cb_Reveal);
} // Fl_Button* o
{ Fl_Box* o = new Fl_Box(490, 460, 20, 20);
{ auto* o = new Fl_Box(490, 460, 20, 20);
(void)o;
Fl_Group::current()->resizable(o);
} // Fl_Box* o
cv_find_row->end();
} // Fl_Group* cv_find_row
{ cv_settings_row = new Fl_Group(10, 485, 500, 20);
{ Fl_Button* o = new Fl_Button(10, 485, 61, 20, "Refresh");
{ auto* o = cv_settings_row = new Fl_Group(10, 485, 500, 20);
(void)o;
{ auto* o = new Fl_Button(10, 485, 61, 20, "Refresh");
(void)o;
o->labelsize(11);
o->callback((Fl_Callback*)update_codeview_cb);
} // Fl_Button* o
{ Fl_Light_Button* o = cv_autorefresh = new Fl_Light_Button(77, 485, 91, 20, "Auto-Refresh");
{ auto* o = cv_autorefresh = new Fl_Light_Button(77, 485, 91, 20, "Auto-Refresh");
(void)o;
cv_autorefresh->labelsize(11);
o->callback((Fl_Callback*)update_codeview_cb);
} // Fl_Light_Button* cv_autorefresh
{ cv_autoposition = new Fl_Light_Button(172, 485, 89, 20, "Auto-Position");
{ auto* o = cv_autoposition = new Fl_Light_Button(172, 485, 89, 20, "Auto-Position");
(void)o;
cv_autoposition->labelsize(11);
} // Fl_Light_Button* cv_autoposition
{ cv_code_choice_w = new Fl_Choice(265, 485, 90, 20);
{ auto* o = cv_code_choice_w = new Fl_Choice(265, 485, 90, 20);
(void)o;
cv_code_choice_w->down_box(FL_BORDER_BOX);
cv_code_choice_w->labelsize(11);
cv_code_choice_w->textsize(11);
cv_code_choice_w->callback((Fl_Callback*)cb_cv_code_choice_w);
cv_code_choice_w->menu(menu_cv_code_choice_w);
} // Fl_Choice* cv_code_choice_w
{ Fl_Box* o = new Fl_Box(375, 485, 80, 20);
{ auto* o = new Fl_Box(375, 485, 80, 20);
(void)o;
Fl_Group::current()->resizable(o);
} // Fl_Box* o
{ Fl_Button* o = new Fl_Button(460, 485, 50, 20, "Close");
{ auto* o = new Fl_Button(460, 485, 50, 20, "Close");
(void)o;
o->labelsize(11);
o->callback((Fl_Callback*)toggle_codeview_b_cb);
} // Fl_Button* o
+1 -1
View File
@@ -1,7 +1,7 @@
//
// Code dialogs for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2023 by Bill Spitzak and others.
// Copyright 1998-2026 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 diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+20 -10
View File
@@ -132,42 +132,52 @@ static void cb_template_submit(Fl_Return_Button*, void*) {
}
Fl_Double_Window* make_template_panel() {
{ template_panel = new Fl_Double_Window(460, 355, "New/Save Template");
{ auto* o = template_panel = new Fl_Double_Window(460, 355, "New/Save Template");
(void)o;
template_panel->callback((Fl_Callback*)cb_template_panel);
{ template_browser = new Fl_Browser(10, 28, 180, 250, "Available Templates:");
{ auto* o = template_browser = new Fl_Browser(10, 28, 180, 250, "Available Templates:");
(void)o;
template_browser->type(2);
template_browser->labelfont(1);
template_browser->callback((Fl_Callback*)cb_template_browser);
template_browser->align(Fl_Align(FL_ALIGN_TOP_LEFT));
template_browser->when(FL_WHEN_CHANGED | FL_WHEN_NOT_CHANGED);
} // Fl_Browser* template_browser
{ template_preview = new Fl_Box(200, 28, 250, 250);
{ auto* o = template_preview = new Fl_Box(200, 28, 250, 250);
(void)o;
template_preview->box(FL_THIN_DOWN_BOX);
template_preview->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
Fl_Group::current()->resizable(template_preview);
} // Fl_Box* template_preview
{ template_name = new Fl_Input(198, 288, 252, 25, "Template Name:");
{ auto* o = template_name = new Fl_Input(198, 288, 252, 25, "Template Name:");
(void)o;
template_name->labelfont(1);
template_name->textfont(4);
template_name->callback((Fl_Callback*)cb_template_name);
template_name->when(FL_WHEN_CHANGED | FL_WHEN_NOT_CHANGED);
} // Fl_Input* template_name
{ template_instance = new Fl_Input(198, 288, 252, 25, "Instance Name:");
{ auto* o = template_instance = new Fl_Input(198, 288, 252, 25, "Instance Name:");
(void)o;
template_instance->labelfont(1);
template_instance->textfont(4);
template_instance->hide();
} // Fl_Input* template_instance
{ Fl_Group* o = new Fl_Group(10, 323, 440, 25);
{ template_delete = new Fl_Button(10, 323, 143, 25, "Delete Template");
{ auto* o = new Fl_Group(10, 323, 440, 25);
(void)o;
{ auto* o = template_delete = new Fl_Button(10, 323, 143, 25, "Delete Template");
(void)o;
template_delete->callback((Fl_Callback*)template_delete_cb);
} // Fl_Button* template_delete
{ Fl_Box* o = new Fl_Box(153, 323, 126, 25);
{ auto* o = new Fl_Box(153, 323, 126, 25);
(void)o;
Fl_Group::current()->resizable(o);
} // Fl_Box* o
{ Fl_Button* o = new Fl_Button(289, 323, 72, 25, "Cancel");
{ auto* o = new Fl_Button(289, 323, 72, 25, "Cancel");
(void)o;
o->callback((Fl_Callback*)cb_Cancel);
} // Fl_Button* o
{ template_submit = new Fl_Return_Button(371, 323, 79, 25, "Save");
{ auto* o = template_submit = new Fl_Return_Button(371, 323, 79, 25, "Save");
(void)o;
template_submit->callback((Fl_Callback*)cb_template_submit);
} // Fl_Return_Button* template_submit
o->end();
File diff suppressed because it is too large Load Diff
+62 -31
View File
@@ -249,13 +249,15 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) :
{
this->labelsize(11);
this->callback((Fl_Callback*)propagate_load);
{ Fl_Group* o = new Fl_Group(85, 30, 315, 20, "Location:");
{ auto* o = new Fl_Group(85, 30, 315, 20, "Location:");
(void)o;
o->box(FL_FLAT_BOX);
o->labelfont(1);
o->labelsize(11);
o->callback((Fl_Callback*)propagate_load);
o->align(Fl_Align(FL_ALIGN_LEFT));
{ widget_grid_row_input = new fluid::widget::Formula_Input(85, 30, 40, 20, "Row:");
{ auto* o = widget_grid_row_input = new fluid::widget::Formula_Input(85, 30, 40, 20, "Row:");
(void)o;
widget_grid_row_input->box(FL_DOWN_BOX);
widget_grid_row_input->color(FL_BACKGROUND2_COLOR);
widget_grid_row_input->selection_color(FL_SELECTION_COLOR);
@@ -268,14 +270,17 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) :
widget_grid_row_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
widget_grid_row_input->when(FL_WHEN_RELEASE);
} // fluid::widget::Formula_Input* widget_grid_row_input
{ Fl_Group* o = new Fl_Group(125, 30, 30, 20);
{ Fl_Button* o = new Fl_Button(125, 30, 15, 20, "-");
{ auto* o = new Fl_Group(125, 30, 30, 20);
(void)o;
{ auto* o = new Fl_Button(125, 30, 15, 20, "-");
(void)o;
o->compact(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_);
o->clear_visible_focus();
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(140, 30, 15, 20, "+");
{ auto* o = new Fl_Button(140, 30, 15, 20, "+");
(void)o;
o->compact(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_1);
@@ -283,7 +288,8 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) :
} // Fl_Button* o
o->end();
} // Fl_Group* o
{ widget_grid_col_input = new fluid::widget::Formula_Input(165, 30, 40, 20, "Column:");
{ auto* o = widget_grid_col_input = new fluid::widget::Formula_Input(165, 30, 40, 20, "Column:");
(void)o;
widget_grid_col_input->box(FL_DOWN_BOX);
widget_grid_col_input->color(FL_BACKGROUND2_COLOR);
widget_grid_col_input->selection_color(FL_SELECTION_COLOR);
@@ -296,14 +302,17 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) :
widget_grid_col_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
widget_grid_col_input->when(FL_WHEN_RELEASE);
} // fluid::widget::Formula_Input* widget_grid_col_input
{ Fl_Group* o = new Fl_Group(205, 30, 30, 20);
{ Fl_Button* o = new Fl_Button(205, 30, 15, 20, "-");
{ auto* o = new Fl_Group(205, 30, 30, 20);
(void)o;
{ auto* o = new Fl_Button(205, 30, 15, 20, "-");
(void)o;
o->compact(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_2);
o->clear_visible_focus();
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(220, 30, 15, 20, "+");
{ auto* o = new Fl_Button(220, 30, 15, 20, "+");
(void)o;
o->compact(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_3);
@@ -311,28 +320,33 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) :
} // Fl_Button* o
o->end();
} // Fl_Group* o
{ Fl_Box* o = new Fl_Box(385, 30, 1, 20);
{ auto* o = new Fl_Box(385, 30, 1, 20);
(void)o;
o->hide();
Fl_Group::current()->resizable(o);
} // Fl_Box* o
{ widget_grid_transient = new Fl_Box(240, 30, 80, 20, "TRANSIENT");
{ auto* o = widget_grid_transient = new Fl_Box(240, 30, 80, 20, "TRANSIENT");
(void)o;
widget_grid_transient->labelsize(11);
widget_grid_transient->labelcolor((Fl_Color)1);
widget_grid_transient->callback((Fl_Callback*)cb_widget_grid_transient);
} // Fl_Box* widget_grid_transient
{ widget_grid_unlinked = new Fl_Box(240, 30, 80, 20, "UNLINKED");
{ auto* o = widget_grid_unlinked = new Fl_Box(240, 30, 80, 20, "UNLINKED");
(void)o;
widget_grid_unlinked->labelsize(11);
widget_grid_unlinked->labelcolor((Fl_Color)1);
widget_grid_unlinked->hide();
} // Fl_Box* widget_grid_unlinked
o->end();
} // Fl_Group* o
{ wp_gridc_align = new Fl_Group(85, 70, 315, 20, "Align:");
{ auto* o = wp_gridc_align = new Fl_Group(85, 70, 315, 20, "Align:");
(void)o;
wp_gridc_align->labelfont(1);
wp_gridc_align->labelsize(11);
wp_gridc_align->callback((Fl_Callback*)propagate_load);
wp_gridc_align->align(Fl_Align(FL_ALIGN_LEFT));
{ Fl_Choice* o = new Fl_Choice(85, 70, 115, 20, "Horizontal");
{ auto* o = new Fl_Choice(85, 70, 115, 20, "Horizontal");
(void)o;
o->down_box(FL_BORDER_BOX);
o->labelsize(11);
o->textsize(11);
@@ -340,7 +354,8 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) :
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->menu(menu_Horizontal);
} // Fl_Choice* o
{ Fl_Choice* o = new Fl_Choice(205, 70, 115, 20, "Vertical");
{ auto* o = new Fl_Choice(205, 70, 115, 20, "Vertical");
(void)o;
o->down_box(FL_BORDER_BOX);
o->labelsize(11);
o->textsize(11);
@@ -348,18 +363,21 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) :
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->menu(menu_Vertical);
} // Fl_Choice* o
{ Fl_Box* o = new Fl_Box(385, 70, 1, 20);
{ auto* o = new Fl_Box(385, 70, 1, 20);
(void)o;
o->hide();
Fl_Group::current()->resizable(o);
} // Fl_Box* o
wp_gridc_align->end();
} // Fl_Group* wp_gridc_align
{ wp_gridc_size = new Fl_Group(85, 105, 315, 20, "Min. Size:");
{ auto* o = wp_gridc_size = new Fl_Group(85, 105, 315, 20, "Min. Size:");
(void)o;
wp_gridc_size->labelfont(1);
wp_gridc_size->labelsize(11);
wp_gridc_size->callback((Fl_Callback*)propagate_load);
wp_gridc_size->align(Fl_Align(FL_ALIGN_LEFT));
{ fluid::widget::Formula_Input* o = new fluid::widget::Formula_Input(85, 105, 55, 20, "Width:");
{ auto* o = new fluid::widget::Formula_Input(85, 105, 55, 20, "Width:");
(void)o;
o->box(FL_DOWN_BOX);
o->color(FL_BACKGROUND2_COLOR);
o->selection_color(FL_SELECTION_COLOR);
@@ -372,7 +390,8 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) :
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->when(FL_WHEN_RELEASE);
} // fluid::widget::Formula_Input* o
{ fluid::widget::Formula_Input* o = new fluid::widget::Formula_Input(145, 105, 55, 20, "Height:");
{ auto* o = new fluid::widget::Formula_Input(145, 105, 55, 20, "Height:");
(void)o;
o->box(FL_DOWN_BOX);
o->color(FL_BACKGROUND2_COLOR);
o->selection_color(FL_SELECTION_COLOR);
@@ -385,18 +404,21 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) :
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->when(FL_WHEN_RELEASE);
} // fluid::widget::Formula_Input* o
{ Fl_Box* o = new Fl_Box(385, 105, 1, 20);
{ auto* o = new Fl_Box(385, 105, 1, 20);
(void)o;
o->hide();
Fl_Group::current()->resizable(o);
} // Fl_Box* o
wp_gridc_size->end();
} // Fl_Group* wp_gridc_size
{ Fl_Group* o = new Fl_Group(85, 140, 315, 20, "Span:");
{ auto* o = new Fl_Group(85, 140, 315, 20, "Span:");
(void)o;
o->labelfont(1);
o->labelsize(11);
o->callback((Fl_Callback*)propagate_load);
o->align(Fl_Align(FL_ALIGN_LEFT));
{ widget_grid_rowspan_input = new fluid::widget::Formula_Input(85, 140, 40, 20, "Row Span:");
{ auto* o = widget_grid_rowspan_input = new fluid::widget::Formula_Input(85, 140, 40, 20, "Row Span:");
(void)o;
widget_grid_rowspan_input->box(FL_DOWN_BOX);
widget_grid_rowspan_input->color(FL_BACKGROUND2_COLOR);
widget_grid_rowspan_input->selection_color(FL_SELECTION_COLOR);
@@ -409,14 +431,17 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) :
widget_grid_rowspan_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
widget_grid_rowspan_input->when(FL_WHEN_RELEASE);
} // fluid::widget::Formula_Input* widget_grid_rowspan_input
{ Fl_Group* o = new Fl_Group(125, 140, 30, 20);
{ Fl_Button* o = new Fl_Button(125, 140, 15, 20, "-");
{ auto* o = new Fl_Group(125, 140, 30, 20);
(void)o;
{ auto* o = new Fl_Button(125, 140, 15, 20, "-");
(void)o;
o->compact(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_4);
o->clear_visible_focus();
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(140, 140, 15, 20, "+");
{ auto* o = new Fl_Button(140, 140, 15, 20, "+");
(void)o;
o->compact(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_5);
@@ -424,7 +449,8 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) :
} // Fl_Button* o
o->end();
} // Fl_Group* o
{ widget_grid_colspan_input = new fluid::widget::Formula_Input(165, 140, 40, 20, "Col. Span:");
{ auto* o = widget_grid_colspan_input = new fluid::widget::Formula_Input(165, 140, 40, 20, "Col. Span:");
(void)o;
widget_grid_colspan_input->box(FL_DOWN_BOX);
widget_grid_colspan_input->color(FL_BACKGROUND2_COLOR);
widget_grid_colspan_input->selection_color(FL_SELECTION_COLOR);
@@ -437,14 +463,17 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) :
widget_grid_colspan_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
widget_grid_colspan_input->when(FL_WHEN_RELEASE);
} // fluid::widget::Formula_Input* widget_grid_colspan_input
{ Fl_Group* o = new Fl_Group(205, 140, 30, 20);
{ Fl_Button* o = new Fl_Button(205, 140, 15, 20, "-");
{ auto* o = new Fl_Group(205, 140, 30, 20);
(void)o;
{ auto* o = new Fl_Button(205, 140, 15, 20, "-");
(void)o;
o->compact(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_6);
o->clear_visible_focus();
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(220, 140, 15, 20, "+");
{ auto* o = new Fl_Button(220, 140, 15, 20, "+");
(void)o;
o->compact(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_7);
@@ -452,13 +481,15 @@ Grid_Child_Tab::Grid_Child_Tab(int X, int Y, int W, int H, const char* L) :
} // Fl_Button* o
o->end();
} // Fl_Group* o
{ Fl_Box* o = new Fl_Box(385, 140, 1, 20);
{ auto* o = new Fl_Box(385, 140, 1, 20);
(void)o;
o->hide();
Fl_Group::current()->resizable(o);
} // Fl_Box* o
o->end();
} // Fl_Group* o
{ Fl_Box* o = new Fl_Box(85, 320, 300, 5);
{ auto* o = new Fl_Box(85, 320, 300, 5);
(void)o;
o->labelsize(11);
o->hide();
Fl_Group::current()->resizable(o);
+86 -43
View File
@@ -455,12 +455,14 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
{
this->labelsize(11);
this->callback((Fl_Callback*)propagate_load);
{ Fl_Group* o = new Fl_Group(85, 30, 315, 20, "Grid Layout:");
{ auto* o = new Fl_Group(85, 30, 315, 20, "Grid Layout:");
(void)o;
o->labelfont(1);
o->labelsize(11);
o->callback((Fl_Callback*)propagate_load);
o->align(Fl_Align(FL_ALIGN_LEFT));
{ widget_grid_rows = new fluid::widget::Formula_Input(85, 30, 40, 20, "Rows:");
{ auto* o = widget_grid_rows = new fluid::widget::Formula_Input(85, 30, 40, 20, "Rows:");
(void)o;
widget_grid_rows->tooltip("Number of horizontal rows in the Grid group");
widget_grid_rows->box(FL_DOWN_BOX);
widget_grid_rows->color(FL_BACKGROUND2_COLOR);
@@ -474,14 +476,17 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
widget_grid_rows->align(Fl_Align(FL_ALIGN_TOP_LEFT));
widget_grid_rows->when(FL_WHEN_RELEASE);
} // fluid::widget::Formula_Input* widget_grid_rows
{ Fl_Group* o = new Fl_Group(125, 30, 30, 20);
{ Fl_Button* o = new Fl_Button(125, 30, 15, 20, "-");
{ auto* o = new Fl_Group(125, 30, 30, 20);
(void)o;
{ auto* o = new Fl_Button(125, 30, 15, 20, "-");
(void)o;
o->compact(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_);
o->clear_visible_focus();
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(140, 30, 15, 20, "+");
{ auto* o = new Fl_Button(140, 30, 15, 20, "+");
(void)o;
o->compact(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_1);
@@ -489,7 +494,8 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
} // Fl_Button* o
o->end();
} // Fl_Group* o
{ widget_grid_cols = new fluid::widget::Formula_Input(165, 30, 40, 20, "Columns:");
{ auto* o = widget_grid_cols = new fluid::widget::Formula_Input(165, 30, 40, 20, "Columns:");
(void)o;
widget_grid_cols->tooltip("Number of vertical columns in the Grid group");
widget_grid_cols->box(FL_DOWN_BOX);
widget_grid_cols->color(FL_BACKGROUND2_COLOR);
@@ -503,14 +509,17 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
widget_grid_cols->align(Fl_Align(FL_ALIGN_TOP_LEFT));
widget_grid_cols->when(FL_WHEN_RELEASE);
} // fluid::widget::Formula_Input* widget_grid_cols
{ Fl_Group* o = new Fl_Group(205, 30, 30, 20);
{ Fl_Button* o = new Fl_Button(205, 30, 15, 20, "-");
{ auto* o = new Fl_Group(205, 30, 30, 20);
(void)o;
{ auto* o = new Fl_Button(205, 30, 15, 20, "-");
(void)o;
o->compact(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_2);
o->clear_visible_focus();
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(220, 30, 15, 20, "+");
{ auto* o = new Fl_Button(220, 30, 15, 20, "+");
(void)o;
o->compact(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_3);
@@ -518,17 +527,20 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
} // Fl_Button* o
o->end();
} // Fl_Group* o
{ Fl_Box* o = new Fl_Box(386, 30, 0, 20);
{ auto* o = new Fl_Box(386, 30, 0, 20);
(void)o;
Fl_Group::current()->resizable(o);
} // Fl_Box* o
o->end();
} // Fl_Group* o
{ wp_grid_margin = new Fl_Group(85, 70, 315, 20, "Margins:");
{ auto* o = wp_grid_margin = new Fl_Group(85, 70, 315, 20, "Margins:");
(void)o;
wp_grid_margin->labelfont(1);
wp_grid_margin->labelsize(11);
wp_grid_margin->callback((Fl_Callback*)propagate_load);
wp_grid_margin->align(Fl_Align(FL_ALIGN_LEFT));
{ Fl_Value_Input* o = new Fl_Value_Input(85, 70, 55, 20, "Left:");
{ auto* o = new Fl_Value_Input(85, 70, 55, 20, "Left:");
(void)o;
o->tooltip("Left margin in group.");
o->labelsize(11);
o->maximum(1000);
@@ -537,7 +549,8 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
o->callback((Fl_Callback*)cb_Left);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Value_Input* o
{ Fl_Value_Input* o = new Fl_Value_Input(145, 70, 55, 20, "Top:");
{ auto* o = new Fl_Value_Input(145, 70, 55, 20, "Top:");
(void)o;
o->tooltip("Top margin in group.");
o->labelsize(11);
o->maximum(1000);
@@ -546,7 +559,8 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
o->callback((Fl_Callback*)cb_Top);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Value_Input* o
{ Fl_Value_Input* o = new Fl_Value_Input(205, 70, 55, 20, "Right:");
{ auto* o = new Fl_Value_Input(205, 70, 55, 20, "Right:");
(void)o;
o->tooltip("Right margin in group.");
o->labelsize(11);
o->maximum(1000);
@@ -555,7 +569,8 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
o->callback((Fl_Callback*)cb_Right);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Value_Input* o
{ Fl_Value_Input* o = new Fl_Value_Input(265, 70, 55, 20, "Bottom:");
{ auto* o = new Fl_Value_Input(265, 70, 55, 20, "Bottom:");
(void)o;
o->tooltip("Bottom margin in group.");
o->labelsize(11);
o->maximum(1000);
@@ -564,17 +579,20 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
o->callback((Fl_Callback*)cb_Bottom);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Value_Input* o
{ Fl_Box* o = new Fl_Box(386, 70, 0, 20);
{ auto* o = new Fl_Box(386, 70, 0, 20);
(void)o;
Fl_Group::current()->resizable(o);
} // Fl_Box* o
wp_grid_margin->end();
} // Fl_Group* wp_grid_margin
{ wp_grid_gaps = new Fl_Group(85, 105, 315, 20, "Gaps:");
{ auto* o = wp_grid_gaps = new Fl_Group(85, 105, 315, 20, "Gaps:");
(void)o;
wp_grid_gaps->labelfont(1);
wp_grid_gaps->labelsize(11);
wp_grid_gaps->callback((Fl_Callback*)propagate_load);
wp_grid_gaps->align(Fl_Align(FL_ALIGN_LEFT));
{ Fl_Value_Input* o = new Fl_Value_Input(85, 105, 55, 20, "Row:");
{ auto* o = new Fl_Value_Input(85, 105, 55, 20, "Row:");
(void)o;
o->tooltip("Gap between children.");
o->labelsize(11);
o->maximum(1000);
@@ -583,7 +601,8 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
o->callback((Fl_Callback*)cb_Row);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Value_Input* o
{ Fl_Value_Input* o = new Fl_Value_Input(145, 105, 55, 20, "Col:");
{ auto* o = new Fl_Value_Input(145, 105, 55, 20, "Col:");
(void)o;
o->tooltip("Gap between children.");
o->labelsize(11);
o->maximum(1000);
@@ -592,17 +611,20 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
o->callback((Fl_Callback*)cb_Col);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
} // Fl_Value_Input* o
{ Fl_Box* o = new Fl_Box(386, 105, 0, 20);
{ auto* o = new Fl_Box(386, 105, 0, 20);
(void)o;
Fl_Group::current()->resizable(o);
} // Fl_Box* o
wp_grid_gaps->end();
} // Fl_Group* wp_grid_gaps
{ Fl_Group* o = new Fl_Group(85, 145, 315, 20, "Row:");
{ auto* o = new Fl_Group(85, 145, 315, 20, "Row:");
(void)o;
o->labelfont(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_Row1);
o->align(Fl_Align(FL_ALIGN_LEFT));
{ widget_grid_curr_row = new fluid::widget::Formula_Input(85, 145, 40, 20, "Index");
{ auto* o = widget_grid_curr_row = new fluid::widget::Formula_Input(85, 145, 40, 20, "Index");
(void)o;
widget_grid_curr_row->box(FL_DOWN_BOX);
widget_grid_curr_row->color(FL_BACKGROUND2_COLOR);
widget_grid_curr_row->selection_color(FL_SELECTION_COLOR);
@@ -615,15 +637,18 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
widget_grid_curr_row->align(Fl_Align(FL_ALIGN_TOP_LEFT));
widget_grid_curr_row->when(FL_WHEN_RELEASE);
} // fluid::widget::Formula_Input* widget_grid_curr_row
{ Fl_Group* o = new Fl_Group(125, 145, 30, 20);
{ auto* o = new Fl_Group(125, 145, 30, 20);
(void)o;
o->callback((Fl_Callback*)propagate_load);
{ Fl_Button* o = new Fl_Button(125, 145, 15, 20, "-");
{ auto* o = new Fl_Button(125, 145, 15, 20, "-");
(void)o;
o->compact(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_4);
o->clear_visible_focus();
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(140, 145, 15, 20, "+");
{ auto* o = new Fl_Button(140, 145, 15, 20, "+");
(void)o;
o->compact(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_5);
@@ -631,12 +656,15 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
} // Fl_Button* o
o->end();
} // Fl_Group* o
{ Fl_Box* o = new Fl_Box(155, 145, 15, 20, ":");
{ auto* o = new Fl_Box(155, 145, 15, 20, ":");
(void)o;
o->labelsize(11);
} // Fl_Box* o
{ widget_grid_curr_row_attributes = new Fl_Group(170, 145, 175, 20);
{ auto* o = widget_grid_curr_row_attributes = new Fl_Group(170, 145, 175, 20);
(void)o;
widget_grid_curr_row_attributes->callback((Fl_Callback*)propagate_load);
{ fluid::widget::Formula_Input* o = new fluid::widget::Formula_Input(170, 145, 55, 20, "Height:");
{ auto* o = new fluid::widget::Formula_Input(170, 145, 55, 20, "Height:");
(void)o;
o->box(FL_DOWN_BOX);
o->color(FL_BACKGROUND2_COLOR);
o->selection_color(FL_SELECTION_COLOR);
@@ -649,7 +677,8 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->when(FL_WHEN_RELEASE);
} // fluid::widget::Formula_Input* o
{ fluid::widget::Formula_Input* o = new fluid::widget::Formula_Input(230, 145, 55, 20, "Weight:");
{ auto* o = new fluid::widget::Formula_Input(230, 145, 55, 20, "Weight:");
(void)o;
o->box(FL_DOWN_BOX);
o->color(FL_BACKGROUND2_COLOR);
o->selection_color(FL_SELECTION_COLOR);
@@ -662,7 +691,8 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->when(FL_WHEN_RELEASE);
} // fluid::widget::Formula_Input* o
{ fluid::widget::Formula_Input* o = new fluid::widget::Formula_Input(290, 145, 55, 20, "Gap:");
{ auto* o = new fluid::widget::Formula_Input(290, 145, 55, 20, "Gap:");
(void)o;
o->box(FL_DOWN_BOX);
o->color(FL_BACKGROUND2_COLOR);
o->selection_color(FL_SELECTION_COLOR);
@@ -677,18 +707,21 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
} // fluid::widget::Formula_Input* o
widget_grid_curr_row_attributes->end();
} // Fl_Group* widget_grid_curr_row_attributes
{ Fl_Box* o = new Fl_Box(390, 145, 1, 20);
{ auto* o = new Fl_Box(390, 145, 1, 20);
(void)o;
o->hide();
Fl_Group::current()->resizable(o);
} // Fl_Box* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(85, 180, 315, 20, "Column:");
{ auto* o = new Fl_Group(85, 180, 315, 20, "Column:");
(void)o;
o->labelfont(1);
o->labelsize(11);
o->callback((Fl_Callback*)propagate_load);
o->align(Fl_Align(FL_ALIGN_LEFT));
{ widget_grid_curr_col = new fluid::widget::Formula_Input(85, 180, 40, 20, "Index");
{ auto* o = widget_grid_curr_col = new fluid::widget::Formula_Input(85, 180, 40, 20, "Index");
(void)o;
widget_grid_curr_col->box(FL_DOWN_BOX);
widget_grid_curr_col->color(FL_BACKGROUND2_COLOR);
widget_grid_curr_col->selection_color(FL_SELECTION_COLOR);
@@ -701,14 +734,17 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
widget_grid_curr_col->align(Fl_Align(FL_ALIGN_TOP_LEFT));
widget_grid_curr_col->when(FL_WHEN_RELEASE);
} // fluid::widget::Formula_Input* widget_grid_curr_col
{ Fl_Group* o = new Fl_Group(125, 180, 30, 20);
{ Fl_Button* o = new Fl_Button(125, 180, 15, 20, "-");
{ auto* o = new Fl_Group(125, 180, 30, 20);
(void)o;
{ auto* o = new Fl_Button(125, 180, 15, 20, "-");
(void)o;
o->compact(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_6);
o->clear_visible_focus();
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(140, 180, 15, 20, "+");
{ auto* o = new Fl_Button(140, 180, 15, 20, "+");
(void)o;
o->compact(1);
o->labelsize(11);
o->callback((Fl_Callback*)cb_7);
@@ -716,12 +752,15 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
} // Fl_Button* o
o->end();
} // Fl_Group* o
{ Fl_Box* o = new Fl_Box(155, 180, 15, 20, ":");
{ auto* o = new Fl_Box(155, 180, 15, 20, ":");
(void)o;
o->labelsize(11);
} // Fl_Box* o
{ widget_grid_curr_col_attributes = new Fl_Group(170, 180, 175, 20);
{ auto* o = widget_grid_curr_col_attributes = new Fl_Group(170, 180, 175, 20);
(void)o;
widget_grid_curr_col_attributes->callback((Fl_Callback*)propagate_load);
{ fluid::widget::Formula_Input* o = new fluid::widget::Formula_Input(170, 180, 55, 20, "Width:");
{ auto* o = new fluid::widget::Formula_Input(170, 180, 55, 20, "Width:");
(void)o;
o->box(FL_DOWN_BOX);
o->color(FL_BACKGROUND2_COLOR);
o->selection_color(FL_SELECTION_COLOR);
@@ -734,7 +773,8 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->when(FL_WHEN_RELEASE);
} // fluid::widget::Formula_Input* o
{ fluid::widget::Formula_Input* o = new fluid::widget::Formula_Input(230, 180, 55, 20, "Weight:");
{ auto* o = new fluid::widget::Formula_Input(230, 180, 55, 20, "Weight:");
(void)o;
o->box(FL_DOWN_BOX);
o->color(FL_BACKGROUND2_COLOR);
o->selection_color(FL_SELECTION_COLOR);
@@ -747,7 +787,8 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
o->when(FL_WHEN_RELEASE);
} // fluid::widget::Formula_Input* o
{ fluid::widget::Formula_Input* o = new fluid::widget::Formula_Input(290, 180, 55, 20, "Gap:");
{ auto* o = new fluid::widget::Formula_Input(290, 180, 55, 20, "Gap:");
(void)o;
o->box(FL_DOWN_BOX);
o->color(FL_BACKGROUND2_COLOR);
o->selection_color(FL_SELECTION_COLOR);
@@ -762,13 +803,15 @@ Grid_Tab::Grid_Tab(int X, int Y, int W, int H, const char* L) :
} // fluid::widget::Formula_Input* o
widget_grid_curr_col_attributes->end();
} // Fl_Group* widget_grid_curr_col_attributes
{ Fl_Box* o = new Fl_Box(390, 180, 1, 20);
{ auto* o = new Fl_Box(390, 180, 1, 20);
(void)o;
o->hide();
Fl_Group::current()->resizable(o);
} // Fl_Box* o
o->end();
} // Fl_Group* o
{ Fl_Box* o = new Fl_Box(85, 320, 300, 5);
{ auto* o = new Fl_Box(85, 320, 300, 5);
(void)o;
o->labelsize(11);
o->hide();
Fl_Group::current()->resizable(o);
+1 -3
View File
@@ -685,7 +685,7 @@ void live_mode_cb(Fl_Button* o, void *) {
if (o->value()) {
if (numselected == 1) {
Fl_Group::current(nullptr);
live_widget = current_widget->enter_live_mode(1);
live_widget = current_widget->enter_live_mode();
if (live_widget) {
live_type = current_widget;
Fl_Group::current(nullptr);
@@ -722,8 +722,6 @@ void live_mode_cb(Fl_Button* o, void *) {
} else o->value(0);
} else o->value(0);
} else {
if (live_type)
live_type->leave_live_mode();
if (live_window) {
live_window->hide();
Fl::delete_widget(live_window);