mirror of https://github.com/fltk/fltk
FLUID: basic Fl_Grid support
* no settings for children yet * ne good interactive editing for children
This commit is contained in:
parent
757b5c1227
commit
9817536cfd
|
@ -215,6 +215,9 @@ public:
|
|||
virtual void clear_layout();
|
||||
virtual void resize(int X, int Y, int W, int H) FL_OVERRIDE;
|
||||
|
||||
short rows() const { return rows_; }
|
||||
short cols() const { return cols_; }
|
||||
|
||||
/**
|
||||
Request or reset the request to calculate the layout of children.
|
||||
|
||||
|
@ -249,13 +252,15 @@ protected:
|
|||
|
||||
public:
|
||||
|
||||
// set individual margins
|
||||
// get and set individual margins
|
||||
|
||||
virtual void margin(int left, int top = -1, int right = -1, int bottom = -1);
|
||||
int margin(int *left, int *top, int *right, int *bottom) const;
|
||||
|
||||
// set default row and column gaps for all rows and columns, respectively
|
||||
// get and set default row and column gaps for all rows and columns, respectively
|
||||
|
||||
virtual void gap(int row_gap, int col_gap = -1); // set default row and column gap(s)
|
||||
void gap(int *row_gap, int *col_gap) const;
|
||||
|
||||
// find cells, get cell pointers
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ set (CPPFILES
|
|||
StyleParse.cxx
|
||||
Fd_Snap_Action.cxx
|
||||
Fl_Function_Type.cxx
|
||||
Fl_Grid_Type.cxx
|
||||
Fl_Group_Type.cxx
|
||||
Fl_Menu_Type.cxx
|
||||
Fl_Type.cxx
|
||||
|
@ -51,6 +52,7 @@ set (HEADERFILES
|
|||
CodeEditor.h
|
||||
Fd_Snap_Action.h
|
||||
Fl_Function_Type.h
|
||||
Fl_Grid_Type.h
|
||||
Fl_Group_Type.h
|
||||
Fl_Menu_Type.h
|
||||
Fl_Type.h
|
||||
|
|
|
@ -935,11 +935,11 @@ static bool in_window(Fd_Snap_Data &d) {
|
|||
}
|
||||
|
||||
static bool in_group(Fd_Snap_Data &d) {
|
||||
return (d.wgt && d.wgt->parent && d.wgt->parent->is_a(Fl_Type::ID_Group) && d.wgt->parent != d.win);
|
||||
return (d.wgt && d.wgt->parent && d.wgt->parent->is_a(ID_Group) && d.wgt->parent != d.win);
|
||||
}
|
||||
|
||||
static bool in_tabs(Fd_Snap_Data &d) {
|
||||
return (d.wgt && d.wgt->parent && d.wgt->parent->is_a(Fl_Type::ID_Tabs));
|
||||
return (d.wgt && d.wgt->parent && d.wgt->parent->is_a(ID_Tabs));
|
||||
}
|
||||
|
||||
static Fl_Group *parent(Fd_Snap_Data &d) {
|
||||
|
@ -1448,7 +1448,7 @@ public:
|
|||
clr();
|
||||
best_match = NULL;
|
||||
if (!d.wgt) return;
|
||||
if (!d.wgt->parent->is_a(Fl_Type::ID_Group)) return;
|
||||
if (!d.wgt->parent->is_a(ID_Group)) return;
|
||||
int dsib_min = 1024;
|
||||
Fl_Group_Type *gt = (Fl_Group_Type*)d.wgt->parent;
|
||||
Fl_Group *g = (Fl_Group*)gt->o;
|
||||
|
|
|
@ -45,7 +45,7 @@ Fl_Class_Type *current_class = NULL;
|
|||
int has_toplevel_function(const char *rtype, const char *sig) {
|
||||
Fl_Type *child;
|
||||
for (child = Fl_Type::first; child; child = child->next) {
|
||||
if (!child->is_in_class() && child->is_a(Fl_Type::ID_Function)) {
|
||||
if (!child->is_in_class() && child->is_a(ID_Function)) {
|
||||
const Fl_Function_Type *fn = (const Fl_Function_Type*)child;
|
||||
if (fn->has_signature(rtype, sig))
|
||||
return 1;
|
||||
|
@ -1982,7 +1982,7 @@ void Fl_Class_Type::write_code2(Fd_Code_Writer& f) {
|
|||
int Fl_Type::has_function(const char *rtype, const char *sig) const {
|
||||
Fl_Type *child;
|
||||
for (child = next; child && child->level > level; child = child->next) {
|
||||
if (child->level == level+1 && child->is_a(Fl_Type::ID_Function)) {
|
||||
if (child->level == level+1 && child->is_a(ID_Function)) {
|
||||
const Fl_Function_Type *fn = (const Fl_Function_Type*)child;
|
||||
if (fn->has_signature(rtype, sig))
|
||||
return 1;
|
||||
|
|
|
@ -0,0 +1,230 @@
|
|||
//
|
||||
// Fl_Grid object code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 2023 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
|
||||
//
|
||||
|
||||
#include "Fl_Grid_Type.h"
|
||||
|
||||
#include "fluid.h"
|
||||
#include "file.h"
|
||||
#include "code.h"
|
||||
#include "widget_browser.h"
|
||||
#include "undo.h"
|
||||
#include "Fd_Snap_Action.h"
|
||||
#include "custom_widgets.h"
|
||||
|
||||
#include <FL/Fl_Grid.H>
|
||||
#include <FL/Fl_Value_Input.H>
|
||||
#include <FL/Fl_Button.H>
|
||||
#include "../src/flstring.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
// ---- Fl_Grid_Type --------------------------------------------------- MARK: -
|
||||
|
||||
const char grid_type_name[] = "Fl_Grid";
|
||||
|
||||
Fl_Grid_Type Fl_Grid_type; // the "factory"
|
||||
|
||||
Fl_Grid_Type::Fl_Grid_Type() {
|
||||
}
|
||||
|
||||
Fl_Widget *Fl_Grid_Type::widget(int X,int Y,int W,int H) {
|
||||
Fl_Grid *g = new Fl_Grid(X,Y,W,H);
|
||||
g->layout(3, 3);
|
||||
Fl_Group::current(0);
|
||||
return g;
|
||||
}
|
||||
|
||||
void Fl_Grid_Type::copy_properties()
|
||||
{
|
||||
super::copy_properties();
|
||||
Fl_Grid *d = (Fl_Grid*)live_widget, *s =(Fl_Grid*)o;
|
||||
int lm, tm, rm, bm;
|
||||
s->margin(&lm, &tm, &rm, &bm);
|
||||
d->margin(lm, tm, rm, bm);
|
||||
int rg, cg;
|
||||
s->gap(&rg, &cg);
|
||||
d->gap(rg, cg);
|
||||
}
|
||||
|
||||
void Fl_Grid_Type::write_properties(Fd_Project_Writer &f)
|
||||
{
|
||||
super::write_properties(f);
|
||||
Fl_Grid* grid = (Fl_Grid*)o;
|
||||
int lm, tm, rm, bm;
|
||||
grid->margin(&lm, &tm, &rm, &bm);
|
||||
if (lm!=0 || tm!=0 || rm!=0 || bm!=0)
|
||||
f.write_string("margin {%d %d %d %d}", lm, tm, rm, bm);
|
||||
int rg, cg;
|
||||
grid->gap(&rg, &cg);
|
||||
if (rg!=0 || cg!=0)
|
||||
f.write_string("gap {%d %d}", rg, cg);
|
||||
}
|
||||
|
||||
void Fl_Grid_Type::read_property(Fd_Project_Reader &f, const char *c)
|
||||
{
|
||||
Fl_Grid* grid = (Fl_Grid*)o;
|
||||
if (!strcmp(c,"margin")) {
|
||||
int lm, tm, rm, bm;
|
||||
if (sscanf(f.read_word(),"%d %d %d %d", &lm, &tm, &rm, &bm) == 4)
|
||||
grid->margin(lm, tm, rm, bm);
|
||||
} else if (!strcmp(c,"gap")) {
|
||||
int rg, cg;
|
||||
if (sscanf(f.read_word(),"%d %d", &rg, &cg))
|
||||
grid->gap(rg, cg);
|
||||
} else {
|
||||
super::read_property(f, c);
|
||||
}
|
||||
}
|
||||
|
||||
void Fl_Grid_Type::write_code1(Fd_Code_Writer& f) {
|
||||
const char *var = name() ? name() : "o";
|
||||
Fl_Grid* grid = (Fl_Grid*)o;
|
||||
Fl_Widget_Type::write_code1(f);
|
||||
f.write_c("%s%s->layout(%d, %d);\n", f.indent(), var, grid->rows(), grid->cols());
|
||||
int lm, tm, rm, bm;
|
||||
grid->margin(&lm, &tm, &rm, &bm);
|
||||
if (lm!=0 || tm!=0 || rm!=0 || bm!=0)
|
||||
f.write_c("%s%s->margin(%d, %d, %d, %d);\n", f.indent(), var, lm, tm, rm, bm);
|
||||
int rg, cg;
|
||||
grid->gap(&rg, &cg);
|
||||
if (rg!=0 || cg!=0)
|
||||
f.write_c("%s%s->gap(%d, %d);\n", f.indent(), var, rg, cg);
|
||||
}
|
||||
|
||||
void Fl_Grid_Type::write_code2(Fd_Code_Writer& f) {
|
||||
super::write_code2(f);
|
||||
}
|
||||
|
||||
void Fl_Grid_Type::add_child(Fl_Type* a, Fl_Type* b) {
|
||||
super::add_child(a, b);
|
||||
Fl_Grid* grid = (Fl_Grid*)o;
|
||||
grid->need_layout(1);
|
||||
grid->redraw();
|
||||
}
|
||||
|
||||
void Fl_Grid_Type::move_child(Fl_Type* a, Fl_Type* b) {
|
||||
super::move_child(a, b);
|
||||
Fl_Grid* grid = (Fl_Grid*)o;
|
||||
grid->need_layout(1);
|
||||
grid->redraw();
|
||||
}
|
||||
|
||||
void Fl_Grid_Type::remove_child(Fl_Type* a) {
|
||||
super::remove_child(a);
|
||||
Fl_Grid* grid = (Fl_Grid*)o;
|
||||
grid->need_layout(1);
|
||||
grid->redraw();
|
||||
}
|
||||
|
||||
void grid_cb(Fl_Value_Input* i, void* v, int what) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(ID_Grid)) {
|
||||
int v;
|
||||
Fl_Grid *g = ((Fl_Grid*)current_widget->o);
|
||||
switch (what) {
|
||||
case 0: g->margin(&v, NULL, NULL, NULL); break;
|
||||
case 1: g->margin(NULL, &v, NULL, NULL); break;
|
||||
case 2: g->margin(NULL, NULL, &v, NULL); break;
|
||||
case 3: g->margin(NULL, NULL, NULL, &v); break;
|
||||
case 4: g->gap(&v, NULL); break;
|
||||
case 5: g->gap(NULL, &v); break;
|
||||
}
|
||||
i->value(v);
|
||||
}
|
||||
} else {
|
||||
int mod = 0;
|
||||
int v = (int)i->value();
|
||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && o->is_a(ID_Grid)) {
|
||||
Fl_Grid *g = ((Fl_Grid*)(((Fl_Widget_Type*)o)->o));
|
||||
switch (what) {
|
||||
case 0: g->margin(v, -1, -1, -1); break;
|
||||
case 1: g->margin(-1, v, -1, -1); break;
|
||||
case 2: g->margin(-1, -1, v, -1); break;
|
||||
case 3: g->margin(-1, -1, -1, v); break;
|
||||
case 4: g->gap(v, -1); break;
|
||||
case 5: g->gap(-1, v); break;
|
||||
}
|
||||
g->need_layout(true);
|
||||
g->redraw();
|
||||
mod = 1;
|
||||
}
|
||||
}
|
||||
if (mod) set_modflag(1);
|
||||
}
|
||||
}
|
||||
void grid_margin_left_cb(Fl_Value_Input* i, void* v) {
|
||||
grid_cb(i, v, 0);
|
||||
}
|
||||
void grid_margin_top_cb(Fl_Value_Input* i, void* v) {
|
||||
grid_cb(i, v, 1);
|
||||
}
|
||||
void grid_margin_right_cb(Fl_Value_Input* i, void* v) {
|
||||
grid_cb(i, v, 2);
|
||||
}
|
||||
void grid_margin_bottom_cb(Fl_Value_Input* i, void* v) {
|
||||
grid_cb(i, v, 3);
|
||||
}
|
||||
void grid_row_gap_cb(Fl_Value_Input* i, void* v) {
|
||||
grid_cb(i, v, 4);
|
||||
}
|
||||
void grid_col_gap_cb(Fl_Value_Input* i, void* v) {
|
||||
grid_cb(i, v, 5);
|
||||
}
|
||||
|
||||
void grid_cb(Fluid_Coord_Input* i, void* v, int what) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(ID_Grid)) {
|
||||
int v;
|
||||
Fl_Grid *g = ((Fl_Grid*)current_widget->o);
|
||||
switch (what) {
|
||||
case 6: v = g->rows(); break;
|
||||
case 7: v = g->cols(); break;
|
||||
}
|
||||
i->value(v);
|
||||
}
|
||||
} else {
|
||||
int mod = 0;
|
||||
int old_v = 0, v = (int)i->value();
|
||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && o->is_a(ID_Grid)) {
|
||||
Fl_Grid *g = ((Fl_Grid*)(((Fl_Widget_Type*)o)->o));
|
||||
switch (what) {
|
||||
case 6: old_v = g->rows(); break;
|
||||
case 7: old_v = g->cols(); break;
|
||||
}
|
||||
if (old_v != v) {
|
||||
switch (what) {
|
||||
case 6: g->layout(v, g->cols()); break;
|
||||
case 7: g->layout(g->rows(), v); break;
|
||||
}
|
||||
g->need_layout(true);
|
||||
g->redraw();
|
||||
mod = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (mod) set_modflag(1);
|
||||
}
|
||||
}
|
||||
void grid_rows_cb(Fluid_Coord_Input* i, void* v) {
|
||||
grid_cb(i, v, 6);
|
||||
}
|
||||
void grid_cols_cb(Fluid_Coord_Input* i, void* v) {
|
||||
grid_cb(i, v, 7);
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
//
|
||||
// Fl_Grid type header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 2023 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_FL_GRID_TYPE_H
|
||||
#define _FLUID_FL_GRID_TYPE_H
|
||||
|
||||
#include "Fl_Group_Type.h"
|
||||
|
||||
// ---- Fl_Grid_Type --------------------------------------------------- MARK: -
|
||||
|
||||
extern const char grid_type_name[];
|
||||
|
||||
class Fl_Grid_Type : public Fl_Group_Type
|
||||
{
|
||||
typedef Fl_Group_Type super;
|
||||
public:
|
||||
Fl_Grid_Type();
|
||||
const char *type_name() FL_OVERRIDE {return grid_type_name;}
|
||||
const char *alt_type_name() FL_OVERRIDE {return "fltk::GridGroup";}
|
||||
Fl_Widget_Type *_make() FL_OVERRIDE { return new Fl_Grid_Type(); }
|
||||
Fl_Widget *widget(int X,int Y,int W,int H) FL_OVERRIDE;
|
||||
ID id() const FL_OVERRIDE { return ID_Grid; }
|
||||
bool is_a(ID inID) const FL_OVERRIDE { return (inID==ID_Grid) ? true : super::is_a(inID); }
|
||||
void write_properties(Fd_Project_Writer &f) FL_OVERRIDE;
|
||||
void read_property(Fd_Project_Reader &f, const char *) FL_OVERRIDE;
|
||||
void copy_properties() FL_OVERRIDE;
|
||||
void write_code1(Fd_Code_Writer& f) FL_OVERRIDE;
|
||||
void write_code2(Fd_Code_Writer& f) FL_OVERRIDE;
|
||||
void add_child(Fl_Type*, Fl_Type*) FL_OVERRIDE;
|
||||
void move_child(Fl_Type*, Fl_Type*) FL_OVERRIDE;
|
||||
void remove_child(Fl_Type*) FL_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // _FLUID_FL_GRID_TYPE_H
|
|
@ -61,7 +61,7 @@ Fl_Type *Fl_Group_Type::make(Strategy strategy) {
|
|||
\brief Enlarge the group size, so all children fit within.
|
||||
*/
|
||||
void fix_group_size(Fl_Type *tt) {
|
||||
if (!tt || !tt->is_a(Fl_Type::ID_Group)) return;
|
||||
if (!tt || !tt->is_a(ID_Group)) return;
|
||||
Fl_Group_Type* t = (Fl_Group_Type*)tt;
|
||||
int X = t->o->x();
|
||||
int Y = t->o->y();
|
||||
|
@ -83,7 +83,7 @@ void group_cb(Fl_Widget *, void *) {
|
|||
// Find the current widget:
|
||||
Fl_Type *qq = Fl_Type::current;
|
||||
while (qq && !qq->is_true_widget()) qq = qq->parent;
|
||||
if (!qq || qq->level < 1 || (qq->level == 1 && qq->is_a(Fl_Type::ID_Widget_Class))) {
|
||||
if (!qq || qq->level < 1 || (qq->level == 1 && qq->is_a(ID_Widget_Class))) {
|
||||
fl_message("Please select widgets to group");
|
||||
return;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ void ungroup_cb(Fl_Widget *, void *) {
|
|||
Fl_Type *q = Fl_Type::current;
|
||||
while (q && !q->is_true_widget()) q = q->parent;
|
||||
if (q) q = q->parent;
|
||||
if (!q || q->level < 1 || (q->level == 1 && q->is_a(Fl_Type::ID_Widget_Class))) {
|
||||
if (!q || q->level < 1 || (q->level == 1 && q->is_a(ID_Widget_Class))) {
|
||||
fl_message("Please select widgets in a group");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -293,11 +293,11 @@ void Fl_Menu_Item_Type::write_static(Fd_Code_Writer& f) {
|
|||
Fl_Type* t = parent; while (t->is_a(ID_Menu_Item)) t = t->parent;
|
||||
Fl_Type *q = 0;
|
||||
// Go up one more level for Fl_Input_Choice, as these are groups themselves
|
||||
if (t && t->is_a(Fl_Type::ID_Input_Choice))
|
||||
if (t && t->is_a(ID_Input_Choice))
|
||||
f.write_c("->parent()");
|
||||
for (t = t->parent; t && t->is_widget() && !is_class(); q = t, t = t->parent)
|
||||
f.write_c("->parent()");
|
||||
if (!q || !q->is_a(Fl_Type::ID_Widget_Class))
|
||||
if (!q || !q->is_a(ID_Widget_Class))
|
||||
f.write_c("->user_data()");
|
||||
f.write_c("))->%s_i(o,v);\n}\n", cn);
|
||||
}
|
||||
|
@ -697,11 +697,11 @@ void shortcut_in_cb(Fl_Shortcut_Button* i, void* v) {
|
|||
if (v == LOAD) {
|
||||
if (current_widget->is_button())
|
||||
i->value( ((Fl_Button*)(current_widget->o))->shortcut() );
|
||||
else if (current_widget->is_a(Fl_Type::ID_Input))
|
||||
else if (current_widget->is_a(ID_Input))
|
||||
i->value( ((Fl_Input_*)(current_widget->o))->shortcut() );
|
||||
else if (current_widget->is_a(Fl_Type::ID_Value_Input))
|
||||
else if (current_widget->is_a(ID_Value_Input))
|
||||
i->value( ((Fl_Value_Input*)(current_widget->o))->shortcut() );
|
||||
else if (current_widget->is_a(Fl_Type::ID_Text_Display))
|
||||
else if (current_widget->is_a(ID_Text_Display))
|
||||
i->value( ((Fl_Text_Display*)(current_widget->o))->shortcut() );
|
||||
else {
|
||||
i->hide();
|
||||
|
@ -719,16 +719,16 @@ void shortcut_in_cb(Fl_Shortcut_Button* i, void* v) {
|
|||
Fl_Button* b = (Fl_Button*)(((Fl_Widget_Type*)o)->o);
|
||||
if (b->shortcut() != (int)i->value()) mod = 1;
|
||||
b->shortcut(i->value());
|
||||
if (o->is_a(Fl_Type::ID_Menu_Item)) ((Fl_Widget_Type*)o)->redraw();
|
||||
} else if (o->selected && o->is_a(Fl_Type::ID_Input)) {
|
||||
if (o->is_a(ID_Menu_Item)) ((Fl_Widget_Type*)o)->redraw();
|
||||
} else if (o->selected && o->is_a(ID_Input)) {
|
||||
Fl_Input_* b = (Fl_Input_*)(((Fl_Widget_Type*)o)->o);
|
||||
if (b->shortcut() != (int)i->value()) mod = 1;
|
||||
b->shortcut(i->value());
|
||||
} else if (o->selected && o->is_a(Fl_Type::ID_Value_Input)) {
|
||||
} else if (o->selected && o->is_a(ID_Value_Input)) {
|
||||
Fl_Value_Input* b = (Fl_Value_Input*)(((Fl_Widget_Type*)o)->o);
|
||||
if (b->shortcut() != (int)i->value()) mod = 1;
|
||||
b->shortcut(i->value());
|
||||
} else if (o->selected && o->is_a(Fl_Type::ID_Text_Display)) {
|
||||
} else if (o->selected && o->is_a(ID_Text_Display)) {
|
||||
Fl_Text_Display* b = (Fl_Text_Display*)(((Fl_Widget_Type*)o)->o);
|
||||
if (b->shortcut() != (int)i->value()) mod = 1;
|
||||
b->shortcut(i->value());
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
+-+ Fl_Group_Type
|
||||
| +-- Fl_Pack_Type
|
||||
| +-- Fl_Flex_Type
|
||||
| +-- Fl_Grid_Type
|
||||
| +-- Fl_Table_Type
|
||||
| +-- Fl_Tabs_Type
|
||||
| +-- Fl_Scroll_Type
|
||||
|
@ -441,7 +442,7 @@ Fl_Group_Type *Fl_Type::group() {
|
|||
if (!is_widget())
|
||||
return NULL;
|
||||
for (Fl_Type *t = this; t; t=t->parent)
|
||||
if (t->is_a(Fl_Type::ID_Group))
|
||||
if (t->is_a(ID_Group))
|
||||
return (Fl_Group_Type*)t;
|
||||
return NULL;
|
||||
}
|
||||
|
@ -603,7 +604,7 @@ Fl_Type *Fl_Type::remove() {
|
|||
}
|
||||
|
||||
void Fl_Type::name(const char *n) {
|
||||
int nostrip = is_a(Fl_Type::ID_Comment);
|
||||
int nostrip = is_a(ID_Comment);
|
||||
if (storestring(n,name_,nostrip)) {
|
||||
if (visible) widget_browser->redraw();
|
||||
}
|
||||
|
@ -861,7 +862,7 @@ void Fl_Type::copy_properties() {
|
|||
*/
|
||||
int Fl_Type::user_defined(const char* cbname) const {
|
||||
for (Fl_Type* p = Fl_Type::first; p ; p = p->next)
|
||||
if (p->is_a(Fl_Type::ID_Function) && p->name() != 0)
|
||||
if (p->is_a(ID_Function) && p->name() != 0)
|
||||
if (strncmp(p->name(), cbname, strlen(cbname)) == 0)
|
||||
if (p->name()[strlen(cbname)] == '(')
|
||||
return 1;
|
||||
|
|
|
@ -34,6 +34,39 @@ typedef enum {
|
|||
kAddAfterCurrent
|
||||
} Strategy;
|
||||
|
||||
enum ID {
|
||||
// administrative
|
||||
ID_Base_, ID_Widget_, ID_Menu_Manager_, ID_Menu_, ID_Browser_, ID_Valuator_,
|
||||
// non-widget
|
||||
ID_Function, ID_Code, ID_CodeBlock,
|
||||
ID_Decl, ID_DeclBlock, ID_Class,
|
||||
ID_Widget_Class, ID_Comment, ID_Data,
|
||||
// groups
|
||||
ID_Window, ID_Group, ID_Pack,
|
||||
ID_Flex, ID_Tabs, ID_Scroll,
|
||||
ID_Tile, ID_Wizard, ID_Grid,
|
||||
// buttons
|
||||
ID_Button, ID_Return_Button, ID_Light_Button,
|
||||
ID_Check_Button, ID_Repeat_Button, ID_Round_Button,
|
||||
// valuators
|
||||
ID_Slider, ID_Scrollbar, ID_Value_Slider,
|
||||
ID_Adjuster, ID_Counter, ID_Spinner,
|
||||
ID_Dial, ID_Roller, ID_Value_Input, ID_Value_Output,
|
||||
// text
|
||||
ID_Input, ID_Output, ID_Text_Editor,
|
||||
ID_Text_Display, ID_File_Input, ID_Simple_Terminal,
|
||||
// menus
|
||||
ID_Menu_Bar, ID_Menu_Button, ID_Choice,
|
||||
ID_Input_Choice, ID_Submenu, ID_Menu_Item,
|
||||
ID_Checkbox_Menu_Item, ID_Radio_Menu_Item,
|
||||
// browsers
|
||||
ID_Browser, ID_Check_Browser, ID_File_Browser,
|
||||
ID_Tree, ID_Help_View, ID_Table,
|
||||
// misc
|
||||
ID_Box, ID_Clock, ID_Progress,
|
||||
ID_Max_
|
||||
};
|
||||
|
||||
void update_visibility_flag(Fl_Type *p);
|
||||
void delete_all(int selected_only=0);
|
||||
int storestring(const char *n, const char * & p, int nostrip=0);
|
||||
|
@ -119,39 +152,6 @@ protected:
|
|||
|
||||
public:
|
||||
|
||||
enum ID {
|
||||
// administrative
|
||||
ID_Base_, ID_Widget_, ID_Menu_Manager_, ID_Menu_, ID_Browser_, ID_Valuator_,
|
||||
// non-widget
|
||||
ID_Function, ID_Code, ID_CodeBlock,
|
||||
ID_Decl, ID_DeclBlock, ID_Class,
|
||||
ID_Widget_Class, ID_Comment, ID_Data,
|
||||
// groups
|
||||
ID_Window, ID_Group, ID_Pack,
|
||||
ID_Flex, ID_Tabs, ID_Scroll,
|
||||
ID_Tile, ID_Wizard,
|
||||
// buttons
|
||||
ID_Button, ID_Return_Button, ID_Light_Button,
|
||||
ID_Check_Button, ID_Repeat_Button, ID_Round_Button,
|
||||
// valuators
|
||||
ID_Slider, ID_Scrollbar, ID_Value_Slider,
|
||||
ID_Adjuster, ID_Counter, ID_Spinner,
|
||||
ID_Dial, ID_Roller, ID_Value_Input, ID_Value_Output,
|
||||
// text
|
||||
ID_Input, ID_Output, ID_Text_Editor,
|
||||
ID_Text_Display, ID_File_Input, ID_Simple_Terminal,
|
||||
// menus
|
||||
ID_Menu_Bar, ID_Menu_Button, ID_Choice,
|
||||
ID_Input_Choice, ID_Submenu, ID_Menu_Item,
|
||||
ID_Checkbox_Menu_Item, ID_Radio_Menu_Item,
|
||||
// browsers
|
||||
ID_Browser, ID_Check_Browser, ID_File_Browser,
|
||||
ID_Tree, ID_Help_View, ID_Table,
|
||||
// misc
|
||||
ID_Box, ID_Clock, ID_Progress,
|
||||
ID_Max_
|
||||
};
|
||||
|
||||
virtual ~Fl_Type();
|
||||
virtual Fl_Type *make(Strategy strategy) = 0;
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ const char* subclassname(Fl_Type* l) {
|
|||
if (c) return c;
|
||||
if (l->is_class()) return "Fl_Group";
|
||||
if (p->o->type() == FL_WINDOW+1) return "Fl_Double_Window";
|
||||
if (p->id() == Fl_Type::ID_Input) {
|
||||
if (p->id() == ID_Input) {
|
||||
if (p->o->type() == FL_FLOAT_INPUT) return "Fl_Float_Input";
|
||||
if (p->o->type() == FL_INT_INPUT) return "Fl_Int_Input";
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ Fl_Type *Fl_Widget_Type::make(Strategy strategy) {
|
|||
Fl_Widget_Type* q = (Fl_Widget_Type*)qq;
|
||||
// find the parent widget:
|
||||
Fl_Widget_Type* p = q;
|
||||
if ((force_parent || !p->is_a(Fl_Type::ID_Group)) && p->parent && p->parent->is_widget())
|
||||
if ((force_parent || !p->is_a(ID_Group)) && p->parent && p->parent->is_widget())
|
||||
p = (Fl_Widget_Type*)(p->parent);
|
||||
force_parent = 0;
|
||||
|
||||
|
@ -107,7 +107,7 @@ Fl_Type *Fl_Widget_Type::make(Strategy strategy) {
|
|||
|
||||
// Figure out a position and size for the widget
|
||||
int X,Y,W,H;
|
||||
if (is_a(Fl_Type::ID_Group)) { // fill the parent with the widget
|
||||
if (is_a(ID_Group)) { // fill the parent with the widget
|
||||
X = ULX+B;
|
||||
W = p->o->w()-B;
|
||||
Y = ULY+B;
|
||||
|
@ -416,7 +416,7 @@ static Fl_Input *image_input;
|
|||
void image_cb(Fl_Input* i, void *v) {
|
||||
if (v == LOAD) {
|
||||
image_input = i;
|
||||
if (current_widget->is_widget() && !current_widget->is_a(Fl_Type::ID_Window)) {
|
||||
if (current_widget->is_widget() && !current_widget->is_a(ID_Window)) {
|
||||
i->activate();
|
||||
i->value(((Fl_Widget_Type*)current_widget)->image_name());
|
||||
} else i->deactivate();
|
||||
|
@ -434,7 +434,7 @@ void image_cb(Fl_Input* i, void *v) {
|
|||
|
||||
void image_browse_cb(Fl_Button* b, void *v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_widget() && !current_widget->is_a(Fl_Type::ID_Window))
|
||||
if (current_widget->is_widget() && !current_widget->is_a(ID_Window))
|
||||
b->activate();
|
||||
else
|
||||
b->deactivate();
|
||||
|
@ -455,7 +455,7 @@ void image_browse_cb(Fl_Button* b, void *v) {
|
|||
|
||||
void bind_image_cb(Fl_Button* b, void *v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_widget() && !current_widget->is_a(Fl_Type::ID_Window)) {
|
||||
if (current_widget->is_widget() && !current_widget->is_a(ID_Window)) {
|
||||
b->activate();
|
||||
b->value(current_widget->bind_image_);
|
||||
} else {
|
||||
|
@ -475,7 +475,7 @@ void bind_image_cb(Fl_Button* b, void *v) {
|
|||
|
||||
void compress_image_cb(Fl_Button* b, void *v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_widget() && !current_widget->is_a(Fl_Type::ID_Window)) {
|
||||
if (current_widget->is_widget() && !current_widget->is_a(ID_Window)) {
|
||||
b->activate();
|
||||
b->value(current_widget->compress_image_);
|
||||
} else {
|
||||
|
@ -498,7 +498,7 @@ static Fl_Input *inactive_input;
|
|||
void inactive_cb(Fl_Input* i, void *v) {
|
||||
if (v == LOAD) {
|
||||
inactive_input = i;
|
||||
if (current_widget->is_widget() && !current_widget->is_a(Fl_Type::ID_Window)) {
|
||||
if (current_widget->is_widget() && !current_widget->is_a(ID_Window)) {
|
||||
i->activate();
|
||||
i->value(((Fl_Widget_Type*)current_widget)->inactive_name());
|
||||
} else i->deactivate();
|
||||
|
@ -516,7 +516,7 @@ void inactive_cb(Fl_Input* i, void *v) {
|
|||
|
||||
void inactive_browse_cb(Fl_Button* b, void *v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_widget() && !current_widget->is_a(Fl_Type::ID_Window))
|
||||
if (current_widget->is_widget() && !current_widget->is_a(ID_Window))
|
||||
b->activate();
|
||||
else
|
||||
b->deactivate();
|
||||
|
@ -537,7 +537,7 @@ void inactive_browse_cb(Fl_Button* b, void *v) {
|
|||
|
||||
void bind_deimage_cb(Fl_Button* b, void *v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_widget() && !current_widget->is_a(Fl_Type::ID_Window)) {
|
||||
if (current_widget->is_widget() && !current_widget->is_a(ID_Window)) {
|
||||
b->activate();
|
||||
b->value(current_widget->bind_deimage_);
|
||||
} else {
|
||||
|
@ -557,7 +557,7 @@ void bind_deimage_cb(Fl_Button* b, void *v) {
|
|||
|
||||
void compress_deimage_cb(Fl_Button* b, void *v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_widget() && !current_widget->is_a(Fl_Type::ID_Window)) {
|
||||
if (current_widget->is_widget() && !current_widget->is_a(ID_Window)) {
|
||||
b->activate();
|
||||
b->value(current_widget->compress_deimage_);
|
||||
} else {
|
||||
|
@ -873,7 +873,7 @@ void h_cb(Fluid_Coord_Input *i, void *v) {
|
|||
|
||||
void wc_relative_cb(Fl_Choice *i, void *v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Widget_Class)) {
|
||||
if (current_widget->is_a(ID_Widget_Class)) {
|
||||
i->show();
|
||||
i->value(((Fl_Widget_Class_Type *)current_widget)->wc_relative);
|
||||
} else {
|
||||
|
@ -883,7 +883,7 @@ void wc_relative_cb(Fl_Choice *i, void *v) {
|
|||
int mod = 0;
|
||||
undo_checkpoint();
|
||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && current_widget->is_a(Fl_Type::ID_Widget_Class)) {
|
||||
if (o->selected && current_widget->is_a(ID_Widget_Class)) {
|
||||
Fl_Widget_Class_Type *t = (Fl_Widget_Class_Type *)o;
|
||||
t->wc_relative = i->value();
|
||||
mod = 1;
|
||||
|
@ -1017,7 +1017,7 @@ int boxnumber(const char *i) {
|
|||
|
||||
void box_cb(Fl_Choice* i, void *v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
if (current_widget->is_a(ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
int n = current_widget->o->box(); if (!n) n = ZERO_ENTRY;
|
||||
for (int j = 0; j < int(sizeof(boxmenu)/sizeof(*boxmenu)); j++)
|
||||
if (boxmenu[j].argument() == n) {i->value(j); break;}
|
||||
|
@ -1042,11 +1042,11 @@ void box_cb(Fl_Choice* i, void *v) {
|
|||
void down_box_cb(Fl_Choice* i, void *v) {
|
||||
if (v == LOAD) {
|
||||
int n;
|
||||
if (current_widget->is_a(Fl_Type::ID_Button))
|
||||
if (current_widget->is_a(ID_Button))
|
||||
n = ((Fl_Button*)(current_widget->o))->down_box();
|
||||
else if (current_widget->is_a(Fl_Type::ID_Input_Choice))
|
||||
else if (current_widget->is_a(ID_Input_Choice))
|
||||
n = ((Fl_Input_Choice*)(current_widget->o))->down_box();
|
||||
else if (current_widget->is_a(Fl_Type::ID_Menu_Manager_))
|
||||
else if (current_widget->is_a(ID_Menu_Manager_))
|
||||
n = ((Fl_Menu_*)(current_widget->o))->down_box();
|
||||
else {
|
||||
i->deactivate(); return;
|
||||
|
@ -1063,14 +1063,14 @@ void down_box_cb(Fl_Choice* i, void *v) {
|
|||
if (n == ZERO_ENTRY) n = 0;
|
||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected) {
|
||||
if (o->is_a(Fl_Type::ID_Button)) {
|
||||
if (o->is_a(ID_Button)) {
|
||||
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
|
||||
((Fl_Button*)(q->o))->down_box((Fl_Boxtype)n);
|
||||
if (((Fl_Button*)(q->o))->value()) q->redraw();
|
||||
} else if (o->is_a(Fl_Type::ID_Input_Choice)) {
|
||||
} else if (o->is_a(ID_Input_Choice)) {
|
||||
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
|
||||
((Fl_Input_Choice*)(q->o))->down_box((Fl_Boxtype)n);
|
||||
} else if (o->is_a(Fl_Type::ID_Menu_Manager_)) {
|
||||
} else if (o->is_a(ID_Menu_Manager_)) {
|
||||
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
|
||||
((Fl_Menu_*)(q->o))->down_box((Fl_Boxtype)n);
|
||||
}
|
||||
|
@ -1084,7 +1084,7 @@ void down_box_cb(Fl_Choice* i, void *v) {
|
|||
void compact_cb(Fl_Light_Button* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
uchar n;
|
||||
if (current_widget->is_a(Fl_Type::ID_Button) && !current_widget->is_a(Fl_Type::ID_Menu_Item)) {
|
||||
if (current_widget->is_a(ID_Button) && !current_widget->is_a(ID_Menu_Item)) {
|
||||
n = ((Fl_Button*)(current_widget->o))->compact();
|
||||
i->value(n);
|
||||
i->show();
|
||||
|
@ -1095,7 +1095,7 @@ void compact_cb(Fl_Light_Button* i, void* v) {
|
|||
int mod = 0;
|
||||
uchar n = (uchar)i->value();
|
||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && o->is_a(Fl_Type::ID_Button) && !o->is_a(Fl_Type::ID_Menu_Item)) {
|
||||
if (o->selected && o->is_a(ID_Button) && !o->is_a(ID_Menu_Item)) {
|
||||
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
|
||||
uchar v = ((Fl_Button*)(q->o))->compact();
|
||||
if (n != v) {
|
||||
|
@ -1175,7 +1175,7 @@ void set_whenmenu(int n) {
|
|||
|
||||
void when_cb(Fl_Menu_Button* i, void *v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
if (current_widget->is_a(ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
int n = current_widget->o->when();
|
||||
set_whenmenu(n);
|
||||
w_when_box->copy_label(when_symbol_name(n));
|
||||
|
@ -1232,7 +1232,7 @@ void Fl_Widget_Type::resizable(uchar v) {
|
|||
|
||||
void resizable_cb(Fl_Light_Button* i,void* v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Menu_Item)) {i->deactivate(); return;}
|
||||
if (current_widget->is_a(ID_Menu_Item)) {i->deactivate(); return;}
|
||||
if (numselected > 1) {i->deactivate(); return;}
|
||||
i->activate();
|
||||
i->value(current_widget->resizable());
|
||||
|
@ -1246,21 +1246,21 @@ void resizable_cb(Fl_Light_Button* i,void* v) {
|
|||
void hotspot_cb(Fl_Light_Button* i,void* v) {
|
||||
if (v == LOAD) {
|
||||
if (numselected > 1) {i->deactivate(); return;}
|
||||
if (current_widget->is_a(Fl_Type::ID_Menu_Item)) i->label("divider");
|
||||
if (current_widget->is_a(ID_Menu_Item)) i->label("divider");
|
||||
else i->label("hotspot");
|
||||
i->activate();
|
||||
i->value(current_widget->hotspot());
|
||||
} else {
|
||||
undo_checkpoint();
|
||||
current_widget->hotspot(i->value());
|
||||
if (current_widget->is_a(Fl_Type::ID_Menu_Item)) {
|
||||
if (current_widget->is_a(ID_Menu_Item)) {
|
||||
current_widget->redraw();
|
||||
return;
|
||||
}
|
||||
if (i->value()) {
|
||||
Fl_Type *p = current_widget->parent;
|
||||
if (!p || !p->is_widget()) return;
|
||||
while (!p->is_a(Fl_Type::ID_Window)) p = p->parent;
|
||||
while (!p->is_a(ID_Window)) p = p->parent;
|
||||
for (Fl_Type *o = p->next; o && o->level > p->level; o = o->next) {
|
||||
if (o->is_widget() && o != current_widget)
|
||||
((Fl_Widget_Type*)o)->hotspot(0);
|
||||
|
@ -1273,7 +1273,7 @@ void hotspot_cb(Fl_Light_Button* i,void* v) {
|
|||
void visible_cb(Fl_Light_Button* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
i->value(current_widget->o->visible());
|
||||
if (current_widget->is_a(Fl_Type::ID_Window)) i->deactivate();
|
||||
if (current_widget->is_a(ID_Window)) i->deactivate();
|
||||
else i->activate();
|
||||
} else {
|
||||
int mod = 0;
|
||||
|
@ -1288,9 +1288,9 @@ void visible_cb(Fl_Light_Button* i, void* v) {
|
|||
n ? q->o->show() : q->o->hide();
|
||||
q->redraw();
|
||||
if (n && q->parent && q->parent->type_name()) {
|
||||
if (q->parent->is_a(Fl_Type::ID_Tabs)) {
|
||||
if (q->parent->is_a(ID_Tabs)) {
|
||||
((Fl_Tabs *)q->o->parent())->value(q->o);
|
||||
} else if (q->parent->is_a(Fl_Type::ID_Wizard)) {
|
||||
} else if (q->parent->is_a(ID_Wizard)) {
|
||||
((Fl_Wizard *)q->o->parent())->value(q->o);
|
||||
}
|
||||
}
|
||||
|
@ -1306,7 +1306,7 @@ void visible_cb(Fl_Light_Button* i, void* v) {
|
|||
void active_cb(Fl_Light_Button* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
i->value(current_widget->o->active());
|
||||
if (current_widget->is_a(Fl_Type::ID_Window)) i->deactivate();
|
||||
if (current_widget->is_a(ID_Window)) i->deactivate();
|
||||
else i->activate();
|
||||
} else {
|
||||
int mod = 0;
|
||||
|
@ -1472,7 +1472,7 @@ void color_common(Fl_Color c) {
|
|||
if (o->selected && o->is_widget()) {
|
||||
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
|
||||
q->o->color(c); q->o->redraw();
|
||||
if (q->parent && q->parent->is_a(Fl_Type::ID_Tabs)) {
|
||||
if (q->parent && q->parent->is_a(ID_Tabs)) {
|
||||
if (q->o->parent()) q->o->parent()->redraw();
|
||||
}
|
||||
mod = 1;
|
||||
|
@ -1484,7 +1484,7 @@ void color_common(Fl_Color c) {
|
|||
void color_cb(Fl_Button* i, void *v) {
|
||||
Fl_Color c = current_widget->o->color();
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
if (current_widget->is_a(ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
} else {
|
||||
Fl_Color d = fl_show_colormap(c);
|
||||
if (d == c) return;
|
||||
|
@ -1497,7 +1497,7 @@ void color_cb(Fl_Button* i, void *v) {
|
|||
void color_menu_cb(Fl_Menu_Button* i, void *v) {
|
||||
Fl_Color c = current_widget->o->color();
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
if (current_widget->is_a(ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
} else {
|
||||
Fl_Color d = (Fl_Color)(i->mvalue()->argument());
|
||||
if (d == c) return;
|
||||
|
@ -1522,7 +1522,7 @@ void color2_common(Fl_Color c) {
|
|||
void color2_cb(Fl_Button* i, void *v) {
|
||||
Fl_Color c = current_widget->o->selection_color();
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
if (current_widget->is_a(ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
} else {
|
||||
Fl_Color d = fl_show_colormap(c);
|
||||
if (d == c) return;
|
||||
|
@ -1535,7 +1535,7 @@ void color2_cb(Fl_Button* i, void *v) {
|
|||
void color2_menu_cb(Fl_Menu_Button* i, void *v) {
|
||||
Fl_Color c = current_widget->o->selection_color();
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
if (current_widget->is_a(ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
} else {
|
||||
Fl_Color d = (Fl_Color)(i->mvalue()->argument());
|
||||
if (d == c) return;
|
||||
|
@ -1607,7 +1607,7 @@ static Fl_Menu_Item alignmenu[] = {
|
|||
void align_cb(Fl_Button* i, void *v) {
|
||||
Fl_Align b = Fl_Align(fl_uintptr_t(i->user_data()));
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
if (current_widget->is_a(ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
i->value(current_widget->o->align() & b);
|
||||
} else {
|
||||
int mod = 0;
|
||||
|
@ -1645,7 +1645,7 @@ void align_cb(Fl_Button* i, void *v) {
|
|||
|
||||
void align_position_cb(Fl_Choice *i, void *v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
if (current_widget->is_a(ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
Fl_Menu_Item *mi = (Fl_Menu_Item*)i->menu();
|
||||
Fl_Align b = current_widget->o->align() & FL_ALIGN_POSITION_MASK;
|
||||
for (;mi->text;mi++) {
|
||||
|
@ -1675,7 +1675,7 @@ void align_position_cb(Fl_Choice *i, void *v) {
|
|||
|
||||
void align_text_image_cb(Fl_Choice *i, void *v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
if (current_widget->is_a(ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
Fl_Menu_Item *mi = (Fl_Menu_Item*)i->menu();
|
||||
Fl_Align b = current_widget->o->align() & FL_ALIGN_IMAGE_MASK;
|
||||
for (;mi->text;mi++) {
|
||||
|
@ -1816,7 +1816,7 @@ void v_input_cb(Fl_Input* i, void* v) {
|
|||
|
||||
void subclass_cb(Fl_Input* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
if (current_widget->is_a(ID_Menu_Item)) {i->deactivate(); return;} else i->activate();
|
||||
i->value(current_widget->subclass());
|
||||
} else {
|
||||
int mod = 0;
|
||||
|
@ -1941,14 +1941,14 @@ void textcolor_menu_cb(Fl_Menu_Button* i, void* v) {
|
|||
|
||||
void min_w_cb(Fl_Value_Input* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (!current_widget->is_a(Fl_Type::ID_Window)) return;
|
||||
if (!current_widget->is_a(ID_Window)) return;
|
||||
i->value(((Fl_Window_Type*)current_widget)->sr_min_w);
|
||||
} else {
|
||||
int mod = 0;
|
||||
undo_checkpoint();
|
||||
int n = (int)i->value();
|
||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && o->is_a(Fl_Type::ID_Window)) {
|
||||
if (o->selected && o->is_a(ID_Window)) {
|
||||
((Fl_Window_Type*)current_widget)->sr_min_w = n;
|
||||
mod = 1;
|
||||
}
|
||||
|
@ -1959,14 +1959,14 @@ void min_w_cb(Fl_Value_Input* i, void* v) {
|
|||
|
||||
void min_h_cb(Fl_Value_Input* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (!current_widget->is_a(Fl_Type::ID_Window)) return;
|
||||
if (!current_widget->is_a(ID_Window)) return;
|
||||
i->value(((Fl_Window_Type*)current_widget)->sr_min_h);
|
||||
} else {
|
||||
int mod = 0;
|
||||
undo_checkpoint();
|
||||
int n = (int)i->value();
|
||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && o->is_a(Fl_Type::ID_Window)) {
|
||||
if (o->selected && o->is_a(ID_Window)) {
|
||||
((Fl_Window_Type*)current_widget)->sr_min_h = n;
|
||||
mod = 1;
|
||||
}
|
||||
|
@ -1977,14 +1977,14 @@ void min_h_cb(Fl_Value_Input* i, void* v) {
|
|||
|
||||
void max_w_cb(Fl_Value_Input* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (!current_widget->is_a(Fl_Type::ID_Window)) return;
|
||||
if (!current_widget->is_a(ID_Window)) return;
|
||||
i->value(((Fl_Window_Type*)current_widget)->sr_max_w);
|
||||
} else {
|
||||
int mod = 0;
|
||||
undo_checkpoint();
|
||||
int n = (int)i->value();
|
||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && o->is_a(Fl_Type::ID_Window)) {
|
||||
if (o->selected && o->is_a(ID_Window)) {
|
||||
((Fl_Window_Type*)current_widget)->sr_max_w = n;
|
||||
mod = 1;
|
||||
}
|
||||
|
@ -1995,14 +1995,14 @@ void max_w_cb(Fl_Value_Input* i, void* v) {
|
|||
|
||||
void max_h_cb(Fl_Value_Input* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (!current_widget->is_a(Fl_Type::ID_Window)) return;
|
||||
if (!current_widget->is_a(ID_Window)) return;
|
||||
i->value(((Fl_Window_Type*)current_widget)->sr_max_h);
|
||||
} else {
|
||||
int mod = 0;
|
||||
undo_checkpoint();
|
||||
int n = (int)i->value();
|
||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && o->is_a(Fl_Type::ID_Window)) {
|
||||
if (o->selected && o->is_a(ID_Window)) {
|
||||
((Fl_Window_Type*)current_widget)->sr_max_h = n;
|
||||
mod = 1;
|
||||
}
|
||||
|
@ -2017,7 +2017,7 @@ void set_min_size_cb(Fl_Button*, void* v) {
|
|||
int mod = 0;
|
||||
undo_checkpoint();
|
||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && o->is_a(Fl_Type::ID_Window)) {
|
||||
if (o->selected && o->is_a(ID_Window)) {
|
||||
Fl_Window_Type *win = (Fl_Window_Type*)current_widget;
|
||||
win->sr_min_w = win->o->w();
|
||||
win->sr_min_h = win->o->h();
|
||||
|
@ -2035,7 +2035,7 @@ void set_max_size_cb(Fl_Button*, void* v) {
|
|||
int mod = 0;
|
||||
undo_checkpoint();
|
||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && o->is_a(Fl_Type::ID_Window)) {
|
||||
if (o->selected && o->is_a(ID_Window)) {
|
||||
Fl_Window_Type *win = (Fl_Window_Type*)current_widget;
|
||||
win->sr_max_w = win->o->w();
|
||||
win->sr_max_h = win->o->h();
|
||||
|
@ -2049,7 +2049,7 @@ void set_max_size_cb(Fl_Button*, void* v) {
|
|||
|
||||
void slider_size_cb(Fl_Value_Input* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (!current_widget->is_a(Fl_Type::ID_Slider)) {i->deactivate(); return;}
|
||||
if (!current_widget->is_a(ID_Slider)) {i->deactivate(); return;}
|
||||
i->activate();
|
||||
i->value(((Fl_Slider*)(current_widget->o))->slider_size());
|
||||
} else {
|
||||
|
@ -2059,7 +2059,7 @@ void slider_size_cb(Fl_Value_Input* i, void* v) {
|
|||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && o->is_widget()) {
|
||||
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
|
||||
if (q->is_a(Fl_Type::ID_Slider)) {
|
||||
if (q->is_a(ID_Slider)) {
|
||||
((Fl_Slider*)(q->o))->slider_size(n);
|
||||
q->o->redraw();
|
||||
mod = 1;
|
||||
|
@ -2072,10 +2072,10 @@ void slider_size_cb(Fl_Value_Input* i, void* v) {
|
|||
|
||||
void min_cb(Fl_Value_Input* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Valuator_)) {
|
||||
if (current_widget->is_a(ID_Valuator_)) {
|
||||
i->activate();
|
||||
i->value(((Fl_Valuator*)(current_widget->o))->minimum());
|
||||
} else if (current_widget->is_a(Fl_Type::ID_Spinner)) {
|
||||
} else if (current_widget->is_a(ID_Spinner)) {
|
||||
i->activate();
|
||||
i->value(((Fl_Spinner*)(current_widget->o))->minimum());
|
||||
} else {
|
||||
|
@ -2089,11 +2089,11 @@ void min_cb(Fl_Value_Input* i, void* v) {
|
|||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && o->is_widget()) {
|
||||
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
|
||||
if (q->is_a(Fl_Type::ID_Valuator_)) {
|
||||
if (q->is_a(ID_Valuator_)) {
|
||||
((Fl_Valuator*)(q->o))->minimum(n);
|
||||
q->o->redraw();
|
||||
mod = 1;
|
||||
} else if (q->is_a(Fl_Type::ID_Spinner)) {
|
||||
} else if (q->is_a(ID_Spinner)) {
|
||||
((Fl_Spinner*)(q->o))->minimum(n);
|
||||
q->o->redraw();
|
||||
mod = 1;
|
||||
|
@ -2106,10 +2106,10 @@ void min_cb(Fl_Value_Input* i, void* v) {
|
|||
|
||||
void max_cb(Fl_Value_Input* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Valuator_)) {
|
||||
if (current_widget->is_a(ID_Valuator_)) {
|
||||
i->activate();
|
||||
i->value(((Fl_Valuator*)(current_widget->o))->maximum());
|
||||
} else if (current_widget->is_a(Fl_Type::ID_Spinner)) {
|
||||
} else if (current_widget->is_a(ID_Spinner)) {
|
||||
i->activate();
|
||||
i->value(((Fl_Spinner*)(current_widget->o))->maximum());
|
||||
} else {
|
||||
|
@ -2123,11 +2123,11 @@ void max_cb(Fl_Value_Input* i, void* v) {
|
|||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && o->is_widget()) {
|
||||
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
|
||||
if (q->is_a(Fl_Type::ID_Valuator_)) {
|
||||
if (q->is_a(ID_Valuator_)) {
|
||||
((Fl_Valuator*)(q->o))->maximum(n);
|
||||
q->o->redraw();
|
||||
mod = 1;
|
||||
} else if (q->is_a(Fl_Type::ID_Spinner)) {
|
||||
} else if (q->is_a(ID_Spinner)) {
|
||||
((Fl_Spinner*)(q->o))->maximum(n);
|
||||
q->o->redraw();
|
||||
mod = 1;
|
||||
|
@ -2140,10 +2140,10 @@ void max_cb(Fl_Value_Input* i, void* v) {
|
|||
|
||||
void step_cb(Fl_Value_Input* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Valuator_)) {
|
||||
if (current_widget->is_a(ID_Valuator_)) {
|
||||
i->activate();
|
||||
i->value(((Fl_Valuator*)(current_widget->o))->step());
|
||||
} else if (current_widget->is_a(Fl_Type::ID_Spinner)) {
|
||||
} else if (current_widget->is_a(ID_Spinner)) {
|
||||
i->activate();
|
||||
i->value(((Fl_Spinner*)(current_widget->o))->step());
|
||||
} else {
|
||||
|
@ -2157,11 +2157,11 @@ void step_cb(Fl_Value_Input* i, void* v) {
|
|||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && o->is_widget()) {
|
||||
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
|
||||
if (q->is_a(Fl_Type::ID_Valuator_)) {
|
||||
if (q->is_a(ID_Valuator_)) {
|
||||
((Fl_Valuator*)(q->o))->step(n);
|
||||
q->o->redraw();
|
||||
mod = 1;
|
||||
} else if (q->is_a(Fl_Type::ID_Spinner)) {
|
||||
} else if (q->is_a(ID_Spinner)) {
|
||||
((Fl_Spinner*)(q->o))->step(n);
|
||||
q->o->redraw();
|
||||
mod = 1;
|
||||
|
@ -2174,13 +2174,13 @@ void step_cb(Fl_Value_Input* i, void* v) {
|
|||
|
||||
void value_cb(Fl_Value_Input* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Valuator_)) {
|
||||
if (current_widget->is_a(ID_Valuator_)) {
|
||||
i->activate();
|
||||
i->value(((Fl_Valuator*)(current_widget->o))->value());
|
||||
} else if (current_widget->is_button()) {
|
||||
i->activate();
|
||||
i->value(((Fl_Button*)(current_widget->o))->value());
|
||||
} else if (current_widget->is_a(Fl_Type::ID_Spinner)) {
|
||||
} else if (current_widget->is_a(ID_Spinner)) {
|
||||
i->activate();
|
||||
i->value(((Fl_Spinner*)(current_widget->o))->value());
|
||||
} else
|
||||
|
@ -2192,14 +2192,14 @@ void value_cb(Fl_Value_Input* i, void* v) {
|
|||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && o->is_widget()) {
|
||||
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
|
||||
if (q->is_a(Fl_Type::ID_Valuator_)) {
|
||||
if (q->is_a(ID_Valuator_)) {
|
||||
((Fl_Valuator*)(q->o))->value(n);
|
||||
mod = 1;
|
||||
} else if (q->is_button()) {
|
||||
((Fl_Button*)(q->o))->value(n != 0);
|
||||
if (q->is_a(Fl_Type::ID_Menu_Item)) q->redraw();
|
||||
if (q->is_a(ID_Menu_Item)) q->redraw();
|
||||
mod = 1;
|
||||
} else if (q->is_a(Fl_Type::ID_Spinner)) {
|
||||
} else if (q->is_a(ID_Spinner)) {
|
||||
((Fl_Spinner*)(q->o))->value(n);
|
||||
mod = 1;
|
||||
}
|
||||
|
@ -2214,9 +2214,10 @@ void value_cb(Fl_Value_Input* i, void* v) {
|
|||
|
||||
void values_group_cb(Fl_Group* g, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Flex)) {
|
||||
g->hide();
|
||||
} else if (current_widget->is_a(Fl_Type::ID_Window)) {
|
||||
if ( current_widget->is_a(ID_Flex)
|
||||
|| current_widget->is_a(ID_Grid)
|
||||
|| current_widget->is_a(ID_Window))
|
||||
{
|
||||
g->hide();
|
||||
} else {
|
||||
g->show();
|
||||
|
@ -2227,7 +2228,18 @@ void values_group_cb(Fl_Group* g, void* v) {
|
|||
|
||||
void flex_margin_group_cb(Fl_Group* g, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Flex)) {
|
||||
if (current_widget->is_a(ID_Flex)) {
|
||||
g->show();
|
||||
} else {
|
||||
g->hide();
|
||||
}
|
||||
propagate_load(g, v);
|
||||
}
|
||||
}
|
||||
|
||||
void grid_margin_group_cb(Fl_Group* g, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(ID_Grid)) {
|
||||
g->show();
|
||||
} else {
|
||||
g->hide();
|
||||
|
@ -2238,7 +2250,7 @@ void flex_margin_group_cb(Fl_Group* g, void* v) {
|
|||
|
||||
void size_range_group_cb(Fl_Group* g, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Window)) {
|
||||
if (current_widget->is_a(ID_Window)) {
|
||||
g->show();
|
||||
} else {
|
||||
g->hide();
|
||||
|
@ -2252,14 +2264,14 @@ static void flex_margin_cb(Fl_Value_Input* i, void* v,
|
|||
void (*load_margin)(Fl_Flex*,Fl_Value_Input*),
|
||||
int (*update_margin)(Fl_Flex*,int)) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Flex)) {
|
||||
if (current_widget->is_a(ID_Flex)) {
|
||||
load_margin((Fl_Flex*)current_widget->o, i);
|
||||
}
|
||||
} else {
|
||||
int mod = 0;
|
||||
int new_value = (int)i->value();
|
||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && o->is_a(Fl_Type::ID_Flex)) {
|
||||
if (o->selected && o->is_a(ID_Flex)) {
|
||||
Fl_Flex_Type* q = (Fl_Flex_Type*)o;
|
||||
Fl_Flex* w = (Fl_Flex*)q->o;
|
||||
if (update_margin(w, new_value)) {
|
||||
|
@ -2496,7 +2508,7 @@ void subtype_cb(Fl_Choice* i, void* v) {
|
|||
int j;
|
||||
for (j = 0;; j++) {
|
||||
if (!m[j].text) {j = 0; break;}
|
||||
if (current_widget->is_a(Fl_Type::ID_Spinner)) {
|
||||
if (current_widget->is_a(ID_Spinner)) {
|
||||
if (m[j].argument() == ((Fl_Spinner*)current_widget->o)->type()) break;
|
||||
} else {
|
||||
if (m[j].argument() == current_widget->o->type()) break;
|
||||
|
@ -2514,9 +2526,9 @@ void subtype_cb(Fl_Choice* i, void* v) {
|
|||
if (o->selected && o->is_widget()) {
|
||||
Fl_Widget_Type* q = (Fl_Widget_Type*)o;
|
||||
if (q->subtypes()==m) {
|
||||
if (q->is_a(Fl_Type::ID_Spinner))
|
||||
if (q->is_a(ID_Spinner))
|
||||
((Fl_Spinner*)q->o)->type(n);
|
||||
else if (q->is_a(Fl_Type::ID_Flex))
|
||||
else if (q->is_a(ID_Flex))
|
||||
((Fl_Flex_Type*)q)->change_subtype_to(n);
|
||||
else
|
||||
q->o->type(n);
|
||||
|
@ -2603,7 +2615,7 @@ void live_mode_cb(Fl_Button*o,void *) {
|
|||
live_window->resizable(live_widget);
|
||||
live_window->set_modal(); // block all other UI
|
||||
live_window->callback(leave_live_mode_cb);
|
||||
if (current_widget->is_a(Fl_Type::ID_Window)) {
|
||||
if (current_widget->is_a(ID_Window)) {
|
||||
Fl_Window_Type *w = (Fl_Window_Type*)current_widget;
|
||||
int mw = w->sr_min_w; if (mw>0) mw += 20;
|
||||
int mh = w->sr_min_h; if (mh>0) mh += 55;
|
||||
|
@ -2845,7 +2857,7 @@ void Fl_Widget_Type::write_static(Fd_Code_Writer& f) {
|
|||
Fl_Type *q = 0;
|
||||
for (Fl_Type* p = parent; p && p->is_widget(); q = p, p = p->parent)
|
||||
f.write_c("->parent()");
|
||||
if (!q || !q->is_a(Fl_Type::ID_Widget_Class))
|
||||
if (!q || !q->is_a(ID_Widget_Class))
|
||||
f.write_c("->user_data()");
|
||||
f.write_c("))->%s_i(o,v);\n}\n", cn);
|
||||
}
|
||||
|
@ -3042,7 +3054,7 @@ void Fl_Widget_Type::write_widget_code(Fd_Code_Writer& f) {
|
|||
f.write_c(");\n");
|
||||
}
|
||||
|
||||
if (is_a(Fl_Type::ID_Spinner) && ((Fl_Spinner*)o)->type() != ((Fl_Spinner*)tplate)->type())
|
||||
if (is_a(ID_Spinner) && ((Fl_Spinner*)o)->type() != ((Fl_Spinner*)tplate)->type())
|
||||
f.write_c("%s%s->type(%d);\n", f.indent(), var, ((Fl_Spinner*)o)->type());
|
||||
else if (o->type() != tplate->type() && !is_a(ID_Window))
|
||||
f.write_c("%s%s->type(%d);\n", f.indent(), var, o->type());
|
||||
|
@ -3072,11 +3084,11 @@ void Fl_Widget_Type::write_widget_code(Fd_Code_Writer& f) {
|
|||
boxname(b->down_box()));
|
||||
if (b->value()) f.write_c("%s%s->value(1);\n", f.indent(), var);
|
||||
if (b->compact()) f.write_c("%s%s->compact(%d);\n", f.indent(), var, b->compact());
|
||||
} else if (is_a(Fl_Type::ID_Input_Choice)) {
|
||||
} else if (is_a(ID_Input_Choice)) {
|
||||
Fl_Input_Choice* b = (Fl_Input_Choice*)o;
|
||||
if (b->down_box()) f.write_c("%s%s->down_box(FL_%s);\n", f.indent(), var,
|
||||
boxname(b->down_box()));
|
||||
} else if (is_a(Fl_Type::ID_Menu_Manager_)) {
|
||||
} else if (is_a(ID_Menu_Manager_)) {
|
||||
Fl_Menu_* b = (Fl_Menu_*)o;
|
||||
if (b->down_box()) f.write_c("%s%s->down_box(FL_%s);\n", f.indent(), var,
|
||||
boxname(b->down_box()));
|
||||
|
@ -3118,7 +3130,7 @@ void Fl_Widget_Type::write_widget_code(Fd_Code_Writer& f) {
|
|||
if (x != y) f.write_c("%s%s->slider_size(%g);\n", f.indent(), var, x);
|
||||
}
|
||||
}
|
||||
if (is_a(Fl_Type::ID_Spinner)) {
|
||||
if (is_a(ID_Spinner)) {
|
||||
Fl_Spinner* v = (Fl_Spinner*)o;
|
||||
Fl_Spinner* t = (Fl_Spinner*)(tplate);
|
||||
if (v->minimum()!=t->minimum())
|
||||
|
@ -3164,7 +3176,7 @@ void Fl_Widget_Type::write_widget_code(Fd_Code_Writer& f) {
|
|||
f.write_c("%s%s->hide();\n", f.indent(), var);
|
||||
if (!o->active())
|
||||
f.write_c("%s%s->deactivate();\n", f.indent(), var);
|
||||
if (!is_a(Fl_Type::ID_Group) && resizable())
|
||||
if (!is_a(ID_Group) && resizable())
|
||||
f.write_c("%sFl_Group::current()->resizable(%s);\n", f.indent(), var);
|
||||
if (hotspot()) {
|
||||
if (is_class())
|
||||
|
@ -3221,7 +3233,7 @@ void Fl_Widget_Type::write_properties(Fd_Project_Writer &f) {
|
|||
if (bind_deimage_) f.write_string("bind_deimage 1");
|
||||
f.write_string("xywh {%d %d %d %d}", o->x(), o->y(), o->w(), o->h());
|
||||
Fl_Widget* tplate = ((Fl_Widget_Type*)factory)->o;
|
||||
if (is_a(Fl_Type::ID_Spinner) && ((Fl_Spinner*)o)->type() != ((Fl_Spinner*)tplate)->type()) {
|
||||
if (is_a(ID_Spinner) && ((Fl_Spinner*)o)->type() != ((Fl_Spinner*)tplate)->type()) {
|
||||
f.write_string("type");
|
||||
f.write_word(item_name(subtypes(), ((Fl_Spinner*)o)->type()));
|
||||
} else if (subtypes() && (o->type() != tplate->type() || is_a(ID_Window))) {
|
||||
|
@ -3248,11 +3260,11 @@ void Fl_Widget_Type::write_properties(Fd_Project_Writer &f) {
|
|||
f.write_string("down_box"); f.write_word(boxname(b->down_box()));}
|
||||
if (b->shortcut()) f.write_string("shortcut 0x%x", b->shortcut());
|
||||
if (b->value()) f.write_string("value 1");
|
||||
} else if (is_a(Fl_Type::ID_Input_Choice)) {
|
||||
} else if (is_a(ID_Input_Choice)) {
|
||||
Fl_Input_Choice* b = (Fl_Input_Choice*)o;
|
||||
if (b->down_box()) {
|
||||
f.write_string("down_box"); f.write_word(boxname(b->down_box()));}
|
||||
} else if (is_a(Fl_Type::ID_Menu_)) {
|
||||
} else if (is_a(ID_Menu_)) {
|
||||
Fl_Menu_* b = (Fl_Menu_*)o;
|
||||
if (b->down_box()) {
|
||||
f.write_string("down_box"); f.write_word(boxname(b->down_box()));}
|
||||
|
@ -3288,7 +3300,7 @@ void Fl_Widget_Type::write_properties(Fd_Project_Writer &f) {
|
|||
if (x != y) f.write_string("slider_size %g", x);
|
||||
}
|
||||
}
|
||||
if (is_a(Fl_Type::ID_Spinner)) {
|
||||
if (is_a(ID_Spinner)) {
|
||||
Fl_Spinner* v = (Fl_Spinner*)o;
|
||||
Fl_Spinner* t = (Fl_Spinner*)(tplate);
|
||||
if (v->minimum()!=t->minimum()) f.write_string("minimum %g",v->minimum());
|
||||
|
@ -3380,13 +3392,13 @@ void Fl_Widget_Type::read_property(Fd_Project_Reader &f, const char *c) {
|
|||
if (x == ZERO_ENTRY) x = 0;
|
||||
((Fl_Button*)o)->down_box((Fl_Boxtype)x);
|
||||
}
|
||||
} else if (is_a(Fl_Type::ID_Input_Choice) && !strcmp(c,"down_box")) {
|
||||
} else if (is_a(ID_Input_Choice) && !strcmp(c,"down_box")) {
|
||||
const char* value = f.read_word();
|
||||
if ((x = boxnumber(value))) {
|
||||
if (x == ZERO_ENTRY) x = 0;
|
||||
((Fl_Input_Choice*)o)->down_box((Fl_Boxtype)x);
|
||||
}
|
||||
} else if (is_a(Fl_Type::ID_Menu_) && !strcmp(c,"down_box")) {
|
||||
} else if (is_a(ID_Menu_) && !strcmp(c,"down_box")) {
|
||||
const char* value = f.read_word();
|
||||
if ((x = boxnumber(value))) {
|
||||
if (x == ZERO_ENTRY) x = 0;
|
||||
|
|
|
@ -318,7 +318,7 @@ void Fl_Window_Type::ideal_size(int &w, int &h) {
|
|||
|
||||
void modal_cb(Fl_Light_Button* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (!current_widget->is_a(Fl_Type::ID_Window)) {i->hide(); return;}
|
||||
if (!current_widget->is_a(ID_Window)) {i->hide(); return;}
|
||||
i->show();
|
||||
i->value(((Fl_Window_Type *)current_widget)->modal);
|
||||
} else {
|
||||
|
@ -330,7 +330,7 @@ void modal_cb(Fl_Light_Button* i, void* v) {
|
|||
|
||||
void non_modal_cb(Fl_Light_Button* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (!current_widget->is_a(Fl_Type::ID_Window)) {i->hide(); return;}
|
||||
if (!current_widget->is_a(ID_Window)) {i->hide(); return;}
|
||||
i->show();
|
||||
i->value(((Fl_Window_Type *)current_widget)->non_modal);
|
||||
} else {
|
||||
|
@ -342,7 +342,7 @@ void non_modal_cb(Fl_Light_Button* i, void* v) {
|
|||
|
||||
void border_cb(Fl_Light_Button* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (!current_widget->is_a(Fl_Type::ID_Window)) {i->hide(); return;}
|
||||
if (!current_widget->is_a(ID_Window)) {i->hide(); return;}
|
||||
i->show();
|
||||
i->value(((Fl_Window*)(current_widget->o))->border());
|
||||
} else {
|
||||
|
@ -354,7 +354,7 @@ void border_cb(Fl_Light_Button* i, void* v) {
|
|||
|
||||
void xclass_cb(Fl_Input* i, void* v) {
|
||||
if (v == LOAD) {
|
||||
if (current_widget->is_a(Fl_Type::ID_Window)) {
|
||||
if (current_widget->is_a(ID_Window)) {
|
||||
i->show();
|
||||
i->parent()->show();
|
||||
i->value(((Fl_Window_Type *)current_widget)->xclass);
|
||||
|
@ -366,7 +366,7 @@ void xclass_cb(Fl_Input* i, void* v) {
|
|||
int mod = 0;
|
||||
undo_checkpoint();
|
||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->selected && o->is_a(Fl_Type::ID_Window)) {
|
||||
if (o->selected && o->is_a(ID_Window)) {
|
||||
mod = 1;
|
||||
Fl_Window_Type *wt = (Fl_Window_Type *)o;
|
||||
storestring(i->value(), wt->xclass);
|
||||
|
@ -530,7 +530,7 @@ void Fl_Window_Type::draw_out_of_bounds() {
|
|||
draw_out_of_bounds(this, 0, 0, o->w(), o->h());
|
||||
for (Fl_Type *q=next; q && q->level>level; q = q->next) {
|
||||
// don't do this for Fl_Scroll (which we currently can't handle in FLUID anyway)
|
||||
if (q->is_a(Fl_Type::ID_Group) && !q->is_a(ID_Scroll)) {
|
||||
if (q->is_a(ID_Group) && !q->is_a(ID_Scroll)) {
|
||||
Fl_Widget_Type *w = (Fl_Widget_Type*)q;
|
||||
draw_out_of_bounds(w, w->o->x(), w->o->y(), w->o->w(), w->o->h());
|
||||
}
|
||||
|
@ -699,17 +699,17 @@ void check_redraw_corresponding_parent(Fl_Type *s) {
|
|||
Fl_Widget_Type * prev_parent = 0;
|
||||
if( !s || !s->selected || !s->is_widget()) return;
|
||||
for (Fl_Type *i=s; i && i->parent; i=i->parent) {
|
||||
if (i->is_a(Fl_Type::ID_Group) && prev_parent) {
|
||||
if (i->is_a(Fl_Type::ID_Tabs)) {
|
||||
if (i->is_a(ID_Group) && prev_parent) {
|
||||
if (i->is_a(ID_Tabs)) {
|
||||
((Fl_Tabs*)((Fl_Widget_Type*)i)->o)->value(prev_parent->o);
|
||||
return;
|
||||
}
|
||||
if (i->is_a(Fl_Type::ID_Wizard)) {
|
||||
if (i->is_a(ID_Wizard)) {
|
||||
((Fl_Wizard*)((Fl_Widget_Type*)i)->o)->value(prev_parent->o);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (i->is_a(Fl_Type::ID_Group) && s->is_widget())
|
||||
if (i->is_a(ID_Group) && s->is_widget())
|
||||
prev_parent = (Fl_Widget_Type*)i;
|
||||
}
|
||||
}
|
||||
|
@ -717,7 +717,7 @@ void check_redraw_corresponding_parent(Fl_Type *s) {
|
|||
// do that for every window (when selected set changes):
|
||||
void redraw_overlays() {
|
||||
for (Fl_Type *o=Fl_Type::first; o; o=o->next)
|
||||
if (o->is_a(Fl_Type::ID_Window)) ((Fl_Window_Type*)o)->fix_overlay();
|
||||
if (o->is_a(ID_Window)) ((Fl_Window_Type*)o)->fix_overlay();
|
||||
}
|
||||
|
||||
void toggle_overlays(Fl_Widget *,void *) {
|
||||
|
@ -732,7 +732,7 @@ void toggle_overlays(Fl_Widget *,void *) {
|
|||
}
|
||||
|
||||
for (Fl_Type *o=Fl_Type::first; o; o=o->next)
|
||||
if (o->is_a(Fl_Type::ID_Window)) {
|
||||
if (o->is_a(ID_Window)) {
|
||||
Fl_Widget_Type* w = (Fl_Widget_Type*)o;
|
||||
((Overlay_Window*)(w->o))->redraw_overlay();
|
||||
}
|
||||
|
@ -755,7 +755,7 @@ void toggle_guides(Fl_Widget *,void *) {
|
|||
guides_button->value(show_guides);
|
||||
|
||||
for (Fl_Type *o=Fl_Type::first; o; o=o->next) {
|
||||
if (o->is_a(Fl_Type::ID_Window)) {
|
||||
if (o->is_a(ID_Window)) {
|
||||
Fl_Widget_Type* w = (Fl_Widget_Type*)o;
|
||||
((Overlay_Window*)(w->o))->redraw_overlay();
|
||||
}
|
||||
|
@ -787,7 +787,7 @@ void toggle_restricted(Fl_Widget *,void *) {
|
|||
restricted_button->value(show_restricted);
|
||||
|
||||
for (Fl_Type *o=Fl_Type::first; o; o=o->next) {
|
||||
if (o->is_a(Fl_Type::ID_Window)) {
|
||||
if (o->is_a(ID_Window)) {
|
||||
Fl_Widget_Type* w = (Fl_Widget_Type*)o;
|
||||
((Overlay_Window*)(w->o))->redraw_overlay();
|
||||
}
|
||||
|
@ -876,7 +876,7 @@ int Fl_Window_Type::handle(int event) {
|
|||
// find the innermost item clicked on:
|
||||
selection = this;
|
||||
for (Fl_Type* i=next; i && i->level>level; i=i->next)
|
||||
if (i->is_a(Fl_Type::ID_Group)) {
|
||||
if (i->is_a(ID_Group)) {
|
||||
Fl_Widget_Type* myo = (Fl_Widget_Type*)i;
|
||||
if (Fl::event_inside(myo->o) && myo->o->visible_r()) {
|
||||
selection = myo;
|
||||
|
|
|
@ -60,7 +60,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||
}
|
||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||
if (o->next && o->next->level > o->level && !o->next->selected &&
|
||||
!o->is_a(Fl_Type::ID_Menu_Manager_)) {
|
||||
!o->is_a(ID_Menu_Manager_)) {
|
||||
// When resizing a group, make sure we also move the children...
|
||||
((igroup *)w)->full_resize(left, w->y(), w->w(), w->h());
|
||||
} else {
|
||||
|
@ -95,7 +95,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||
}
|
||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||
if (o->next && o->next->level > o->level && !o->next->selected &&
|
||||
!o->is_a(Fl_Type::ID_Menu_Manager_)) {
|
||||
!o->is_a(ID_Menu_Manager_)) {
|
||||
// When resizing a group, make sure we also move the children...
|
||||
((igroup *)w)->full_resize((center2-w->w())/2, w->y(), w->w(), w->h());
|
||||
} else {
|
||||
|
@ -127,7 +127,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||
}
|
||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||
if (o->next && o->next->level > o->level && !o->next->selected &&
|
||||
!o->is_a(Fl_Type::ID_Menu_Manager_)) {
|
||||
!o->is_a(ID_Menu_Manager_)) {
|
||||
// When resizing a group, make sure we also move the children...
|
||||
((igroup *)w)->full_resize(right-w->w(), w->y(), w->w(), w->h());
|
||||
} else {
|
||||
|
@ -158,7 +158,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||
}
|
||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||
if (o->next && o->next->level > o->level && !o->next->selected &&
|
||||
!o->is_a(Fl_Type::ID_Menu_Manager_)) {
|
||||
!o->is_a(ID_Menu_Manager_)) {
|
||||
// When resizing a group, make sure we also move the children...
|
||||
((igroup *)w)->full_resize(w->x(), top, w->w(), w->h());
|
||||
} else {
|
||||
|
@ -193,7 +193,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||
}
|
||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||
if (o->next && o->next->level > o->level && !o->next->selected &&
|
||||
!o->is_a(Fl_Type::ID_Menu_Manager_)) {
|
||||
!o->is_a(ID_Menu_Manager_)) {
|
||||
// When resizing a group, make sure we also move the children...
|
||||
((igroup *)w)->full_resize(w->x(), (center2-w->h())/2, w->w(), w->h());
|
||||
} else {
|
||||
|
@ -225,7 +225,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||
}
|
||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||
if (o->next && o->next->level > o->level && !o->next->selected &&
|
||||
!o->is_a(Fl_Type::ID_Menu_Manager_)) {
|
||||
!o->is_a(ID_Menu_Manager_)) {
|
||||
// When resizing a group, make sure we also move the children...
|
||||
((igroup *)w)->full_resize( w->x(), bot-w->h(), w->w(), w->h());
|
||||
} else {
|
||||
|
@ -265,7 +265,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||
}
|
||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||
if (o->next && o->next->level > o->level && !o->next->selected &&
|
||||
!o->is_a(Fl_Type::ID_Menu_Manager_)) {
|
||||
!o->is_a(ID_Menu_Manager_)) {
|
||||
// When resizing a group, make sure we also move the children...
|
||||
((igroup *)w)->full_resize(left+wsum+wdt*cnt/n, w->y(), w->w(), w->h());
|
||||
} else {
|
||||
|
@ -307,7 +307,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||
}
|
||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||
if (o->next && o->next->level > o->level && !o->next->selected &&
|
||||
!o->is_a(Fl_Type::ID_Menu_Manager_)) {
|
||||
!o->is_a(ID_Menu_Manager_)) {
|
||||
// When resizing a group, make sure we also move the children...
|
||||
((igroup *)w)->full_resize(w->x(), top+hsum+hgt*cnt/n, w->w(), w->h());
|
||||
} else {
|
||||
|
@ -342,7 +342,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||
}
|
||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||
if (o->next && o->next->level > o->level && !o->next->selected &&
|
||||
!o->is_a(Fl_Type::ID_Menu_Manager_)) {
|
||||
!o->is_a(ID_Menu_Manager_)) {
|
||||
// When resizing a group, make sure we also move the children...
|
||||
((igroup *)w)->full_resize(w->x(), w->y(), wdt, w->h());
|
||||
} else {
|
||||
|
@ -373,7 +373,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||
}
|
||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||
if (o->next && o->next->level > o->level && !o->next->selected &&
|
||||
!o->is_a(Fl_Type::ID_Menu_Manager_)) {
|
||||
!o->is_a(ID_Menu_Manager_)) {
|
||||
// When resizing a group, make sure we also move the children...
|
||||
((igroup *)w)->full_resize( w->x(), w->y(), w->w(), hgt);
|
||||
} else {
|
||||
|
@ -406,7 +406,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||
}
|
||||
Fl_Widget *w = ((Fl_Widget_Type *)o)->o;
|
||||
if (o->next && o->next->level > o->level && !o->next->selected &&
|
||||
!o->is_a(Fl_Type::ID_Menu_Manager_)) {
|
||||
!o->is_a(ID_Menu_Manager_)) {
|
||||
// When resizing a group, make sure we also move the children...
|
||||
((igroup *)w)->full_resize( w->x(), w->y(), wdt, hgt);
|
||||
} else {
|
||||
|
@ -434,7 +434,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||
else center2 = 2*p->x()+p->w();
|
||||
|
||||
if (o->next && o->next->level > o->level && !o->next->selected &&
|
||||
!o->is_a(Fl_Type::ID_Menu_Manager_)) {
|
||||
!o->is_a(ID_Menu_Manager_)) {
|
||||
// When resizing a group, make sure we also move the children...
|
||||
((igroup *)w)->full_resize((center2-w->w())/2, w->y(), w->w(), w->h());
|
||||
} else {
|
||||
|
@ -461,7 +461,7 @@ void align_widget_cb(Fl_Widget*, long how)
|
|||
else center2 = 2*p->y()+p->h();
|
||||
|
||||
if (o->next && o->next->level > o->level && !o->next->selected &&
|
||||
!o->is_a(Fl_Type::ID_Menu_Manager_)) {
|
||||
!o->is_a(ID_Menu_Manager_)) {
|
||||
// When resizing a group, make sure we also move the children...
|
||||
((igroup *)w)->full_resize(w->x(), (center2-w->h())/2, w->w(), w->h());
|
||||
} else {
|
||||
|
|
|
@ -656,14 +656,14 @@ Fl_Type* Fd_Code_Writer::write_code(Fl_Type* p) {
|
|||
}
|
||||
// write all code that come before the children code
|
||||
// (but don't write the last comment until the very end)
|
||||
if (!(p==Fl_Type::last && p->is_a(Fl_Type::ID_Comment)))
|
||||
if (!(p==Fl_Type::last && p->is_a(ID_Comment)))
|
||||
p->write_code1(*this);
|
||||
// recursively write the code of all children
|
||||
Fl_Type* q;
|
||||
if (p->is_widget() && p->is_class()) {
|
||||
// Handle widget classes specially
|
||||
for (q = p->next; q && q->level > p->level;) {
|
||||
if (!q->is_a(Fl_Type::ID_Function)) q = write_code(q);
|
||||
if (!q->is_a(ID_Function)) q = write_code(q);
|
||||
else {
|
||||
int level = q->level;
|
||||
do {
|
||||
|
@ -676,7 +676,7 @@ Fl_Type* Fd_Code_Writer::write_code(Fl_Type* p) {
|
|||
p->write_code2(*this);
|
||||
|
||||
for (q = p->next; q && q->level > p->level;) {
|
||||
if (q->is_a(Fl_Type::ID_Function)) q = write_code(q);
|
||||
if (q->is_a(ID_Function)) q = write_code(q);
|
||||
else {
|
||||
int level = q->level;
|
||||
do {
|
||||
|
@ -733,7 +733,7 @@ int Fd_Code_Writer::write_code(const char *s, const char *t, bool to_sourceview)
|
|||
// if the first entry in the Type tree is a comment, then it is probably
|
||||
// a copyright notice. We print that before anything else in the file!
|
||||
Fl_Type* first_type = Fl_Type::first;
|
||||
if (first_type && first_type->is_a(Fl_Type::ID_Comment)) {
|
||||
if (first_type && first_type->is_a(ID_Comment)) {
|
||||
if (write_sourceview) {
|
||||
first_type->code_position = (int)ftell(code_file);
|
||||
first_type->header_position = (int)ftell(header_file);
|
||||
|
@ -850,7 +850,7 @@ int Fd_Code_Writer::write_code(const char *s, const char *t, bool to_sourceview)
|
|||
fprintf(header_file, "#endif\n");
|
||||
|
||||
Fl_Type* last_type = Fl_Type::last;
|
||||
if (last_type && last_type->is_a(Fl_Type::ID_Comment)) {
|
||||
if (last_type && last_type->is_a(ID_Comment)) {
|
||||
if (write_sourceview) {
|
||||
last_type->code_position = (int)ftell(code_file);
|
||||
last_type->header_position = (int)ftell(header_file);
|
||||
|
|
|
@ -111,7 +111,7 @@ int Widget_Bin_Window_Button::handle(int inEvent)
|
|||
Fl_Type *prototype = typename_to_prototype((char*)user_data());
|
||||
if (prototype) {
|
||||
Fl_Type *new_type = add_new_widget_from_user(prototype, kAddAfterCurrent);
|
||||
if (new_type && new_type->is_a(Fl_Type::ID_Window)) {
|
||||
if (new_type && new_type->is_a(ID_Window)) {
|
||||
Fl_Window_Type *new_window = (Fl_Window_Type*)new_type;
|
||||
Fl_Window *w = (Fl_Window *)new_window->o;
|
||||
w->position(Fl::event_x_root(), Fl::event_y_root());
|
||||
|
|
|
@ -1025,6 +1025,7 @@ extern class Fl_Widget_Class_Type Fl_Widget_Class_type;
|
|||
extern class Fl_Group_Type Fl_Group_type;
|
||||
extern class Fl_Pack_Type Fl_Pack_type;
|
||||
extern class Fl_Flex_Type Fl_Flex_type;
|
||||
extern class Fl_Grid_Type Fl_Grid_type;
|
||||
extern class Fl_Tabs_Type Fl_Tabs_type;
|
||||
extern class Fl_Scroll_Type Fl_Scroll_type;
|
||||
extern class Fl_Table_Type Fl_Table_type;
|
||||
|
@ -1075,6 +1076,7 @@ static Fl_Type *known_types[] = {
|
|||
(Fl_Type*)&Fl_Scroll_type,
|
||||
(Fl_Type*)&Fl_Tile_type,
|
||||
(Fl_Type*)&Fl_Wizard_type,
|
||||
(Fl_Type*)&Fl_Grid_type,
|
||||
// buttons
|
||||
(Fl_Type*)&Fl_Button_type,
|
||||
(Fl_Type*)&Fl_Return_Button_type,
|
||||
|
@ -1150,7 +1152,7 @@ Fl_Type *add_new_widget_from_user(Fl_Type *inPrototype, Strategy strategy) {
|
|||
undo_suspend();
|
||||
Fl_Type *t = ((Fl_Type*)inPrototype)->make(strategy);
|
||||
if (t) {
|
||||
if (t->is_widget() && !t->is_a(Fl_Type::ID_Window)) {
|
||||
if (t->is_widget() && !t->is_a(ID_Window)) {
|
||||
Fl_Widget_Type *wt = (Fl_Widget_Type *)t;
|
||||
bool changed = false;
|
||||
|
||||
|
@ -1176,13 +1178,13 @@ Fl_Type *add_new_widget_from_user(Fl_Type *inPrototype, Strategy strategy) {
|
|||
wt->textstuff(2, f, s, c);
|
||||
}
|
||||
|
||||
if (changed && t->is_a(Fl_Type::ID_Menu_Item)) {
|
||||
if (changed && t->is_a(ID_Menu_Item)) {
|
||||
Fl_Type * tt = t->parent;
|
||||
while (tt && !tt->is_a(Fl_Type::ID_Menu_Manager_)) tt = tt->parent;
|
||||
while (tt && !tt->is_a(ID_Menu_Manager_)) tt = tt->parent;
|
||||
((Fl_Menu_Manager_Type*)tt)->build_menu();
|
||||
}
|
||||
}
|
||||
if (t->is_true_widget() && !t->is_a(Fl_Type::ID_Window)) {
|
||||
if (t->is_true_widget() && !t->is_a(ID_Window)) {
|
||||
// Resize and/or reposition new widget...
|
||||
Fl_Widget_Type *wt = (Fl_Widget_Type *)t;
|
||||
|
||||
|
@ -1191,11 +1193,11 @@ Fl_Type *add_new_widget_from_user(Fl_Type *inPrototype, Strategy strategy) {
|
|||
int w = 0, h = 0;
|
||||
wt->ideal_size(w, h);
|
||||
|
||||
if ((t->parent && t->parent->is_a(Fl_Type::ID_Flex))) {
|
||||
if ((t->parent && t->parent->is_a(ID_Flex))) {
|
||||
// Do not resize or layout the widget. Flex will need the widget size.
|
||||
} else if ( wt->is_a(Fl_Type::ID_Group)
|
||||
} else if ( wt->is_a(ID_Group)
|
||||
&& wt->parent
|
||||
&& wt->parent->is_a(Fl_Type::ID_Tabs)
|
||||
&& wt->parent->is_a(ID_Tabs)
|
||||
//&& (Fl_Window_Type::popupx == 0x7FFFFFFF)
|
||||
&& (layout->top_tabs_margin > 0)) {
|
||||
// If the widget is a group and the parent is tabs and the top tabs
|
||||
|
@ -1204,9 +1206,9 @@ Fl_Type *add_new_widget_from_user(Fl_Type *inPrototype, Strategy strategy) {
|
|||
Fl_Widget *po = ((Fl_Tabs_Type*)wt->parent)->o;
|
||||
wt->o->resize(po->x(), po->y() + layout->top_tabs_margin,
|
||||
po->w(), po->h() - layout->top_tabs_margin);
|
||||
} else if ( wt->is_a(Fl_Type::ID_Menu_Bar)
|
||||
} else if ( wt->is_a(ID_Menu_Bar)
|
||||
&& wt->parent
|
||||
&& wt->parent->is_a(Fl_Type::ID_Window)
|
||||
&& wt->parent->is_a(ID_Window)
|
||||
&& (wt->prev == wt->parent)) {
|
||||
// If this is the first child of a window, make the menu bar as wide as
|
||||
// the window and drop it at 0, 0. Otherwise just use the suggested size.
|
||||
|
@ -1224,7 +1226,7 @@ Fl_Type *add_new_widget_from_user(Fl_Type *inPrototype, Strategy strategy) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (t->is_a(Fl_Type::ID_Window)) {
|
||||
if (t->is_a(ID_Window)) {
|
||||
int x = 0, y = 0, w = 480, h = 320;
|
||||
Fl_Window_Type *wt = (Fl_Window_Type *)t;
|
||||
wt->ideal_size(w, h);
|
||||
|
@ -1272,7 +1274,7 @@ Fl_Type *add_new_widget_from_user(const char *inName, Strategy strategy) {
|
|||
*/
|
||||
static void cbf(Fl_Widget *, void *v) {
|
||||
Fl_Type *t = NULL;
|
||||
if (Fl_Type::current && Fl_Type::current->is_a(Fl_Type::ID_Group))
|
||||
if (Fl_Type::current && Fl_Type::current->is_a(ID_Group))
|
||||
t = ((Fl_Type*)v)->make(kAddAsLastChild);
|
||||
else
|
||||
t = ((Fl_Type*)v)->make(kAddAfterCurrent);
|
||||
|
@ -1284,7 +1286,7 @@ static void cbf(Fl_Widget *, void *v) {
|
|||
*/
|
||||
static void cb(Fl_Widget *, void *v) {
|
||||
Fl_Type *t = NULL;
|
||||
if (Fl_Type::current && Fl_Type::current->is_a(Fl_Type::ID_Group))
|
||||
if (Fl_Type::current && Fl_Type::current->is_a(ID_Group))
|
||||
t = add_new_widget_from_user((Fl_Type*)v, kAddAsLastChild);
|
||||
else
|
||||
t = add_new_widget_from_user((Fl_Type*)v, kAddAfterCurrent);
|
||||
|
@ -1312,6 +1314,7 @@ Fl_Menu_Item New_Menu[] = {
|
|||
{0,0,cb,(void*)&Fl_Scroll_type},
|
||||
{0,0,cb,(void*)&Fl_Tile_type},
|
||||
{0,0,cb,(void*)&Fl_Wizard_type},
|
||||
{0,0,cb,(void*)&Fl_Grid_type},
|
||||
{0},
|
||||
{"Buttons",0,0,0,FL_SUBMENU},
|
||||
{0,0,cb,(void*)&Fl_Button_type},
|
||||
|
|
|
@ -403,7 +403,7 @@ int Fd_Project_Reader::read_project(const char *filename, int merge, Strategy st
|
|||
Fl_Type::current = 0;
|
||||
// Force menu items to be rebuilt...
|
||||
for (o = Fl_Type::first; o; o = o->next) {
|
||||
if (o->is_a(Fl_Type::ID_Menu_Manager_)) {
|
||||
if (o->is_a(ID_Menu_Manager_)) {
|
||||
o->add_child(0,0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -607,7 +607,7 @@ static void external_editor_timer(void*) {
|
|||
// Walk tree looking for files modified by external editors.
|
||||
int modified = 0;
|
||||
for (Fl_Type *p = Fl_Type::first; p; p = p->next) {
|
||||
if ( p->is_a(Fl_Type::ID_Code) ) {
|
||||
if ( p->is_a(ID_Code) ) {
|
||||
Fl_Code_Type *code = (Fl_Code_Type*)p;
|
||||
// Code changed by external editor?
|
||||
if ( code->handle_editor_changes() ) { // updates ram, file size/mtime
|
||||
|
@ -743,7 +743,7 @@ void save_template_cb(Fl_Widget *, void *) {
|
|||
|
||||
for (t = Fl_Type::first; t; t = t->next) {
|
||||
// Find the first window...
|
||||
if (t->is_a(Fl_Type::ID_Window)) break;
|
||||
if (t->is_a(ID_Window)) break;
|
||||
}
|
||||
|
||||
if (!t) return;
|
||||
|
@ -1368,7 +1368,7 @@ void paste_cb(Fl_Widget*, void*) {
|
|||
undo_checkpoint();
|
||||
undo_suspend();
|
||||
Strategy strategy = kAddAfterCurrent;
|
||||
if (Fl_Type::current && Fl_Type::current->is_a(Fl_Type::ID_Group))
|
||||
if (Fl_Type::current && Fl_Type::current->is_a(ID_Group))
|
||||
strategy = kAddAsLastChild;
|
||||
if (!read_file(cutfname(), 1, strategy)) {
|
||||
widget_browser->rebuild();
|
||||
|
@ -1529,7 +1529,7 @@ void print_menu_cb(Fl_Widget *, void *) {
|
|||
Fl_Window *win;
|
||||
|
||||
for (t = Fl_Type::first, num_windows = 0; t; t = t->next) {
|
||||
if (t->is_a(Fl_Type::ID_Window)) {
|
||||
if (t->is_a(ID_Window)) {
|
||||
windows[num_windows] = (Fl_Window_Type *)t;
|
||||
if (!((Fl_Window*)(windows[num_windows]->o))->shown()) continue;
|
||||
num_windows ++;
|
||||
|
|
|
@ -727,31 +727,31 @@ Fl_Window* make_widgetbin() {
|
|||
o->tooltip("Function");
|
||||
o->box(FL_THIN_UP_BOX);
|
||||
o->callback((Fl_Callback*)type_make_cb, (void*)("Function"));
|
||||
o->image(pixmap[Fl_Type::ID_Function]);
|
||||
o->image(pixmap[ID_Function]);
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(30, 21, 24, 24);
|
||||
o->tooltip("Class");
|
||||
o->box(FL_THIN_UP_BOX);
|
||||
o->callback((Fl_Callback*)type_make_cb, (void*)("Class"));
|
||||
o->image(pixmap[Fl_Type::ID_Class]);
|
||||
o->image(pixmap[ID_Class]);
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(55, 21, 24, 24);
|
||||
o->tooltip("Comment");
|
||||
o->box(FL_THIN_UP_BOX);
|
||||
o->callback((Fl_Callback*)type_make_cb, (void*)("comment"));
|
||||
o->image(pixmap[Fl_Type::ID_Comment]);
|
||||
o->image(pixmap[ID_Comment]);
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(5, 46, 24, 24);
|
||||
o->tooltip("Code");
|
||||
o->box(FL_THIN_UP_BOX);
|
||||
o->callback((Fl_Callback*)type_make_cb, (void*)("Code"));
|
||||
o->image(pixmap[Fl_Type::ID_Code]);
|
||||
o->image(pixmap[ID_Code]);
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(30, 46, 24, 24);
|
||||
o->tooltip("Code Block");
|
||||
o->box(FL_THIN_UP_BOX);
|
||||
o->callback((Fl_Callback*)type_make_cb, (void*)("CodeBlock"));
|
||||
o->image(pixmap[Fl_Type::ID_CodeBlock]);
|
||||
o->image(pixmap[ID_CodeBlock]);
|
||||
} // Fl_Button* o
|
||||
{ Widget_Bin_Window_Button* o = new Widget_Bin_Window_Button(55, 46, 24, 24);
|
||||
o->tooltip("Widget Class");
|
||||
|
@ -765,25 +765,25 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("widget_class"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Widget_Class]);
|
||||
o->image(pixmap[ID_Widget_Class]);
|
||||
} // Widget_Bin_Window_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(5, 71, 24, 24);
|
||||
o->tooltip("Declaration");
|
||||
o->box(FL_THIN_UP_BOX);
|
||||
o->callback((Fl_Callback*)type_make_cb, (void*)("decl"));
|
||||
o->image(pixmap[Fl_Type::ID_Decl]);
|
||||
o->image(pixmap[ID_Decl]);
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(30, 71, 24, 24);
|
||||
o->tooltip("Declaration Block");
|
||||
o->box(FL_THIN_UP_BOX);
|
||||
o->callback((Fl_Callback*)type_make_cb, (void*)("declblock"));
|
||||
o->image(pixmap[Fl_Type::ID_DeclBlock]);
|
||||
o->image(pixmap[ID_DeclBlock]);
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(55, 71, 24, 24);
|
||||
o->tooltip("Inline Data");
|
||||
o->box(FL_THIN_UP_BOX);
|
||||
o->callback((Fl_Callback*)type_make_cb, (void*)("data"));
|
||||
o->image(pixmap[Fl_Type::ID_Data]);
|
||||
o->image(pixmap[ID_Data]);
|
||||
} // Fl_Button* o
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
|
@ -801,7 +801,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Window"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Window]);
|
||||
o->image(pixmap[ID_Window]);
|
||||
} // Widget_Bin_Window_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(114, 21, 24, 24);
|
||||
o->tooltip("Group");
|
||||
|
@ -815,7 +815,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Group"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Group]);
|
||||
o->image(pixmap[ID_Group]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(139, 21, 24, 24);
|
||||
o->tooltip("Pack");
|
||||
|
@ -829,7 +829,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Pack"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Pack]);
|
||||
o->image(pixmap[ID_Pack]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(89, 46, 24, 24);
|
||||
o->tooltip("Tabs");
|
||||
|
@ -843,7 +843,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Tabs"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Tabs]);
|
||||
o->image(pixmap[ID_Tabs]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(114, 46, 24, 24);
|
||||
o->tooltip("Scroll");
|
||||
|
@ -857,7 +857,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Scroll"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Scroll]);
|
||||
o->image(pixmap[ID_Scroll]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(139, 46, 24, 24);
|
||||
o->tooltip("Flex");
|
||||
|
@ -871,7 +871,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Flex"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Flex]);
|
||||
o->image(pixmap[ID_Flex]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(89, 71, 24, 24);
|
||||
o->tooltip("Tile");
|
||||
|
@ -885,7 +885,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Tile"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Tile]);
|
||||
o->image(pixmap[ID_Tile]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(114, 71, 24, 24);
|
||||
o->tooltip("Wizard");
|
||||
|
@ -899,7 +899,21 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Wizard"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Wizard]);
|
||||
o->image(pixmap[ID_Wizard]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(139, 71, 24, 24);
|
||||
o->tooltip("Grid");
|
||||
o->box(FL_THIN_UP_BOX);
|
||||
o->color(FL_BACKGROUND_COLOR);
|
||||
o->selection_color(FL_BACKGROUND_COLOR);
|
||||
o->labeltype(FL_NORMAL_LABEL);
|
||||
o->labelfont(0);
|
||||
o->labelsize(14);
|
||||
o->labelcolor(FL_FOREGROUND_COLOR);
|
||||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Grid"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[ID_Grid]);
|
||||
} // Widget_Bin_Button* o
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
|
@ -917,7 +931,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Button"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Button]);
|
||||
o->image(pixmap[ID_Button]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(198, 21, 24, 24);
|
||||
o->tooltip("Return Button");
|
||||
|
@ -931,7 +945,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Return_Button"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Return_Button]);
|
||||
o->image(pixmap[ID_Return_Button]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(173, 46, 24, 24);
|
||||
o->tooltip("Light Button");
|
||||
|
@ -945,7 +959,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Light_Button"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Light_Button]);
|
||||
o->image(pixmap[ID_Light_Button]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(198, 46, 24, 24);
|
||||
o->tooltip("Repeat Button");
|
||||
|
@ -959,7 +973,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Repeat_Button"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Repeat_Button]);
|
||||
o->image(pixmap[ID_Repeat_Button]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(173, 71, 24, 24);
|
||||
o->tooltip("Check Button");
|
||||
|
@ -973,7 +987,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Check_Button"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Check_Button]);
|
||||
o->image(pixmap[ID_Check_Button]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(198, 71, 24, 24);
|
||||
o->tooltip("Round Button");
|
||||
|
@ -987,7 +1001,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Round_Button"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Round_Button]);
|
||||
o->image(pixmap[ID_Round_Button]);
|
||||
} // Widget_Bin_Button* o
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
|
@ -1005,7 +1019,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Slider"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Slider]);
|
||||
o->image(pixmap[ID_Slider]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(257, 21, 24, 24);
|
||||
o->tooltip("Scroll Bar");
|
||||
|
@ -1019,7 +1033,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Scrollbar"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Scrollbar]);
|
||||
o->image(pixmap[ID_Scrollbar]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(282, 21, 24, 24);
|
||||
o->tooltip("Value Slider");
|
||||
|
@ -1033,7 +1047,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Value_Slider"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Value_Slider]);
|
||||
o->image(pixmap[ID_Value_Slider]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(307, 21, 24, 24);
|
||||
o->tooltip("Value Output");
|
||||
|
@ -1047,7 +1061,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Value_Output"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Value_Output]);
|
||||
o->image(pixmap[ID_Value_Output]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(232, 46, 24, 24);
|
||||
o->tooltip("Adjuster");
|
||||
|
@ -1061,7 +1075,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Adjuster"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Adjuster]);
|
||||
o->image(pixmap[ID_Adjuster]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(257, 46, 24, 24);
|
||||
o->tooltip("Counter");
|
||||
|
@ -1075,7 +1089,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Counter"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Counter]);
|
||||
o->image(pixmap[ID_Counter]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(282, 46, 24, 24);
|
||||
o->tooltip("Dial");
|
||||
|
@ -1089,7 +1103,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Dial"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Dial]);
|
||||
o->image(pixmap[ID_Dial]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(232, 71, 24, 24);
|
||||
o->tooltip("Roller");
|
||||
|
@ -1103,7 +1117,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Roller"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Roller]);
|
||||
o->image(pixmap[ID_Roller]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(257, 71, 24, 24);
|
||||
o->tooltip("Spinner");
|
||||
|
@ -1117,7 +1131,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Spinner"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Spinner]);
|
||||
o->image(pixmap[ID_Spinner]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(282, 71, 24, 24);
|
||||
o->tooltip("Value Input");
|
||||
|
@ -1131,7 +1145,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Value_Input"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Value_Input]);
|
||||
o->image(pixmap[ID_Value_Input]);
|
||||
} // Widget_Bin_Button* o
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
|
@ -1149,7 +1163,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Input"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Input]);
|
||||
o->image(pixmap[ID_Input]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(366, 21, 24, 24);
|
||||
o->tooltip("Output");
|
||||
|
@ -1163,7 +1177,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Output"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Output]);
|
||||
o->image(pixmap[ID_Output]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(341, 46, 24, 24);
|
||||
o->tooltip("Text Edit");
|
||||
|
@ -1177,7 +1191,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Text_Editor"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Text_Editor]);
|
||||
o->image(pixmap[ID_Text_Editor]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(366, 46, 24, 24);
|
||||
o->tooltip("Text Display");
|
||||
|
@ -1191,7 +1205,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Text_Display"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Text_Display]);
|
||||
o->image(pixmap[ID_Text_Display]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(341, 71, 24, 24);
|
||||
o->tooltip("File Input");
|
||||
|
@ -1205,7 +1219,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_File_Input"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_File_Input]);
|
||||
o->image(pixmap[ID_File_Input]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(366, 71, 24, 24);
|
||||
o->tooltip("Simple Terminal");
|
||||
|
@ -1219,13 +1233,13 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Simple_Terminal"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Simple_Terminal]);
|
||||
o->image(pixmap[ID_Simple_Terminal]);
|
||||
} // Widget_Bin_Button* o
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
{ Fl_Group* o = new Fl_Group(398, 19, 79, 79, "Menus");
|
||||
o->labelsize(12);
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(400, 21, 24, 24);
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(400, 22, 24, 24);
|
||||
o->tooltip("Input Choice");
|
||||
o->box(FL_THIN_UP_BOX);
|
||||
o->color(FL_BACKGROUND_COLOR);
|
||||
|
@ -1237,7 +1251,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Input_Choice"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Input_Choice]);
|
||||
o->image(pixmap[ID_Input_Choice]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(425, 21, 24, 24);
|
||||
o->tooltip("Menu Item");
|
||||
|
@ -1251,7 +1265,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("menuitem"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Menu_Item]);
|
||||
o->image(pixmap[ID_Menu_Item]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(450, 21, 24, 24);
|
||||
o->tooltip("Menu Bar");
|
||||
|
@ -1265,7 +1279,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Menu_Bar"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Menu_Bar]);
|
||||
o->image(pixmap[ID_Menu_Bar]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(400, 46, 24, 24);
|
||||
o->tooltip("Menu Button");
|
||||
|
@ -1279,7 +1293,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Menu_Button"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Menu_Button]);
|
||||
o->image(pixmap[ID_Menu_Button]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(425, 46, 24, 24);
|
||||
o->tooltip("Checkbox Menu Item");
|
||||
|
@ -1293,7 +1307,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("checkmenuitem"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Checkbox_Menu_Item]);
|
||||
o->image(pixmap[ID_Checkbox_Menu_Item]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(450, 46, 24, 24);
|
||||
o->tooltip("Sub Menu");
|
||||
|
@ -1307,7 +1321,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("submenu"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Submenu]);
|
||||
o->image(pixmap[ID_Submenu]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(400, 71, 24, 24);
|
||||
o->tooltip("Choice");
|
||||
|
@ -1321,7 +1335,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Choice"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Choice]);
|
||||
o->image(pixmap[ID_Choice]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(425, 71, 24, 24);
|
||||
o->tooltip("Radio Menu Item");
|
||||
|
@ -1335,7 +1349,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("radiomenuitem"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Radio_Menu_Item]);
|
||||
o->image(pixmap[ID_Radio_Menu_Item]);
|
||||
} // Widget_Bin_Button* o
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
|
@ -1353,7 +1367,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Browser"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Browser]);
|
||||
o->image(pixmap[ID_Browser]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(509, 21, 24, 24);
|
||||
o->tooltip("Tree");
|
||||
|
@ -1367,7 +1381,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Tree"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Tree]);
|
||||
o->image(pixmap[ID_Tree]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(484, 46, 24, 24);
|
||||
o->tooltip("Check Browser");
|
||||
|
@ -1381,7 +1395,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Check_Browser"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Check_Browser]);
|
||||
o->image(pixmap[ID_Check_Browser]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(509, 46, 24, 24);
|
||||
o->tooltip("Help Browser");
|
||||
|
@ -1395,7 +1409,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Help_View"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Help_View]);
|
||||
o->image(pixmap[ID_Help_View]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(484, 71, 24, 24);
|
||||
o->tooltip("File Browser");
|
||||
|
@ -1409,7 +1423,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_File_Browser"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_File_Browser]);
|
||||
o->image(pixmap[ID_File_Browser]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(509, 71, 24, 24);
|
||||
o->tooltip("Table");
|
||||
|
@ -1423,7 +1437,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Table"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Table]);
|
||||
o->image(pixmap[ID_Table]);
|
||||
} // Widget_Bin_Button* o
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
|
@ -1441,7 +1455,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Box"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Box]);
|
||||
o->image(pixmap[ID_Box]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(567, 21, 24, 24);
|
||||
o->tooltip("Clock");
|
||||
|
@ -1455,7 +1469,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Clock"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Clock]);
|
||||
o->image(pixmap[ID_Clock]);
|
||||
} // Widget_Bin_Button* o
|
||||
{ Widget_Bin_Button* o = new Widget_Bin_Button(542, 46, 24, 24);
|
||||
o->tooltip("Progress");
|
||||
|
@ -1469,7 +1483,7 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Progress"));
|
||||
o->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
o->image(pixmap[Fl_Type::ID_Progress]);
|
||||
o->image(pixmap[ID_Progress]);
|
||||
} // Widget_Bin_Button* o
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
|
|
|
@ -535,8 +535,7 @@ Function {type_make_cb(Fl_Widget*,void*d)} {open return_type void
|
|||
if (Fl_Type::current && Fl_Type::current->is_parent())
|
||||
add_new_widget_from_user(type_name, kAddAsLastChild);
|
||||
else
|
||||
add_new_widget_from_user(type_name, kAddAfterCurrent);} {selected
|
||||
}
|
||||
add_new_widget_from_user(type_name, kAddAfterCurrent);} {}
|
||||
}
|
||||
|
||||
Function {make_widgetbin()} {open
|
||||
|
@ -546,7 +545,7 @@ Function {make_widgetbin()} {open
|
|||
callback {if (Fl::event()==FL_SHORTCUT && Fl::event_key()==FL_Escape)
|
||||
exit_cb((Fl_Widget*)o, v);
|
||||
else
|
||||
toggle_widgetbin_cb((Fl_Widget*)o, v);}
|
||||
toggle_widgetbin_cb((Fl_Widget*)o, v);} open
|
||||
xywh {395 227 600 102} type Single align 80 non_modal visible
|
||||
} {
|
||||
Fl_Group {} {
|
||||
|
@ -557,56 +556,56 @@ else
|
|||
user_data {"Function"}
|
||||
callback type_make_cb
|
||||
tooltip Function xywh {5 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Function]);}
|
||||
code0 {o->image(pixmap[ID_Function]);}
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Class"}
|
||||
callback type_make_cb
|
||||
tooltip Class xywh {30 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Class]);}
|
||||
code0 {o->image(pixmap[ID_Class]);}
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"comment"}
|
||||
callback type_make_cb
|
||||
tooltip Comment xywh {55 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Comment]);}
|
||||
code0 {o->image(pixmap[ID_Comment]);}
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Code"}
|
||||
callback type_make_cb
|
||||
tooltip Code xywh {5 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Code]);}
|
||||
code0 {o->image(pixmap[ID_Code]);}
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"CodeBlock"}
|
||||
callback type_make_cb
|
||||
tooltip {Code Block} xywh {30 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_CodeBlock]);}
|
||||
code0 {o->image(pixmap[ID_CodeBlock]);}
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"widget_class"}
|
||||
callback type_make_cb
|
||||
tooltip {Widget Class} xywh {55 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Widget_Class]);}
|
||||
code0 {o->image(pixmap[ID_Widget_Class]);}
|
||||
class Widget_Bin_Window_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"decl"}
|
||||
callback type_make_cb
|
||||
tooltip Declaration xywh {5 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Decl]);}
|
||||
code0 {o->image(pixmap[ID_Decl]);}
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"declblock"}
|
||||
callback type_make_cb
|
||||
tooltip {Declaration Block} xywh {30 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_DeclBlock]);}
|
||||
code0 {o->image(pixmap[ID_DeclBlock]);}
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"data"}
|
||||
callback type_make_cb
|
||||
tooltip {Inline Data} xywh {55 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Data]);}
|
||||
code0 {o->image(pixmap[ID_Data]);}
|
||||
}
|
||||
}
|
||||
Fl_Group {} {
|
||||
|
@ -617,56 +616,63 @@ else
|
|||
user_data {"Fl_Window"}
|
||||
callback type_make_cb
|
||||
tooltip Window xywh {89 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Window]);}
|
||||
code0 {o->image(pixmap[ID_Window]);}
|
||||
class Widget_Bin_Window_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Group"}
|
||||
callback type_make_cb
|
||||
tooltip Group xywh {114 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Group]);}
|
||||
code0 {o->image(pixmap[ID_Group]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Pack"}
|
||||
callback type_make_cb
|
||||
tooltip Pack xywh {139 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Pack]);}
|
||||
code0 {o->image(pixmap[ID_Pack]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Tabs"}
|
||||
callback type_make_cb
|
||||
tooltip Tabs xywh {89 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Tabs]);}
|
||||
code0 {o->image(pixmap[ID_Tabs]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Scroll"}
|
||||
callback type_make_cb
|
||||
tooltip Scroll xywh {114 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Scroll]);}
|
||||
code0 {o->image(pixmap[ID_Scroll]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Flex"}
|
||||
callback type_make_cb
|
||||
tooltip Flex xywh {139 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Flex]);}
|
||||
code0 {o->image(pixmap[ID_Flex]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Tile"}
|
||||
callback type_make_cb
|
||||
tooltip Tile xywh {89 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Tile]);}
|
||||
code0 {o->image(pixmap[ID_Tile]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Wizard"}
|
||||
callback type_make_cb
|
||||
tooltip Wizard xywh {114 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Wizard]);}
|
||||
code0 {o->image(pixmap[ID_Wizard]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Grid"}
|
||||
callback type_make_cb selected
|
||||
tooltip Grid xywh {139 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[ID_Grid]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
}
|
||||
|
@ -678,42 +684,42 @@ else
|
|||
user_data {"Fl_Button"}
|
||||
callback type_make_cb
|
||||
tooltip Button xywh {173 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Button]);}
|
||||
code0 {o->image(pixmap[ID_Button]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Return_Button"}
|
||||
callback type_make_cb
|
||||
tooltip {Return Button} xywh {198 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Return_Button]);}
|
||||
code0 {o->image(pixmap[ID_Return_Button]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Light_Button"}
|
||||
callback type_make_cb
|
||||
tooltip {Light Button} xywh {173 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Light_Button]);}
|
||||
code0 {o->image(pixmap[ID_Light_Button]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Repeat_Button"}
|
||||
callback type_make_cb
|
||||
tooltip {Repeat Button} xywh {198 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Repeat_Button]);}
|
||||
code0 {o->image(pixmap[ID_Repeat_Button]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Check_Button"}
|
||||
callback type_make_cb
|
||||
tooltip {Check Button} xywh {173 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Check_Button]);}
|
||||
code0 {o->image(pixmap[ID_Check_Button]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Round_Button"}
|
||||
callback type_make_cb
|
||||
tooltip {Round Button} xywh {198 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Round_Button]);}
|
||||
code0 {o->image(pixmap[ID_Round_Button]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
}
|
||||
|
@ -725,70 +731,70 @@ else
|
|||
user_data {"Fl_Slider"}
|
||||
callback type_make_cb
|
||||
tooltip Slider xywh {232 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Slider]);}
|
||||
code0 {o->image(pixmap[ID_Slider]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Scrollbar"}
|
||||
callback type_make_cb
|
||||
tooltip {Scroll Bar} xywh {257 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Scrollbar]);}
|
||||
code0 {o->image(pixmap[ID_Scrollbar]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Value_Slider"}
|
||||
callback type_make_cb
|
||||
tooltip {Value Slider} xywh {282 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Value_Slider]);}
|
||||
code0 {o->image(pixmap[ID_Value_Slider]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Value_Output"}
|
||||
callback type_make_cb
|
||||
tooltip {Value Output} xywh {307 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Value_Output]);}
|
||||
code0 {o->image(pixmap[ID_Value_Output]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Adjuster"}
|
||||
callback type_make_cb
|
||||
tooltip Adjuster xywh {232 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Adjuster]);}
|
||||
code0 {o->image(pixmap[ID_Adjuster]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Counter"}
|
||||
callback type_make_cb
|
||||
tooltip Counter xywh {257 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Counter]);}
|
||||
code0 {o->image(pixmap[ID_Counter]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Dial"}
|
||||
callback type_make_cb
|
||||
tooltip Dial xywh {282 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Dial]);}
|
||||
code0 {o->image(pixmap[ID_Dial]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Roller"}
|
||||
callback type_make_cb
|
||||
tooltip Roller xywh {232 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Roller]);}
|
||||
code0 {o->image(pixmap[ID_Roller]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Spinner"}
|
||||
callback type_make_cb
|
||||
tooltip Spinner xywh {257 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Spinner]);}
|
||||
code0 {o->image(pixmap[ID_Spinner]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Value_Input"}
|
||||
callback type_make_cb
|
||||
tooltip {Value Input} xywh {282 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Value_Input]);}
|
||||
code0 {o->image(pixmap[ID_Value_Input]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
}
|
||||
|
@ -800,42 +806,42 @@ else
|
|||
user_data {"Fl_Input"}
|
||||
callback type_make_cb
|
||||
tooltip Input xywh {341 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Input]);}
|
||||
code0 {o->image(pixmap[ID_Input]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Output"}
|
||||
callback type_make_cb
|
||||
tooltip Output xywh {366 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Output]);}
|
||||
code0 {o->image(pixmap[ID_Output]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Text_Editor"}
|
||||
callback type_make_cb
|
||||
tooltip {Text Edit} xywh {341 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Text_Editor]);}
|
||||
code0 {o->image(pixmap[ID_Text_Editor]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Text_Display"}
|
||||
callback type_make_cb
|
||||
tooltip {Text Display} xywh {366 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Text_Display]);}
|
||||
code0 {o->image(pixmap[ID_Text_Display]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_File_Input"}
|
||||
callback type_make_cb
|
||||
tooltip {File Input} xywh {341 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_File_Input]);}
|
||||
code0 {o->image(pixmap[ID_File_Input]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Simple_Terminal"}
|
||||
callback type_make_cb
|
||||
tooltip {Simple Terminal} xywh {366 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Simple_Terminal]);}
|
||||
code0 {o->image(pixmap[ID_Simple_Terminal]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
}
|
||||
|
@ -846,57 +852,57 @@ else
|
|||
Fl_Button {} {
|
||||
user_data {"Fl_Input_Choice"}
|
||||
callback type_make_cb
|
||||
tooltip {Input Choice} xywh {400 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Input_Choice]);}
|
||||
tooltip {Input Choice} xywh {400 22 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[ID_Input_Choice]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"menuitem"}
|
||||
callback type_make_cb
|
||||
tooltip {Menu Item} xywh {425 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Menu_Item]);}
|
||||
code0 {o->image(pixmap[ID_Menu_Item]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Menu_Bar"}
|
||||
callback type_make_cb
|
||||
tooltip {Menu Bar} xywh {450 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Menu_Bar]);}
|
||||
code0 {o->image(pixmap[ID_Menu_Bar]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Menu_Button"}
|
||||
callback type_make_cb
|
||||
tooltip {Menu Button} xywh {400 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Menu_Button]);}
|
||||
code0 {o->image(pixmap[ID_Menu_Button]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"checkmenuitem"}
|
||||
callback type_make_cb
|
||||
tooltip {Checkbox Menu Item} xywh {425 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Checkbox_Menu_Item]);}
|
||||
code0 {o->image(pixmap[ID_Checkbox_Menu_Item]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"submenu"}
|
||||
callback type_make_cb
|
||||
tooltip {Sub Menu} xywh {450 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Submenu]);}
|
||||
code0 {o->image(pixmap[ID_Submenu]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Choice"}
|
||||
callback type_make_cb
|
||||
tooltip Choice xywh {400 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Choice]);}
|
||||
code0 {o->image(pixmap[ID_Choice]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"radiomenuitem"}
|
||||
callback type_make_cb
|
||||
tooltip {Radio Menu Item} xywh {425 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Radio_Menu_Item]);}
|
||||
code0 {o->image(pixmap[ID_Radio_Menu_Item]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
}
|
||||
|
@ -908,42 +914,42 @@ else
|
|||
user_data {"Fl_Browser"}
|
||||
callback type_make_cb
|
||||
tooltip Browser xywh {484 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Browser]);}
|
||||
code0 {o->image(pixmap[ID_Browser]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Tree"}
|
||||
callback type_make_cb
|
||||
tooltip Tree xywh {509 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Tree]);}
|
||||
code0 {o->image(pixmap[ID_Tree]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Check_Browser"}
|
||||
callback type_make_cb
|
||||
tooltip {Check Browser} xywh {484 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Check_Browser]);}
|
||||
code0 {o->image(pixmap[ID_Check_Browser]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Help_View"}
|
||||
callback type_make_cb
|
||||
tooltip {Help Browser} xywh {509 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Help_View]);}
|
||||
code0 {o->image(pixmap[ID_Help_View]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_File_Browser"}
|
||||
callback type_make_cb
|
||||
tooltip {File Browser} xywh {484 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_File_Browser]);}
|
||||
code0 {o->image(pixmap[ID_File_Browser]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Table"}
|
||||
callback type_make_cb
|
||||
tooltip Table xywh {509 71 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Table]);}
|
||||
code0 {o->image(pixmap[ID_Table]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
}
|
||||
|
@ -955,21 +961,21 @@ else
|
|||
user_data {"Fl_Box"}
|
||||
callback type_make_cb
|
||||
tooltip Box xywh {542 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Box]);}
|
||||
code0 {o->image(pixmap[ID_Box]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Clock"}
|
||||
callback type_make_cb
|
||||
tooltip Clock xywh {567 21 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Clock]);}
|
||||
code0 {o->image(pixmap[ID_Clock]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Progress"}
|
||||
callback type_make_cb
|
||||
tooltip Progress xywh {542 46 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[Fl_Type::ID_Progress]);}
|
||||
code0 {o->image(pixmap[ID_Progress]);}
|
||||
class Widget_Bin_Button
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,6 +82,7 @@
|
|||
#include "pixmaps/flCheckMenuitem.xpm"
|
||||
#include "pixmaps/flRadioMenuitem.xpm"
|
||||
#include "pixmaps/flFlex.xpm"
|
||||
#include "pixmaps/flGrid.xpm"
|
||||
|
||||
Fl_Pixmap *bind_pixmap;
|
||||
Fl_Pixmap *lock_pixmap;
|
||||
|
@ -89,7 +90,7 @@ Fl_Pixmap *protected_pixmap;
|
|||
Fl_Pixmap *invisible_pixmap;
|
||||
Fl_Pixmap *compressed_pixmap;
|
||||
|
||||
Fl_Pixmap *pixmap[Fl_Type::ID_Max_] = { NULL };
|
||||
Fl_Pixmap *pixmap[ID_Max_] = { NULL };
|
||||
|
||||
/**
|
||||
Draw a zoom cross pointing in all four diagonal directions
|
||||
|
@ -151,73 +152,74 @@ void loadPixmaps()
|
|||
invisible_pixmap = new Fl_Pixmap(invisible_xpm); invisible_pixmap->scale(16, 16);
|
||||
compressed_pixmap = new Fl_Pixmap(compressed_xpm); compressed_pixmap->scale(16, 16);
|
||||
|
||||
pixmap[Fl_Type::ID_Window] = tmp = new Fl_Pixmap(flWindow_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Button] = tmp = new Fl_Pixmap(flButton_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Check_Button] = tmp = new Fl_Pixmap(flCheckButton_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Round_Button] = tmp = new Fl_Pixmap(flRoundButton_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Window] = tmp = new Fl_Pixmap(flWindow_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Button] = tmp = new Fl_Pixmap(flButton_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Check_Button] = tmp = new Fl_Pixmap(flCheckButton_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Round_Button] = tmp = new Fl_Pixmap(flRoundButton_xpm); tmp->scale(16, 16);
|
||||
|
||||
pixmap[Fl_Type::ID_Box] = tmp = new Fl_Pixmap(flBox_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Group] = tmp = new Fl_Pixmap(flGroup_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Function] = tmp = new Fl_Pixmap(flFunction_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Code] = tmp = new Fl_Pixmap(flCode_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_CodeBlock] = tmp = new Fl_Pixmap(flCodeBlock_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Decl] = tmp = new Fl_Pixmap(flDeclaration_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Box] = tmp = new Fl_Pixmap(flBox_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Group] = tmp = new Fl_Pixmap(flGroup_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Function] = tmp = new Fl_Pixmap(flFunction_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Code] = tmp = new Fl_Pixmap(flCode_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_CodeBlock] = tmp = new Fl_Pixmap(flCodeBlock_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Decl] = tmp = new Fl_Pixmap(flDeclaration_xpm); tmp->scale(16, 16);
|
||||
|
||||
pixmap[Fl_Type::ID_DeclBlock] = tmp = new Fl_Pixmap(flDeclarationBlock_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Class] = tmp = new Fl_Pixmap(flClass_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Tabs] = tmp = new Fl_Pixmap(flTabs_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Input] = tmp = new Fl_Pixmap(flInput_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Choice] = tmp = new Fl_Pixmap(flChoice_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_DeclBlock] = tmp = new Fl_Pixmap(flDeclarationBlock_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Class] = tmp = new Fl_Pixmap(flClass_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Tabs] = tmp = new Fl_Pixmap(flTabs_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Input] = tmp = new Fl_Pixmap(flInput_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Choice] = tmp = new Fl_Pixmap(flChoice_xpm); tmp->scale(16, 16);
|
||||
|
||||
pixmap[Fl_Type::ID_Menu_Item] = tmp = new Fl_Pixmap(flMenuitem_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Menu_Bar] = tmp = new Fl_Pixmap(flMenubar_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Submenu] = tmp = new Fl_Pixmap(flSubmenu_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Scroll] = tmp = new Fl_Pixmap(flScroll_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Tile] = tmp = new Fl_Pixmap(flTile_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Wizard] = tmp = new Fl_Pixmap(flWizard_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Menu_Item] = tmp = new Fl_Pixmap(flMenuitem_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Menu_Bar] = tmp = new Fl_Pixmap(flMenubar_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Submenu] = tmp = new Fl_Pixmap(flSubmenu_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Scroll] = tmp = new Fl_Pixmap(flScroll_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Tile] = tmp = new Fl_Pixmap(flTile_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Wizard] = tmp = new Fl_Pixmap(flWizard_xpm); tmp->scale(16, 16);
|
||||
|
||||
pixmap[Fl_Type::ID_Pack] = tmp = new Fl_Pixmap(flPack_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Return_Button] = tmp = new Fl_Pixmap(flReturnButton_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Light_Button] = tmp = new Fl_Pixmap(flLightButton_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Repeat_Button] = tmp = new Fl_Pixmap(flRepeatButton_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Menu_Button] = tmp = new Fl_Pixmap(flMenuButton_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Pack] = tmp = new Fl_Pixmap(flPack_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Return_Button] = tmp = new Fl_Pixmap(flReturnButton_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Light_Button] = tmp = new Fl_Pixmap(flLightButton_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Repeat_Button] = tmp = new Fl_Pixmap(flRepeatButton_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Menu_Button] = tmp = new Fl_Pixmap(flMenuButton_xpm); tmp->scale(16, 16);
|
||||
|
||||
pixmap[Fl_Type::ID_Output] = tmp = new Fl_Pixmap(flOutput_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Text_Display] = tmp = new Fl_Pixmap(flTextDisplay_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Text_Editor] = tmp = new Fl_Pixmap(flTextEdit_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_File_Input] = tmp = new Fl_Pixmap(flFileInput_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Browser] = tmp = new Fl_Pixmap(flBrowser_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Output] = tmp = new Fl_Pixmap(flOutput_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Text_Display] = tmp = new Fl_Pixmap(flTextDisplay_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Text_Editor] = tmp = new Fl_Pixmap(flTextEdit_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_File_Input] = tmp = new Fl_Pixmap(flFileInput_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Browser] = tmp = new Fl_Pixmap(flBrowser_xpm); tmp->scale(16, 16);
|
||||
|
||||
pixmap[Fl_Type::ID_Check_Browser] = tmp = new Fl_Pixmap(flCheckBrowser_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_File_Browser] = tmp = new Fl_Pixmap(flFileBrowser_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Clock] = tmp = new Fl_Pixmap(flClock_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Help_View] = tmp = new Fl_Pixmap(flHelp_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Progress] = tmp = new Fl_Pixmap(flProgress_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Check_Browser] = tmp = new Fl_Pixmap(flCheckBrowser_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_File_Browser] = tmp = new Fl_Pixmap(flFileBrowser_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Clock] = tmp = new Fl_Pixmap(flClock_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Help_View] = tmp = new Fl_Pixmap(flHelp_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Progress] = tmp = new Fl_Pixmap(flProgress_xpm); tmp->scale(16, 16);
|
||||
|
||||
pixmap[Fl_Type::ID_Slider] = tmp = new Fl_Pixmap(flSlider_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Scrollbar] = tmp = new Fl_Pixmap(flScrollBar_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Value_Slider] = tmp = new Fl_Pixmap(flValueSlider_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Adjuster] = tmp = new Fl_Pixmap(flAdjuster_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Counter] = tmp = new Fl_Pixmap(flCounter_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Slider] = tmp = new Fl_Pixmap(flSlider_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Scrollbar] = tmp = new Fl_Pixmap(flScrollBar_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Value_Slider] = tmp = new Fl_Pixmap(flValueSlider_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Adjuster] = tmp = new Fl_Pixmap(flAdjuster_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Counter] = tmp = new Fl_Pixmap(flCounter_xpm); tmp->scale(16, 16);
|
||||
|
||||
pixmap[Fl_Type::ID_Dial] = tmp = new Fl_Pixmap(flDial_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Roller] = tmp = new Fl_Pixmap(flRoller_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Value_Input] = tmp = new Fl_Pixmap(flValueInput_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Value_Output] = tmp = new Fl_Pixmap(flValueOutput_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Comment] = tmp = new Fl_Pixmap(flComment_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Dial] = tmp = new Fl_Pixmap(flDial_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Roller] = tmp = new Fl_Pixmap(flRoller_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Value_Input] = tmp = new Fl_Pixmap(flValueInput_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Value_Output] = tmp = new Fl_Pixmap(flValueOutput_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Comment] = tmp = new Fl_Pixmap(flComment_xpm); tmp->scale(16, 16);
|
||||
|
||||
pixmap[Fl_Type::ID_Spinner] = tmp = new Fl_Pixmap(flSpinner_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Widget_Class] = tmp = new Fl_Pixmap(flWidgetClass_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Data] = tmp = new Fl_Pixmap(flData_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Tree] = tmp = new Fl_Pixmap(flTree_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Table] = tmp = new Fl_Pixmap(flTable_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Spinner] = tmp = new Fl_Pixmap(flSpinner_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Widget_Class] = tmp = new Fl_Pixmap(flWidgetClass_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Data] = tmp = new Fl_Pixmap(flData_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Tree] = tmp = new Fl_Pixmap(flTree_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Table] = tmp = new Fl_Pixmap(flTable_xpm); tmp->scale(16, 16);
|
||||
|
||||
pixmap[Fl_Type::ID_Simple_Terminal] = tmp = new Fl_Pixmap(flSimpleTerminal_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Input_Choice] = tmp = new Fl_Pixmap(flInputChoice_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Checkbox_Menu_Item] = tmp = new Fl_Pixmap(flCheckMenuitem_xpm); tmp->scale(16, 16);
|
||||
pixmap[Fl_Type::ID_Radio_Menu_Item] = tmp = new Fl_Pixmap(flRadioMenuitem_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Simple_Terminal] = tmp = new Fl_Pixmap(flSimpleTerminal_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Input_Choice] = tmp = new Fl_Pixmap(flInputChoice_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Checkbox_Menu_Item] = tmp = new Fl_Pixmap(flCheckMenuitem_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Radio_Menu_Item] = tmp = new Fl_Pixmap(flRadioMenuitem_xpm); tmp->scale(16, 16);
|
||||
|
||||
pixmap[Fl_Type::ID_Flex] = tmp = new Fl_Pixmap(flFlex_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Flex] = tmp = new Fl_Pixmap(flFlex_xpm); tmp->scale(16, 16);
|
||||
pixmap[ID_Grid] = tmp = new Fl_Pixmap(flGrid_xpm); tmp->scale(16, 16);
|
||||
|
||||
fl_add_symbol("fd_zoom", fd_zoom, 1);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/* XPM */
|
||||
static const char * const flGrid_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 6 1",
|
||||
/* colors */
|
||||
"a c #606060",
|
||||
"b c #2020ff",
|
||||
"c c none",
|
||||
"d c #dddddd",
|
||||
"e c #8080ff",
|
||||
"f c #000000",
|
||||
/* pixels */
|
||||
"cccccccccccccccccccccccccccccccc",
|
||||
"cccccccccccccccccccccccccccccccc",
|
||||
"cccccccccccccccccccccccccccccccc",
|
||||
"cccccccccccccccccccccccccccccccc",
|
||||
"cccccccccccccccccccccccccccccccc",
|
||||
"ffffffffffffffffffffffffffffffcc",
|
||||
"ffffffffffffffffffffffffffffffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffffffffffffffffffffffffffffffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffffffffffffffffffffffffffffffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffddddddddfddddddddfddddddddffcc",
|
||||
"ffffffffffffffffffffffffffffffcc",
|
||||
"ffffffffffffffffffffffffffffffcc",
|
||||
"cccccccccccccccccccccccccccccccc",
|
||||
"cccccccccccccccccccccccccccccccc",
|
||||
"cccccccccccccccccccccccccccccccc",
|
||||
"cccccccccccccccccccccccccccccccc"
|
||||
};
|
|
@ -345,11 +345,11 @@ void Widget_Browser::item_draw(void *v, int X, int Y, int, int) const {
|
|||
}
|
||||
|
||||
if ( l->is_widget()
|
||||
&& !l->is_a(Fl_Type::ID_Window)
|
||||
&& !l->is_a(ID_Window)
|
||||
&& ((Fl_Widget_Type*)l)->o
|
||||
&& !((Fl_Widget_Type*)l)->o->visible()
|
||||
&& (!l->parent || ( !l->parent->is_a(Fl_Type::ID_Tabs)
|
||||
&& !l->parent->is_a(Fl_Type::ID_Wizard) ) )
|
||||
&& (!l->parent || ( !l->parent->is_a(ID_Tabs)
|
||||
&& !l->parent->is_a(ID_Wizard) ) )
|
||||
)
|
||||
{
|
||||
invisible_pixmap->draw(X - 17, Y);
|
||||
|
|
|
@ -394,7 +394,8 @@ sized to fit the container.");
|
|||
} // Fl_Box* o
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
{ Fl_Group* o = new Fl_Group(95, 150, 314, 20, "Flex Parent:");
|
||||
{ // This group is only visible if the parent is an Fl_Flex widget
|
||||
Fl_Group* o = new Fl_Group(95, 150, 314, 20, "Flex Parent:");
|
||||
o->labelfont(1);
|
||||
o->labelsize(11);
|
||||
o->callback((Fl_Callback*)flex_size_group_cb);
|
||||
|
@ -464,7 +465,8 @@ sized to fit the container.");
|
|||
} // Fl_Box* o
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
{ Fl_Group* o = new Fl_Group(95, 185, 300, 20, "Margins:");
|
||||
{ // This group is only visible for Fl_Flex widgets
|
||||
Fl_Group* o = new Fl_Group(95, 185, 300, 20, "Margins:");
|
||||
o->labelfont(1);
|
||||
o->labelsize(11);
|
||||
o->callback((Fl_Callback*)flex_margin_group_cb);
|
||||
|
@ -510,6 +512,100 @@ sized to fit the container.");
|
|||
} // Fl_Box* o
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
{ // This group is only visible for Fl_Grid widgets
|
||||
Fl_Group* o = new Fl_Group(95, 185, 300, 55, "Grid Margins:\n\n\nLayout:");
|
||||
o->labelfont(1);
|
||||
o->labelsize(11);
|
||||
o->callback((Fl_Callback*)grid_margin_group_cb);
|
||||
o->align(Fl_Align(FL_ALIGN_LEFT));
|
||||
o->hide();
|
||||
{ Fl_Value_Input* o = new Fl_Value_Input(95, 185, 45, 20, "Left:");
|
||||
o->tooltip("Left margin in group.");
|
||||
o->labelsize(11);
|
||||
o->maximum(1000);
|
||||
o->step(1);
|
||||
o->textsize(11);
|
||||
o->callback((Fl_Callback*)grid_margin_left_cb);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
|
||||
} // Fl_Value_Input* o
|
||||
{ Fl_Value_Input* o = new Fl_Value_Input(144, 185, 45, 20, "Top:");
|
||||
o->tooltip("Top margin in group.");
|
||||
o->labelsize(11);
|
||||
o->maximum(1000);
|
||||
o->step(1);
|
||||
o->textsize(11);
|
||||
o->callback((Fl_Callback*)grid_margin_top_cb);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
|
||||
} // Fl_Value_Input* o
|
||||
{ Fl_Value_Input* o = new Fl_Value_Input(193, 185, 45, 20, "Right:");
|
||||
o->tooltip("Right margin in group.");
|
||||
o->labelsize(11);
|
||||
o->maximum(1000);
|
||||
o->step(1);
|
||||
o->textsize(11);
|
||||
o->callback((Fl_Callback*)grid_margin_right_cb);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
|
||||
} // Fl_Value_Input* o
|
||||
{ Fl_Value_Input* o = new Fl_Value_Input(242, 185, 45, 20, "Bottom:");
|
||||
o->tooltip("Bottom margin in group.");
|
||||
o->labelsize(11);
|
||||
o->maximum(1000);
|
||||
o->step(1);
|
||||
o->textsize(11);
|
||||
o->callback((Fl_Callback*)grid_margin_bottom_cb);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
|
||||
} // Fl_Value_Input* o
|
||||
{ Fl_Value_Input* o = new Fl_Value_Input(291, 185, 45, 20, "RowGap:");
|
||||
o->tooltip("Gap between children.");
|
||||
o->labelsize(11);
|
||||
o->maximum(1000);
|
||||
o->step(1);
|
||||
o->textsize(11);
|
||||
o->callback((Fl_Callback*)grid_row_gap_cb);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
|
||||
} // Fl_Value_Input* o
|
||||
{ Fl_Value_Input* o = new Fl_Value_Input(340, 185, 45, 20, "ColGap:");
|
||||
o->tooltip("Gap between children.");
|
||||
o->labelsize(11);
|
||||
o->maximum(1000);
|
||||
o->step(1);
|
||||
o->textsize(11);
|
||||
o->callback((Fl_Callback*)grid_col_gap_cb);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
|
||||
} // Fl_Value_Input* o
|
||||
{ Fl_Box* o = new Fl_Box(395, 185, 0, 20);
|
||||
Fl_Group::current()->resizable(o);
|
||||
} // Fl_Box* o
|
||||
{ Fluid_Coord_Input* o = new Fluid_Coord_Input(95, 220, 55, 20, "Rows:");
|
||||
o->tooltip("Number of horizontal rows in the Grid group");
|
||||
o->box(FL_DOWN_BOX);
|
||||
o->color(FL_BACKGROUND2_COLOR);
|
||||
o->selection_color(FL_SELECTION_COLOR);
|
||||
o->labeltype(FL_NORMAL_LABEL);
|
||||
o->labelfont(0);
|
||||
o->labelsize(11);
|
||||
o->labelcolor(FL_FOREGROUND_COLOR);
|
||||
o->textsize(11);
|
||||
o->callback((Fl_Callback*)grid_rows_cb);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
} // Fluid_Coord_Input* o
|
||||
{ Fluid_Coord_Input* o = new Fluid_Coord_Input(154, 220, 55, 20, "Columns:");
|
||||
o->tooltip("Number of vertical columns in the Grid group");
|
||||
o->box(FL_DOWN_BOX);
|
||||
o->color(FL_BACKGROUND2_COLOR);
|
||||
o->selection_color(FL_SELECTION_COLOR);
|
||||
o->labeltype(FL_NORMAL_LABEL);
|
||||
o->labelfont(0);
|
||||
o->labelsize(11);
|
||||
o->labelcolor(FL_FOREGROUND_COLOR);
|
||||
o->textsize(11);
|
||||
o->callback((Fl_Callback*)grid_cols_cb);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT));
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
} // Fluid_Coord_Input* o
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
{ Fl_Group* o = new Fl_Group(95, 185, 300, 20, "Size Range:");
|
||||
o->labelfont(1);
|
||||
o->labelsize(11);
|
||||
|
|
|
@ -284,7 +284,7 @@ or compressed in the original file format} xywh {364 90 20 20} type Toggle
|
|||
}
|
||||
Fl_Group {} {
|
||||
label {Position:}
|
||||
callback position_group_cb open
|
||||
callback position_group_cb
|
||||
xywh {95 150 314 20} labelfont 1 labelsize 11 align 4
|
||||
} {
|
||||
Fl_Input widget_x_input {
|
||||
|
@ -343,7 +343,8 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
|
|||
}
|
||||
Fl_Group {} {
|
||||
label {Flex Parent:}
|
||||
callback flex_size_group_cb open
|
||||
callback flex_size_group_cb
|
||||
comment {This group is only visible if the parent is an Fl_Flex widget}
|
||||
xywh {95 150 314 20} labelfont 1 labelsize 11 align 4 hide
|
||||
} {
|
||||
Fl_Value_Input widget_flex_size {
|
||||
|
@ -396,7 +397,8 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
|
|||
}
|
||||
Fl_Group {} {
|
||||
label {Margins:}
|
||||
callback flex_margin_group_cb open
|
||||
callback flex_margin_group_cb
|
||||
comment {This group is only visible for Fl_Flex widgets}
|
||||
xywh {95 185 300 20} labelfont 1 labelsize 11 align 4 hide
|
||||
} {
|
||||
Fl_Value_Input {} {
|
||||
|
@ -428,6 +430,61 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
|
|||
xywh {395 185 0 20} resizable
|
||||
}
|
||||
}
|
||||
Fl_Group {} {
|
||||
label {Grid Margins:
|
||||
|
||||
|
||||
Layout:}
|
||||
callback grid_margin_group_cb
|
||||
comment {This group is only visible for Fl_Grid widgets} open
|
||||
xywh {95 185 300 55} labelfont 1 labelsize 11 align 4 hide
|
||||
} {
|
||||
Fl_Value_Input {} {
|
||||
label {Left:}
|
||||
callback grid_margin_left_cb
|
||||
tooltip {Left margin in group.} xywh {95 185 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11
|
||||
}
|
||||
Fl_Value_Input {} {
|
||||
label {Top:}
|
||||
callback grid_margin_top_cb
|
||||
tooltip {Top margin in group.} xywh {144 185 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11
|
||||
}
|
||||
Fl_Value_Input {} {
|
||||
label {Right:}
|
||||
callback grid_margin_right_cb
|
||||
tooltip {Right margin in group.} xywh {193 185 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11
|
||||
}
|
||||
Fl_Value_Input {} {
|
||||
label {Bottom:}
|
||||
callback grid_margin_bottom_cb
|
||||
tooltip {Bottom margin in group.} xywh {242 185 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11
|
||||
}
|
||||
Fl_Value_Input {} {
|
||||
label {RowGap:}
|
||||
callback grid_row_gap_cb
|
||||
tooltip {Gap between children.} xywh {291 185 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11
|
||||
}
|
||||
Fl_Value_Input {} {
|
||||
label {ColGap:}
|
||||
callback grid_col_gap_cb
|
||||
tooltip {Gap between children.} xywh {340 185 45 20} labelsize 11 align 5 maximum 1000 step 1 textsize 11
|
||||
}
|
||||
Fl_Box {} {
|
||||
xywh {395 185 0 20} resizable
|
||||
}
|
||||
Fl_Input {} {
|
||||
label {Rows:}
|
||||
callback grid_rows_cb
|
||||
tooltip {Number of horizontal rows in the Grid group} xywh {95 220 55 20} labelsize 11 align 5 textsize 11
|
||||
class Fluid_Coord_Input
|
||||
}
|
||||
Fl_Input {} {
|
||||
label {Columns:}
|
||||
callback grid_cols_cb
|
||||
tooltip {Number of vertical columns in the Grid group} xywh {154 220 55 20} labelsize 11 align 5 textsize 11
|
||||
class Fluid_Coord_Input
|
||||
}
|
||||
}
|
||||
Fl_Group {} {
|
||||
label {Size Range:}
|
||||
callback size_range_group_cb open
|
||||
|
@ -467,7 +524,7 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
|
|||
}
|
||||
Fl_Group {} {
|
||||
label {Shortcut:}
|
||||
callback propagate_load open
|
||||
callback propagate_load
|
||||
xywh {95 210 310 20} labelfont 1 labelsize 11 align 4
|
||||
} {
|
||||
Fl_Button {} {
|
||||
|
@ -481,7 +538,7 @@ Use 'Backspace' key to clear.} xywh {95 210 310 20} box DOWN_BOX color 7 selecti
|
|||
}
|
||||
Fl_Group {} {
|
||||
label {X Class:}
|
||||
callback propagate_load open
|
||||
callback propagate_load
|
||||
xywh {95 235 300 20} labelfont 1 labelsize 11 align 4
|
||||
} {
|
||||
Fl_Input {} {
|
||||
|
|
|
@ -72,6 +72,15 @@ extern void flex_margin_top_cb(Fl_Value_Input*, void*);
|
|||
extern void flex_margin_right_cb(Fl_Value_Input*, void*);
|
||||
extern void flex_margin_bottom_cb(Fl_Value_Input*, void*);
|
||||
extern void flex_margin_gap_cb(Fl_Value_Input*, void*);
|
||||
extern void grid_margin_group_cb(Fl_Group*, void*);
|
||||
extern void grid_margin_left_cb(Fl_Value_Input*, void*);
|
||||
extern void grid_margin_top_cb(Fl_Value_Input*, void*);
|
||||
extern void grid_margin_right_cb(Fl_Value_Input*, void*);
|
||||
extern void grid_margin_bottom_cb(Fl_Value_Input*, void*);
|
||||
extern void grid_row_gap_cb(Fl_Value_Input*, void*);
|
||||
extern void grid_col_gap_cb(Fl_Value_Input*, void*);
|
||||
extern void grid_rows_cb(Fluid_Coord_Input*, void*);
|
||||
extern void grid_cols_cb(Fluid_Coord_Input*, void*);
|
||||
extern void size_range_group_cb(Fl_Group*, void*);
|
||||
extern void min_w_cb(Fl_Value_Input*, void*);
|
||||
extern void min_h_cb(Fl_Value_Input*, void*);
|
||||
|
|
|
@ -641,6 +641,31 @@ void Fl_Grid::margin(int left, int top, int right, int bottom) {
|
|||
need_layout(1);
|
||||
}
|
||||
|
||||
/**
|
||||
Returns all outside margin sizes of the grid.
|
||||
|
||||
All margin sizes are returned in the given arguments. If any argument
|
||||
is \p NULL the respective value is not returned.
|
||||
|
||||
\param[out] left returns left margin if not \p NULL
|
||||
\param[out] top returns top margin if not \p NULL
|
||||
\param[out] right returns right margin if not \p NULL
|
||||
\param[out] bottom returns bottom margin if not \p NULL
|
||||
|
||||
\return whether all margins are equal
|
||||
\retval 1 all margins have the same size
|
||||
\retval 0 at least one margin has a different size
|
||||
*/
|
||||
int Fl_Grid::margin(int *left, int *top, int *right, int *bottom) const {
|
||||
if (left) *left = margin_left_;
|
||||
if (top) *top = margin_top_;
|
||||
if (right) *right = margin_right_;
|
||||
if (bottom) *bottom = margin_bottom_;
|
||||
if (margin_left_ == margin_top_ && margin_top_ == margin_right_ && margin_right_ == margin_bottom_)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
Set default gaps for rows and columns.
|
||||
|
||||
|
@ -669,6 +694,19 @@ void Fl_Grid::gap(int row_gap, int col_gap) {
|
|||
need_layout(1);
|
||||
}
|
||||
|
||||
/**
|
||||
Get the default gaps for rows and columns.
|
||||
|
||||
\param[out] row_gap pointer to int to receive column gap, may be NULL
|
||||
\param[out] col_gap pointer to int to receive column gap, may be NULL
|
||||
*/
|
||||
void Fl_Grid::gap(int *row_gap, int *col_gap) const {
|
||||
if (row_gap)
|
||||
*row_gap = gap_row_;
|
||||
if (col_gap)
|
||||
*col_gap = gap_col_;
|
||||
}
|
||||
|
||||
/**
|
||||
Get the grid cell of row \p row and column \p col.
|
||||
|
||||
|
|
Loading…
Reference in New Issue