- Moving or resizing widgets in FLUID didn't always update the
widget panel (STR #600) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3902 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
7a2e635a8e
commit
696e2d3219
2
CHANGES
2
CHANGES
@ -1,5 +1,7 @@
|
||||
CHANGES IN FLTK 1.1.6
|
||||
|
||||
- Moving or resizing widgets in FLUID didn't always
|
||||
update the widget panel (STR #600)
|
||||
- FLTK windows could appear off-screen on X11 (STR #586)
|
||||
- The configure script did not support
|
||||
--disable-localfoo to completely disable image file
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Window_Type.cxx,v 1.13.2.10.2.9 2004/04/11 04:38:56 easysw Exp $"
|
||||
// "$Id: Fl_Window_Type.cxx,v 1.13.2.10.2.10 2004/11/20 15:42:24 easysw Exp $"
|
||||
//
|
||||
// Window type code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -527,6 +527,16 @@ extern void fix_group_size(Fl_Type *t);
|
||||
extern Fl_Menu_Item Main_Menu[];
|
||||
extern Fl_Menu_Item New_Menu[];
|
||||
|
||||
// Update the XYWH values in the widget panel...
|
||||
static void update_xywh() {
|
||||
if (current_widget && current_widget->is_widget()) {
|
||||
widget_x_input->value(((Fl_Widget_Type *)current_widget)->o->x());
|
||||
widget_y_input->value(((Fl_Widget_Type *)current_widget)->o->y());
|
||||
widget_w_input->value(((Fl_Widget_Type *)current_widget)->o->w());
|
||||
widget_h_input->value(((Fl_Widget_Type *)current_widget)->o->h());
|
||||
}
|
||||
}
|
||||
|
||||
// move the selected children according to current dx,dy,drag state:
|
||||
void Fl_Window_Type::moveallchildren()
|
||||
{
|
||||
@ -558,6 +568,8 @@ void Fl_Window_Type::moveallchildren()
|
||||
((Overlay_Window *)(this->o))->redraw_overlay();
|
||||
modflag = 1;
|
||||
dx = dy = 0;
|
||||
|
||||
update_xywh();
|
||||
}
|
||||
|
||||
int Fl_Window_Type::handle(int event) {
|
||||
@ -795,5 +807,5 @@ int Fl_Window_Type::read_fdesign(const char* propname, const char* value) {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Window_Type.cxx,v 1.13.2.10.2.9 2004/04/11 04:38:56 easysw Exp $".
|
||||
// End of "$Id: Fl_Window_Type.cxx,v 1.13.2.10.2.10 2004/11/20 15:42:24 easysw Exp $".
|
||||
//
|
||||
|
@ -1,4 +1,4 @@
|
||||
// generated by Fast Light User Interface Designer (fluid) version 1.0104
|
||||
// generated by Fast Light User Interface Designer (fluid) version 1.0106
|
||||
|
||||
#include "widget_panel.h"
|
||||
|
||||
@ -6,6 +6,14 @@ static void cb_(Fl_Tabs* o, void* v) {
|
||||
propagate_load((Fl_Group *)o,v);
|
||||
}
|
||||
|
||||
Fl_Value_Input *widget_x_input=(Fl_Value_Input *)0;
|
||||
|
||||
Fl_Value_Input *widget_y_input=(Fl_Value_Input *)0;
|
||||
|
||||
Fl_Value_Input *widget_w_input=(Fl_Value_Input *)0;
|
||||
|
||||
Fl_Value_Input *widget_h_input=(Fl_Value_Input *)0;
|
||||
|
||||
Fl_Input *v_input[4]={(Fl_Input *)0};
|
||||
|
||||
Fl_Double_Window* make_widget_panel() {
|
||||
@ -89,31 +97,31 @@ Fl_Double_Window* make_widget_panel() {
|
||||
{ Fl_Button* o = new Fl_Button(295, 115, 20, 20, "@-1<-");
|
||||
o->tooltip("Left-align the label.");
|
||||
o->type(1);
|
||||
o->labelcolor(8);
|
||||
o->labelcolor(FL_INACTIVE_COLOR);
|
||||
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_LEFT));
|
||||
}
|
||||
{ Fl_Button* o = new Fl_Button(315, 115, 20, 20, "@-1->");
|
||||
o->tooltip("Right-align the label.");
|
||||
o->type(1);
|
||||
o->labelcolor(8);
|
||||
o->labelcolor(FL_INACTIVE_COLOR);
|
||||
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_RIGHT));
|
||||
}
|
||||
{ Fl_Button* o = new Fl_Button(335, 115, 20, 20, "@-18");
|
||||
o->tooltip("Top-align the label.");
|
||||
o->type(1);
|
||||
o->labelcolor(8);
|
||||
o->labelcolor(FL_INACTIVE_COLOR);
|
||||
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_TOP));
|
||||
}
|
||||
{ Fl_Button* o = new Fl_Button(355, 115, 20, 20, "@-12");
|
||||
o->tooltip("Bottom-align the label.");
|
||||
o->type(1);
|
||||
o->labelcolor(8);
|
||||
o->labelcolor(FL_INACTIVE_COLOR);
|
||||
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_BOTTOM));
|
||||
}
|
||||
{ Fl_Button* o = new Fl_Button(375, 115, 20, 20, "@-3square");
|
||||
o->tooltip("Show the label inside the widget.");
|
||||
o->type(1);
|
||||
o->labelcolor(8);
|
||||
o->labelcolor(FL_INACTIVE_COLOR);
|
||||
o->callback((Fl_Callback*)align_cb, (void*)(FL_ALIGN_INSIDE));
|
||||
}
|
||||
{ Fl_Box* o = new Fl_Box(256, 116, 20, 20);
|
||||
@ -121,7 +129,7 @@ Fl_Double_Window* make_widget_panel() {
|
||||
}
|
||||
o->end();
|
||||
}
|
||||
{ Fl_Value_Input* o = new Fl_Value_Input(95, 150, 60, 20, "X:");
|
||||
{ Fl_Value_Input* o = widget_x_input = new Fl_Value_Input(95, 150, 60, 20, "X:");
|
||||
o->tooltip("The X position of the widget.");
|
||||
o->labelsize(10);
|
||||
o->maximum(2048);
|
||||
@ -132,7 +140,7 @@ Fl_Double_Window* make_widget_panel() {
|
||||
{ Fl_Box* o = new Fl_Box(95, 150, 0, 20, "Position:");
|
||||
o->align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE);
|
||||
}
|
||||
{ Fl_Value_Input* o = new Fl_Value_Input(155, 150, 60, 20, "Y:");
|
||||
{ Fl_Value_Input* o = widget_y_input = new Fl_Value_Input(155, 150, 60, 20, "Y:");
|
||||
o->tooltip("The Y position of the widget.");
|
||||
o->labelsize(10);
|
||||
o->maximum(2048);
|
||||
@ -140,7 +148,7 @@ Fl_Double_Window* make_widget_panel() {
|
||||
o->callback((Fl_Callback*)y_cb);
|
||||
o->align(FL_ALIGN_TOP_LEFT);
|
||||
}
|
||||
{ Fl_Value_Input* o = new Fl_Value_Input(215, 150, 60, 20, "Width:");
|
||||
{ Fl_Value_Input* o = widget_w_input = new Fl_Value_Input(215, 150, 60, 20, "Width:");
|
||||
o->tooltip("The width of the widget.");
|
||||
o->labelsize(10);
|
||||
o->maximum(2048);
|
||||
@ -148,7 +156,7 @@ Fl_Double_Window* make_widget_panel() {
|
||||
o->callback((Fl_Callback*)w_cb);
|
||||
o->align(FL_ALIGN_TOP_LEFT);
|
||||
}
|
||||
{ Fl_Value_Input* o = new Fl_Value_Input(275, 150, 60, 20, "Height:");
|
||||
{ Fl_Value_Input* o = widget_h_input = new Fl_Value_Input(275, 150, 60, 20, "Height:");
|
||||
o->tooltip("The height of the widget.");
|
||||
o->labelsize(10);
|
||||
o->maximum(2048);
|
||||
@ -194,12 +202,12 @@ Fl_Double_Window* make_widget_panel() {
|
||||
{ Shortcut_Button* o = new Shortcut_Button(95, 210, 300, 20, "Shortcut:");
|
||||
o->tooltip("The shortcut key for the widget.");
|
||||
o->box(FL_DOWN_BOX);
|
||||
o->color(7);
|
||||
o->selection_color(7);
|
||||
o->color(FL_BACKGROUND2_COLOR);
|
||||
o->selection_color(FL_BACKGROUND2_COLOR);
|
||||
o->labeltype(FL_NORMAL_LABEL);
|
||||
o->labelfont(0);
|
||||
o->labelsize(14);
|
||||
o->labelcolor(56);
|
||||
o->labelcolor(FL_BLACK);
|
||||
o->callback((Fl_Callback*)shortcut_in_cb);
|
||||
o->align(FL_ALIGN_LEFT);
|
||||
o->when(FL_WHEN_RELEASE);
|
||||
@ -213,19 +221,19 @@ Fl_Double_Window* make_widget_panel() {
|
||||
}
|
||||
{ Fl_Light_Button* o = new Fl_Light_Button(210, 235, 60, 20, "Border");
|
||||
o->tooltip("Add a border around the window.");
|
||||
o->selection_color(1);
|
||||
o->selection_color((Fl_Color)1);
|
||||
o->labelsize(10);
|
||||
o->callback((Fl_Callback*)border_cb);
|
||||
}
|
||||
{ Fl_Light_Button* o = new Fl_Light_Button(270, 235, 55, 20, "Modal");
|
||||
o->tooltip("Make the window modal.");
|
||||
o->selection_color(1);
|
||||
o->selection_color((Fl_Color)1);
|
||||
o->labelsize(10);
|
||||
o->callback((Fl_Callback*)modal_cb);
|
||||
}
|
||||
{ Fl_Light_Button* o = new Fl_Light_Button(325, 235, 70, 20, "Nonmodal");
|
||||
o->tooltip("Make the window non-modal.");
|
||||
o->selection_color(1);
|
||||
o->selection_color((Fl_Color)1);
|
||||
o->labelsize(9);
|
||||
o->callback((Fl_Callback*)non_modal_cb);
|
||||
o->align(132|FL_ALIGN_INSIDE);
|
||||
@ -236,7 +244,7 @@ Fl_Double_Window* make_widget_panel() {
|
||||
o->callback((Fl_Callback*)propagate_load);
|
||||
{ Fl_Light_Button* o = new Fl_Light_Button(95, 260, 70, 20, "Visible");
|
||||
o->tooltip("Show the widget.");
|
||||
o->selection_color(1);
|
||||
o->selection_color((Fl_Color)1);
|
||||
o->labelsize(10);
|
||||
o->callback((Fl_Callback*)visible_cb);
|
||||
}
|
||||
@ -245,20 +253,20 @@ Fl_Double_Window* make_widget_panel() {
|
||||
}
|
||||
{ Fl_Light_Button* o = new Fl_Light_Button(165, 260, 70, 20, "Active");
|
||||
o->tooltip("Activate the widget.");
|
||||
o->selection_color(1);
|
||||
o->selection_color((Fl_Color)1);
|
||||
o->labelsize(10);
|
||||
o->callback((Fl_Callback*)active_cb);
|
||||
}
|
||||
{ Fl_Light_Button* o = new Fl_Light_Button(235, 260, 70, 20, "Resizable");
|
||||
o->tooltip("Make the widget resizable.");
|
||||
o->selection_color(1);
|
||||
o->selection_color((Fl_Color)1);
|
||||
o->labelsize(10);
|
||||
o->callback((Fl_Callback*)resizable_cb);
|
||||
o->when(FL_WHEN_CHANGED);
|
||||
}
|
||||
{ Fl_Light_Button* o = new Fl_Light_Button(305, 260, 70, 20, "Hotspot");
|
||||
o->tooltip("Center the window under this widget.");
|
||||
o->selection_color(1);
|
||||
o->selection_color((Fl_Color)1);
|
||||
o->labelsize(10);
|
||||
o->callback((Fl_Callback*)hotspot_cb);
|
||||
o->when(FL_WHEN_CHANGED);
|
||||
@ -411,7 +419,7 @@ Fl_Double_Window* make_widget_panel() {
|
||||
}
|
||||
{ Fl_Light_Button* o = new Fl_Light_Button(330, 65, 65, 20, "public");
|
||||
o->tooltip("Make the widget publicly accessible.");
|
||||
o->selection_color(1);
|
||||
o->selection_color((Fl_Color)1);
|
||||
o->labelsize(10);
|
||||
o->callback((Fl_Callback*)name_public_cb);
|
||||
o->when(FL_WHEN_CHANGED);
|
||||
@ -486,7 +494,7 @@ Fl_Double_Window* make_widget_panel() {
|
||||
}
|
||||
{ Fl_Light_Button* o = new Fl_Light_Button(290, 295, 105, 20, "No Change");
|
||||
o->tooltip("Call the callback even if the value has not changed.");
|
||||
o->selection_color(1);
|
||||
o->selection_color((Fl_Color)1);
|
||||
o->labelsize(10);
|
||||
o->callback((Fl_Callback*)when_button_cb);
|
||||
}
|
||||
@ -509,7 +517,7 @@ Fl_Double_Window* make_widget_panel() {
|
||||
}
|
||||
{ Fl_Button* o = new Fl_Button(215, 335, 100, 25, "No &Overlay");
|
||||
o->tooltip("Hide the widget overlay box.");
|
||||
o->labelcolor(1);
|
||||
o->labelcolor((Fl_Color)1);
|
||||
o->callback((Fl_Callback*)overlay_cb);
|
||||
}
|
||||
{ Fl_Button* o = new Fl_Button(155, 335, 80, 25, "Revert");
|
||||
|
@ -1,5 +1,5 @@
|
||||
# data file for the Fltk User Interface Designer (fluid)
|
||||
version 1.0104
|
||||
version 1.0106
|
||||
header_name {.h}
|
||||
code_name {.cxx}
|
||||
Function {make_widget_panel()} {open
|
||||
@ -124,26 +124,26 @@ image}
|
||||
xywh {256 116 20 20} resizable
|
||||
}
|
||||
}
|
||||
Fl_Value_Input {} {
|
||||
Fl_Value_Input widget_x_input {
|
||||
label {X:}
|
||||
callback x_cb
|
||||
callback x_cb selected
|
||||
tooltip {The X position of the widget.} xywh {95 150 60 20} labelsize 10 align 5 maximum 2048 step 1
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Position:}
|
||||
xywh {95 150 0 20} align 24
|
||||
}
|
||||
Fl_Value_Input {} {
|
||||
Fl_Value_Input widget_y_input {
|
||||
label {Y:}
|
||||
callback y_cb
|
||||
tooltip {The Y position of the widget.} xywh {155 150 60 20} labelsize 10 align 5 maximum 2048 step 1
|
||||
}
|
||||
Fl_Value_Input {} {
|
||||
Fl_Value_Input widget_w_input {
|
||||
label {Width:}
|
||||
callback w_cb
|
||||
tooltip {The width of the widget.} xywh {215 150 60 20} labelsize 10 align 5 maximum 2048 step 1
|
||||
}
|
||||
Fl_Value_Input {} {
|
||||
Fl_Value_Input widget_h_input {
|
||||
label {Height:}
|
||||
callback h_cb
|
||||
tooltip {The height of the widget.} xywh {275 150 60 20} labelsize 10 align 5 maximum 2048 step 1
|
||||
@ -470,7 +470,7 @@ image}
|
||||
}
|
||||
Fl_Button {} {
|
||||
label {No &Overlay}
|
||||
callback overlay_cb selected
|
||||
callback overlay_cb
|
||||
tooltip {Hide the widget overlay box.} xywh {215 335 100 25} labelcolor 1
|
||||
}
|
||||
Fl_Button {} {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// generated by Fast Light User Interface Designer (fluid) version 1.0104
|
||||
// generated by Fast Light User Interface Designer (fluid) version 1.0106
|
||||
|
||||
#ifndef widget_panel_h
|
||||
#define widget_panel_h
|
||||
@ -21,9 +21,13 @@ extern void align_cb(Fl_Button*, void*);
|
||||
#include <FL/Fl_Box.H>
|
||||
#include <FL/Fl_Value_Input.H>
|
||||
extern void x_cb(Fl_Value_Input*, void*);
|
||||
extern Fl_Value_Input *widget_x_input;
|
||||
extern void y_cb(Fl_Value_Input*, void*);
|
||||
extern Fl_Value_Input *widget_y_input;
|
||||
extern void w_cb(Fl_Value_Input*, void*);
|
||||
extern Fl_Value_Input *widget_w_input;
|
||||
extern void h_cb(Fl_Value_Input*, void*);
|
||||
extern Fl_Value_Input *widget_h_input;
|
||||
extern void slider_size_cb(Fl_Value_Input*, void*);
|
||||
extern void min_cb(Fl_Value_Input*, void*);
|
||||
extern void max_cb(Fl_Value_Input*, void*);
|
||||
|
Loading…
Reference in New Issue
Block a user