summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2006-09-04 20:01:15 +0000
committerMatthias Melcher <fltk@matthiasm.com>2006-09-04 20:01:15 +0000
commit3ef18e4b7dbbe9d80007b6d110c6f5c44b2024d4 (patch)
treed6a2d4a9164665db80eaa9035d7ad1172d218be8 /fluid
parent84360f49f2087b884902e99279d8c9959cb73874 (diff)
STR 1416: Fluid would not output the correct code for a window's hotspot
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5412 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
-rw-r--r--fluid/Fl_Widget_Type.cxx11
-rw-r--r--fluid/about_panel.cxx32
-rw-r--r--fluid/about_panel.h4
3 files changed, 25 insertions, 22 deletions
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx
index c91e1c311..be4c2d4d7 100644
--- a/fluid/Fl_Widget_Type.cxx
+++ b/fluid/Fl_Widget_Type.cxx
@@ -2196,9 +2196,14 @@ void Fl_Widget_Type::write_widget_code() {
write_c("%s%s->deactivate();\n", indent(), var);
if (!is_group() && resizable())
write_c("%sFl_Group::current()->resizable(%s);\n", indent(), var);
- if (hotspot())
- write_c("%s%s->hotspot(o);\n", indent(),
- is_class() ? "this" : name() ? name() : "w");
+ if (hotspot()) {
+ if (is_class())
+ write_c("%shotspot(%s);\n", indent(), var);
+ else if (is_window())
+ write_c("%s%s->hotspot(%s);\n", indent(), var, var);
+ else
+ write_c("%s%s->window()->hotspot(%s);\n", indent(), var, var);
+ }
}
void Fl_Widget_Type::write_extra_code() {
diff --git a/fluid/about_panel.cxx b/fluid/about_panel.cxx
index fd559c750..1eae20921 100644
--- a/fluid/about_panel.cxx
+++ b/fluid/about_panel.cxx
@@ -25,10 +25,10 @@
// http://www.fltk.org/str.php
//
-// generated by Fast Light User Interface Designer (fluid) version 1.0107
+// generated by Fast Light User Interface Designer (fluid) version 1.0108
#include "about_panel.h"
-void show_help(const char *name);
+void show_help(const char *name);
Fl_Double_Window *about_panel=(Fl_Double_Window *)0;
@@ -271,36 +271,34 @@ static void cb_Close(Fl_Return_Button* o, void*) {
}
Fl_Double_Window* make_about_panel() {
- Fl_Double_Window* w;
- { Fl_Double_Window* o = about_panel = new Fl_Double_Window(315, 175, "About FLUID");
- w = o;
- o->color(FL_LIGHT1);
- o->selection_color(FL_DARK1);
- w->hotspot(o);
+ { about_panel = new Fl_Double_Window(315, 175, "About FLUID");
+ about_panel->color(FL_LIGHT1);
+ about_panel->selection_color(FL_DARK1);
+ about_panel->hotspot(about_panel);
{ Fl_Box* o = new Fl_Box(10, 10, 115, 120);
o->image(image_fluid);
- }
+ } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(135, 10, 170, 69, "FLTK User\nInterface Designer\nVersion 1.1.7");
o->color((Fl_Color)12);
o->selection_color(FL_DARK1);
o->labelfont(1);
o->labelsize(18);
o->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE);
- }
+ } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(135, 89, 170, 42, "Copyright 1998-2006 by\nBill Spitzak and others");
o->align(132|FL_ALIGN_INSIDE);
- }
+ } // Fl_Box* o
{ Fl_Button* o = new Fl_Button(89, 141, 123, 25, "View License...");
o->labelcolor(FL_DARK_BLUE);
o->callback((Fl_Callback*)cb_View);
- }
+ } // Fl_Button* o
{ Fl_Return_Button* o = new Fl_Return_Button(222, 141, 83, 25, "Close");
o->callback((Fl_Callback*)cb_Close);
- }
- o->set_non_modal();
- o->end();
- }
- return w;
+ } // Fl_Return_Button* o
+ about_panel->set_non_modal();
+ about_panel->end();
+ } // Fl_Double_Window* about_panel
+ return about_panel;
}
//
diff --git a/fluid/about_panel.h b/fluid/about_panel.h
index 829d6a1c6..d6dcb7b00 100644
--- a/fluid/about_panel.h
+++ b/fluid/about_panel.h
@@ -25,12 +25,12 @@
// http://www.fltk.org/str.php
//
-// generated by Fast Light User Interface Designer (fluid) version 1.0107
+// generated by Fast Light User Interface Designer (fluid) version 1.0108
#ifndef about_panel_h
#define about_panel_h
#include <FL/Fl.H>
-extern void show_help(const char *name);
+extern void show_help(const char *name);
#include <FL/Fl_Double_Window.H>
extern Fl_Double_Window *about_panel;
#include <FL/Fl_Box.H>