Made the 'align' flags somewhat more typesafe and the associated functions more self explenatory. The large commit results from a new run of Fluid of the Fluid .fl files.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6160 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher
2008-08-15 20:32:01 +00:00
parent 358af515f7
commit 3d6201a610
15 changed files with 224 additions and 226 deletions
+24 -21
View File
@@ -472,47 +472,50 @@ extern Fl_Labeltype FL_EXPORT fl_define_FL_ENGRAVED_LABEL();
extern Fl_Labeltype FL_EXPORT fl_define_FL_EMBOSSED_LABEL(); extern Fl_Labeltype FL_EXPORT fl_define_FL_EMBOSSED_LABEL();
#define FL_EMBOSSED_LABEL fl_define_FL_EMBOSSED_LABEL() #define FL_EMBOSSED_LABEL fl_define_FL_EMBOSSED_LABEL()
/** \name Alignment Flags */
/**@{*/
/** Flags to control the label alignment. /** Flags to control the label alignment.
* This controls how the label is displayed next to or inside the widget. * This controls how the label is displayed next to or inside the widget.
* The default value is FL_ALIGN_CENTER for most widgets, which centers the label * The default value is FL_ALIGN_CENTER for most widgets, which centers the label
* inside the widget. * inside the widget.
* *
* Flags can be or'd to achieve a combination of alignments. * Flags can be or'd to achieve a combination of alignments.
* \see #FL_ALIGN_CENTER, etc.
*/ */
enum Fl_Align { // align() values typedef unsigned Fl_Align;
/** Align the label horizontally in the middle. */ /** Align the label horizontally in the middle. */
FL_ALIGN_CENTER = 0, const Fl_Align FL_ALIGN_CENTER = (Fl_Align)0;
/** Align the label at the top of the widget. Inside labels appear below the top, /** Align the label at the top of the widget. Inside labels appear below the top,
* outside labels are drawn on top of the widget. */ * outside labels are drawn on top of the widget. */
FL_ALIGN_TOP = 1, const Fl_Align FL_ALIGN_TOP = (Fl_Align)1;
/** Align the label at the bottom of the widget. */ /** Align the label at the bottom of the widget. */
FL_ALIGN_BOTTOM = 2, const Fl_Align FL_ALIGN_BOTTOM = (Fl_Align)2;
/** Align the label at the left of the widget. Inside labels appear left-justified /** Align the label at the left of the widget. Inside labels appear left-justified
* starting at the left side of the widget, outside labels are right-justified and * starting at the left side of the widget, outside labels are right-justified and
* drawn to the left of the widget. */ * drawn to the left of the widget. */
FL_ALIGN_LEFT = 4, const Fl_Align FL_ALIGN_LEFT = (Fl_Align)4;
/** Align the label to the right of the widget. */ /** Align the label to the right of the widget. */
FL_ALIGN_RIGHT = 8, const Fl_Align FL_ALIGN_RIGHT = (Fl_Align)8;
/** Draw the label inside of the widget. */ /** Draw the label inside of the widget. */
FL_ALIGN_INSIDE = 16, const Fl_Align FL_ALIGN_INSIDE = (Fl_Align)16;
/** If the label contains an image, draw the text on top of the image. */ /** If the label contains an image, draw the text on top of the image. */
FL_ALIGN_TEXT_OVER_IMAGE = 32, const Fl_Align FL_ALIGN_TEXT_OVER_IMAGE = (Fl_Align)32;
/** If the label contains an image, draw the text below the image. */ /** If the label contains an image, draw the text below the image. */
FL_ALIGN_IMAGE_OVER_TEXT = 0, const Fl_Align FL_ALIGN_IMAGE_OVER_TEXT = (Fl_Align)0;
/** All parts of the label that are lager than the widget will not be drawn . */ /** All parts of the label that are lager than the widget will not be drawn . */
FL_ALIGN_CLIP = 64, const Fl_Align FL_ALIGN_CLIP = (Fl_Align)64;
/** Wrap text that does not fit the width of the widget. */ /** Wrap text that does not fit the width of the widget. */
FL_ALIGN_WRAP = 128, const Fl_Align FL_ALIGN_WRAP = (Fl_Align)128;
FL_ALIGN_TOP_LEFT = FL_ALIGN_TOP | FL_ALIGN_LEFT, const Fl_Align FL_ALIGN_TOP_LEFT = FL_ALIGN_TOP | FL_ALIGN_LEFT;
FL_ALIGN_TOP_RIGHT = FL_ALIGN_TOP | FL_ALIGN_RIGHT, const Fl_Align FL_ALIGN_TOP_RIGHT = FL_ALIGN_TOP | FL_ALIGN_RIGHT;
FL_ALIGN_BOTTOM_LEFT = FL_ALIGN_BOTTOM | FL_ALIGN_LEFT, const Fl_Align FL_ALIGN_BOTTOM_LEFT = FL_ALIGN_BOTTOM | FL_ALIGN_LEFT;
FL_ALIGN_BOTTOM_RIGHT = FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT, const Fl_Align FL_ALIGN_BOTTOM_RIGHT = FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT;
FL_ALIGN_LEFT_TOP = FL_ALIGN_TOP_LEFT, const Fl_Align FL_ALIGN_LEFT_TOP = FL_ALIGN_TOP_LEFT;
FL_ALIGN_RIGHT_TOP = FL_ALIGN_TOP_RIGHT, const Fl_Align FL_ALIGN_RIGHT_TOP = FL_ALIGN_TOP_RIGHT;
FL_ALIGN_LEFT_BOTTOM = FL_ALIGN_BOTTOM_LEFT, const Fl_Align FL_ALIGN_LEFT_BOTTOM = FL_ALIGN_BOTTOM_LEFT;
FL_ALIGN_RIGHT_BOTTOM = FL_ALIGN_BOTTOM_RIGHT, const Fl_Align FL_ALIGN_RIGHT_BOTTOM = FL_ALIGN_BOTTOM_RIGHT;
FL_ALIGN_NOWRAP = 0 // for back compatability const Fl_Align FL_ALIGN_NOWRAP = (Fl_Align)0; // for back compatability
}; /**@}*/
typedef int Fl_Font; typedef int Fl_Font;
typedef int Fl_Font_Size; typedef int Fl_Font_Size;
+4 -4
View File
@@ -103,7 +103,7 @@ class FL_EXPORT Fl_Widget {
uchar type_; uchar type_;
uchar damage_; uchar damage_;
uchar box_; uchar box_;
uchar align_; Fl_Align align_:8;
uchar when_; uchar when_;
const char *tooltip_; const char *tooltip_;
@@ -264,12 +264,12 @@ public:
/** Gets the label alignment. /** Gets the label alignment.
* \return label alignment * \return label alignment
* \see label(), align(uchar), Fl_Align * \see label(), align(Fl_Align), Fl_Align
* \todo This function should not take ucahr as an argument. Apart from the fact that ucahr is too short * \todo This function should not take ucahr as an argument. Apart from the fact that ucahr is too short
* with only 8 bits, it does not provide type safety (in which case we don't need to declare Fl_Type * with only 8 bits, it does not provide type safety (in which case we don't need to declare Fl_Type
* an enum to begin with). * an enum to begin with).
*/ */
Fl_Align align() const {return (Fl_Align)align_;} Fl_Align align() const {return align_;}
/** Sets the label alignment. /** Sets the label alignment.
* This controls how the label is displayed next to or inside the widget. * This controls how the label is displayed next to or inside the widget.
@@ -277,7 +277,7 @@ public:
* \param[in] alignment new label alignment * \param[in] alignment new label alignment
* \see align(), Fl_Align * \see align(), Fl_Align
*/ */
void align(uchar alignment) {align_ = alignment;} void align(Fl_Align alignment) {align_ = alignment;}
/** Gets the box type for the widget. /** Gets the box type for the widget.
* \return the current box type * \return the current box type
+5 -5
View File
@@ -1133,7 +1133,7 @@ static Fl_Menu_Item alignmenu[] = {
{0}}; {0}};
void align_cb(Fl_Button* i, void *v) { void align_cb(Fl_Button* i, void *v) {
int b = int(long(i->user_data())); Fl_Align b = Fl_Align(long(i->user_data()));
if (v == LOAD) { if (v == LOAD) {
if (current_widget->is_menu_item()) {i->deactivate(); return;} else i->activate(); if (current_widget->is_menu_item()) {i->deactivate(); return;} else i->activate();
i->value(current_widget->o->align() & b); i->value(current_widget->o->align() & b);
@@ -1142,8 +1142,8 @@ void align_cb(Fl_Button* i, void *v) {
for (Fl_Type *o = Fl_Type::first; o; o = o->next) { for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
if (o->selected && o->is_widget()) { if (o->selected && o->is_widget()) {
Fl_Widget_Type* q = (Fl_Widget_Type*)o; Fl_Widget_Type* q = (Fl_Widget_Type*)o;
int x = q->o->align(); Fl_Align x = q->o->align();
int y; Fl_Align y;
if (i->value()) { if (i->value()) {
y = x | b; y = x | b;
if (b == FL_ALIGN_LEFT || b == FL_ALIGN_TOP) { if (b == FL_ALIGN_LEFT || b == FL_ALIGN_TOP) {
@@ -2260,10 +2260,10 @@ void Fl_Widget_Type::write_widget_code() {
} }
if (o->align() != tplate->align() || subclass()) { if (o->align() != tplate->align() || subclass()) {
int i = o->align(); int i = o->align();
write_c("%s%s->align(%s", indent(), var, write_c("%s%s->align(Fl_Align(%s", indent(), var,
item_name(alignmenu, i & ~FL_ALIGN_INSIDE)); item_name(alignmenu, i & ~FL_ALIGN_INSIDE));
if (i & FL_ALIGN_INSIDE) write_c("|FL_ALIGN_INSIDE"); if (i & FL_ALIGN_INSIDE) write_c("|FL_ALIGN_INSIDE");
write_c(");\n"); write_c("));\n");
} }
// avoid the unsupported combination of flegs when user sets // avoid the unsupported combination of flegs when user sets
// "when" to "FL_WHEN_NEVER", but keeps the "no change" set. // "when" to "FL_WHEN_NEVER", but keeps the "no change" set.
+1 -1
View File
@@ -25,7 +25,7 @@
// http://www.fltk.org/str.php // http://www.fltk.org/str.php
// //
// generated by Fast Light User Interface Designer (fluid) version 1.0108 // generated by Fast Light User Interface Designer (fluid) version 1.0300
#include "about_panel.h" #include "about_panel.h"
void show_help(const char *name); void show_help(const char *name);
+1 -1
View File
@@ -25,7 +25,7 @@
// http://www.fltk.org/str.php // http://www.fltk.org/str.php
// //
// generated by Fast Light User Interface Designer (fluid) version 1.0108 // generated by Fast Light User Interface Designer (fluid) version 1.0300
#ifndef about_panel_h #ifndef about_panel_h
#define about_panel_h #define about_panel_h
+1 -1
View File
@@ -25,7 +25,7 @@
// http://www.fltk.org/str.php // http://www.fltk.org/str.php
// //
// generated by Fast Light User Interface Designer (fluid) version 1.0108 // generated by Fast Light User Interface Designer (fluid) version 1.0300
#include "alignment_panel.h" #include "alignment_panel.h"
+1 -1
View File
@@ -25,7 +25,7 @@
// http://www.fltk.org/str.php // http://www.fltk.org/str.php
// //
// generated by Fast Light User Interface Designer (fluid) version 1.0108 // generated by Fast Light User Interface Designer (fluid) version 1.0300
#ifndef alignment_panel_h #ifndef alignment_panel_h
#define alignment_panel_h #define alignment_panel_h
+1 -1
View File
@@ -25,7 +25,7 @@
// http://www.fltk.org/str.php // http://www.fltk.org/str.php
// //
// generated by Fast Light User Interface Designer (fluid) version 1.0108 // generated by Fast Light User Interface Designer (fluid) version 1.0300
#include "function_panel.h" #include "function_panel.h"
#include <FL/Fl_Pixmap.H> #include <FL/Fl_Pixmap.H>
+1 -1
View File
@@ -25,7 +25,7 @@
// http://www.fltk.org/str.php // http://www.fltk.org/str.php
// //
// generated by Fast Light User Interface Designer (fluid) version 1.0108 // generated by Fast Light User Interface Designer (fluid) version 1.0300
#ifndef function_panel_h #ifndef function_panel_h
#define function_panel_h #define function_panel_h
+141 -143
View File
@@ -25,7 +25,7 @@
// http://www.fltk.org/str.php // 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.0300
#include "print_panel.h" #include "print_panel.h"
#include <stdio.h> #include <stdio.h>
@@ -244,272 +244,270 @@ static void cb_Use(Fl_Button*, void*) {
} }
Fl_Double_Window* make_print_panel() { Fl_Double_Window* make_print_panel() {
Fl_Double_Window* w; { print_panel = new Fl_Double_Window(465, 235, "Print");
{ Fl_Double_Window* o = print_panel = new Fl_Double_Window(465, 235, "Print"); { print_panel_controls = new Fl_Group(10, 10, 447, 216);
w = o; { print_choice = new Fl_Choice(113, 10, 181, 25, "Printer:");
{ Fl_Group* o = print_panel_controls = new Fl_Group(10, 10, 447, 216); print_choice->down_box(FL_BORDER_BOX);
{ Fl_Choice* o = print_choice = new Fl_Choice(113, 10, 181, 25, "Printer:"); print_choice->labelfont(1);
o->down_box(FL_BORDER_BOX); print_choice->callback((Fl_Callback*)cb_print_choice);
o->labelfont(1); print_choice->when(FL_WHEN_CHANGED);
o->callback((Fl_Callback*)cb_print_choice); } // Fl_Choice* print_choice
o->when(FL_WHEN_CHANGED); { print_properties = new Fl_Button(294, 10, 105, 25, "Properties...");
} print_properties->callback((Fl_Callback*)cb_print_properties);
{ Fl_Button* o = print_properties = new Fl_Button(294, 10, 105, 25, "Properties..."); } // Fl_Button* print_properties
o->callback((Fl_Callback*)cb_print_properties); { print_status = new Fl_Box(111, 41, 288, 17, "printer/job status");
} print_status->align(68|FL_ALIGN_INSIDE);
{ Fl_Box* o = print_status = new Fl_Box(111, 41, 288, 17, "printer/job status"); } // Fl_Box* print_status
o->align(68|FL_ALIGN_INSIDE);
}
{ Fl_Group* o = new Fl_Group(10, 86, 227, 105, "Print Range"); { Fl_Group* o = new Fl_Group(10, 86, 227, 105, "Print Range");
o->box(FL_THIN_DOWN_BOX); o->box(FL_THIN_DOWN_BOX);
o->labelfont(1); o->labelfont(1);
o->align(FL_ALIGN_TOP_LEFT); o->align(FL_ALIGN_TOP_LEFT);
{ Fl_Round_Button* o = print_all = new Fl_Round_Button(20, 96, 38, 25, "All"); { print_all = new Fl_Round_Button(20, 96, 38, 25, "All");
o->type(102); print_all->type(102);
o->down_box(FL_ROUND_DOWN_BOX); print_all->down_box(FL_ROUND_DOWN_BOX);
o->value(1); print_all->value(1);
o->callback((Fl_Callback*)cb_print_all); print_all->callback((Fl_Callback*)cb_print_all);
} } // Fl_Round_Button* print_all
{ Fl_Round_Button* o = print_pages = new Fl_Round_Button(20, 126, 64, 25, "Pages"); { print_pages = new Fl_Round_Button(20, 126, 64, 25, "Pages");
o->type(102); print_pages->type(102);
o->down_box(FL_ROUND_DOWN_BOX); print_pages->down_box(FL_ROUND_DOWN_BOX);
o->callback((Fl_Callback*)cb_print_pages); print_pages->callback((Fl_Callback*)cb_print_pages);
} } // Fl_Round_Button* print_pages
{ Fl_Round_Button* o = print_selection = new Fl_Round_Button(20, 156, 82, 25, "Selection"); { print_selection = new Fl_Round_Button(20, 156, 82, 25, "Selection");
o->type(102); print_selection->type(102);
o->down_box(FL_ROUND_DOWN_BOX); print_selection->down_box(FL_ROUND_DOWN_BOX);
o->callback((Fl_Callback*)cb_print_selection); print_selection->callback((Fl_Callback*)cb_print_selection);
} } // Fl_Round_Button* print_selection
{ Fl_Input* o = print_from = new Fl_Input(136, 126, 28, 25, "From:"); { print_from = new Fl_Input(136, 126, 28, 25, "From:");
o->type(2); print_from->type(2);
o->textfont(4); print_from->textfont(4);
o->deactivate(); print_from->deactivate();
} } // Fl_Input* print_from
{ Fl_Input* o = print_to = new Fl_Input(199, 126, 28, 25, "To:"); { print_to = new Fl_Input(199, 126, 28, 25, "To:");
o->type(2); print_to->type(2);
o->textfont(4); print_to->textfont(4);
o->deactivate(); print_to->deactivate();
} } // Fl_Input* print_to
o->end(); o->end();
} } // Fl_Group* o
{ Fl_Group* o = new Fl_Group(247, 86, 210, 105, "Copies"); { Fl_Group* o = new Fl_Group(247, 86, 210, 105, "Copies");
o->box(FL_THIN_DOWN_BOX); o->box(FL_THIN_DOWN_BOX);
o->labelfont(1); o->labelfont(1);
o->align(FL_ALIGN_TOP_LEFT); o->align(FL_ALIGN_TOP_LEFT);
{ Fl_Spinner* o = print_copies = new Fl_Spinner(321, 96, 45, 25, "# Copies:"); { print_copies = new Fl_Spinner(321, 96, 45, 25, "# Copies:");
o->callback((Fl_Callback*)cb_print_copies); print_copies->value(1);
o->when(FL_WHEN_CHANGED); print_copies->callback((Fl_Callback*)cb_print_copies);
} print_copies->when(FL_WHEN_CHANGED);
{ Fl_Check_Button* o = print_collate_button = new Fl_Check_Button(376, 96, 64, 25, "Collate"); } // Fl_Spinner* print_copies
o->down_box(FL_DOWN_BOX); { print_collate_button = new Fl_Check_Button(376, 96, 64, 25, "Collate");
o->callback((Fl_Callback*)cb_print_collate_button); print_collate_button->down_box(FL_DOWN_BOX);
o->when(FL_WHEN_CHANGED); print_collate_button->callback((Fl_Callback*)cb_print_collate_button);
o->deactivate(); print_collate_button->when(FL_WHEN_CHANGED);
} print_collate_button->deactivate();
{ Fl_Group* o = print_collate_group[0] = new Fl_Group(257, 131, 191, 50); } // Fl_Check_Button* print_collate_button
o->deactivate(); { print_collate_group[0] = new Fl_Group(257, 131, 191, 50);
print_collate_group[0]->deactivate();
{ Fl_Box* o = new Fl_Box(287, 141, 30, 40, "1"); { Fl_Box* o = new Fl_Box(287, 141, 30, 40, "1");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
o->deactivate(); o->deactivate();
} } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(272, 136, 30, 40, "1"); { Fl_Box* o = new Fl_Box(272, 136, 30, 40, "1");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
o->deactivate(); o->deactivate();
} } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(257, 131, 30, 40, "1"); { Fl_Box* o = new Fl_Box(257, 131, 30, 40, "1");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
o->deactivate(); o->deactivate();
} } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(352, 141, 30, 40, "2"); { Fl_Box* o = new Fl_Box(352, 141, 30, 40, "2");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
o->deactivate(); o->deactivate();
} } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(337, 136, 30, 40, "2"); { Fl_Box* o = new Fl_Box(337, 136, 30, 40, "2");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
o->deactivate(); o->deactivate();
} } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(322, 131, 30, 40, "2"); { Fl_Box* o = new Fl_Box(322, 131, 30, 40, "2");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
o->deactivate(); o->deactivate();
} } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(417, 141, 30, 40, "3"); { Fl_Box* o = new Fl_Box(417, 141, 30, 40, "3");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
o->deactivate(); o->deactivate();
} } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(402, 136, 30, 40, "3"); { Fl_Box* o = new Fl_Box(402, 136, 30, 40, "3");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
o->deactivate(); o->deactivate();
} } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(387, 131, 30, 40, "3"); { Fl_Box* o = new Fl_Box(387, 131, 30, 40, "3");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
o->deactivate(); o->deactivate();
} } // Fl_Box* o
o->end(); print_collate_group[0]->end();
} } // Fl_Group* print_collate_group[0]
{ Fl_Group* o = print_collate_group[1] = new Fl_Group(257, 131, 191, 50); { print_collate_group[1] = new Fl_Group(257, 131, 191, 50);
o->hide(); print_collate_group[1]->hide();
o->deactivate(); print_collate_group[1]->deactivate();
{ Fl_Box* o = new Fl_Box(287, 141, 30, 40, "3"); { Fl_Box* o = new Fl_Box(287, 141, 30, 40, "3");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
} } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(272, 136, 30, 40, "2"); { Fl_Box* o = new Fl_Box(272, 136, 30, 40, "2");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
} } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(257, 131, 30, 40, "1"); { Fl_Box* o = new Fl_Box(257, 131, 30, 40, "1");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
} } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(352, 141, 30, 40, "3"); { Fl_Box* o = new Fl_Box(352, 141, 30, 40, "3");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
} } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(337, 136, 30, 40, "2"); { Fl_Box* o = new Fl_Box(337, 136, 30, 40, "2");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
} } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(322, 131, 30, 40, "1"); { Fl_Box* o = new Fl_Box(322, 131, 30, 40, "1");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
} } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(417, 141, 30, 40, "3"); { Fl_Box* o = new Fl_Box(417, 141, 30, 40, "3");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
} } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(402, 136, 30, 40, "2"); { Fl_Box* o = new Fl_Box(402, 136, 30, 40, "2");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
} } // Fl_Box* o
{ Fl_Box* o = new Fl_Box(387, 131, 30, 40, "1"); { Fl_Box* o = new Fl_Box(387, 131, 30, 40, "1");
o->box(FL_BORDER_BOX); o->box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); o->color(FL_BACKGROUND2_COLOR);
o->labelsize(11); o->labelsize(11);
o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE); o->align(FL_ALIGN_BOTTOM_RIGHT|FL_ALIGN_INSIDE);
} } // Fl_Box* o
o->end(); print_collate_group[1]->end();
} } // Fl_Group* print_collate_group[1]
o->end(); o->end();
} } // Fl_Group* o
{ Fl_Return_Button* o = new Fl_Return_Button(309, 201, 70, 25, "Print"); { Fl_Return_Button* o = new Fl_Return_Button(309, 201, 70, 25, "Print");
o->callback((Fl_Callback*)print_cb); o->callback((Fl_Callback*)print_cb);
} } // Fl_Return_Button* o
{ Fl_Button* o = new Fl_Button(389, 201, 68, 25, "Cancel"); { Fl_Button* o = new Fl_Button(389, 201, 68, 25, "Cancel");
o->callback((Fl_Callback*)cb_Cancel); o->callback((Fl_Callback*)cb_Cancel);
} } // Fl_Button* o
o->end(); print_panel_controls->end();
} } // Fl_Group* print_panel_controls
{ Fl_Progress* o = print_progress = new Fl_Progress(10, 203, 289, 21); { print_progress = new Fl_Progress(10, 203, 289, 21);
o->selection_color((Fl_Color)4); print_progress->selection_color((Fl_Color)4);
o->hide(); print_progress->hide();
} } // Fl_Progress* print_progress
o->set_modal(); print_panel->set_modal();
o->end(); print_panel->end();
} } // Fl_Double_Window* print_panel
{ Fl_Double_Window* o = print_properties_panel = new Fl_Double_Window(290, 130, "Printer Properties"); { print_properties_panel = new Fl_Double_Window(290, 130, "Printer Properties");
w = o; print_properties_panel->callback((Fl_Callback*)cb_print_properties_panel);
o->callback((Fl_Callback*)cb_print_properties_panel); { print_page_size = new Fl_Choice(110, 10, 80, 25, "Page Size:");
{ Fl_Choice* o = print_page_size = new Fl_Choice(110, 10, 80, 25, "Page Size:"); print_page_size->down_box(FL_BORDER_BOX);
o->down_box(FL_BORDER_BOX); print_page_size->labelfont(1);
o->labelfont(1); print_page_size->menu(menu_print_page_size);
o->menu(menu_print_page_size); } // Fl_Choice* print_page_size
}
{ Fl_Group* o = new Fl_Group(110, 45, 170, 40, "Output Mode:"); { Fl_Group* o = new Fl_Group(110, 45, 170, 40, "Output Mode:");
o->labelfont(1); o->labelfont(1);
o->align(FL_ALIGN_LEFT); o->align(FL_ALIGN_LEFT);
{ Fl_Button* o = print_output_mode[0] = new Fl_Button(110, 45, 30, 40); { print_output_mode[0] = new Fl_Button(110, 45, 30, 40);
o->type(102); print_output_mode[0]->type(102);
o->box(FL_BORDER_BOX); print_output_mode[0]->box(FL_BORDER_BOX);
o->down_box(FL_BORDER_BOX); print_output_mode[0]->down_box(FL_BORDER_BOX);
o->value(1); print_output_mode[0]->value(1);
o->color(FL_BACKGROUND2_COLOR); print_output_mode[0]->color(FL_BACKGROUND2_COLOR);
o->selection_color(FL_FOREGROUND_COLOR); print_output_mode[0]->selection_color(FL_FOREGROUND_COLOR);
o->image(image_print_color); print_output_mode[0]->image(image_print_color);
} } // Fl_Button* print_output_mode[0]
{ Fl_Button* o = print_output_mode[1] = new Fl_Button(150, 50, 40, 30); { print_output_mode[1] = new Fl_Button(150, 50, 40, 30);
o->type(102); print_output_mode[1]->type(102);
o->box(FL_BORDER_BOX); print_output_mode[1]->box(FL_BORDER_BOX);
o->down_box(FL_BORDER_BOX); print_output_mode[1]->down_box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); print_output_mode[1]->color(FL_BACKGROUND2_COLOR);
o->selection_color(FL_FOREGROUND_COLOR); print_output_mode[1]->selection_color(FL_FOREGROUND_COLOR);
o->image(image_print_color); print_output_mode[1]->image(image_print_color);
} } // Fl_Button* print_output_mode[1]
{ Fl_Button* o = print_output_mode[2] = new Fl_Button(200, 45, 30, 40); { print_output_mode[2] = new Fl_Button(200, 45, 30, 40);
o->type(102); print_output_mode[2]->type(102);
o->box(FL_BORDER_BOX); print_output_mode[2]->box(FL_BORDER_BOX);
o->down_box(FL_BORDER_BOX); print_output_mode[2]->down_box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); print_output_mode[2]->color(FL_BACKGROUND2_COLOR);
o->selection_color(FL_FOREGROUND_COLOR); print_output_mode[2]->selection_color(FL_FOREGROUND_COLOR);
o->image(image_print_gray); print_output_mode[2]->image(image_print_gray);
} } // Fl_Button* print_output_mode[2]
{ Fl_Button* o = print_output_mode[3] = new Fl_Button(240, 50, 40, 30); { print_output_mode[3] = new Fl_Button(240, 50, 40, 30);
o->type(102); print_output_mode[3]->type(102);
o->box(FL_BORDER_BOX); print_output_mode[3]->box(FL_BORDER_BOX);
o->down_box(FL_BORDER_BOX); print_output_mode[3]->down_box(FL_BORDER_BOX);
o->color(FL_BACKGROUND2_COLOR); print_output_mode[3]->color(FL_BACKGROUND2_COLOR);
o->selection_color(FL_FOREGROUND_COLOR); print_output_mode[3]->selection_color(FL_FOREGROUND_COLOR);
o->image(image_print_gray); print_output_mode[3]->image(image_print_gray);
} } // Fl_Button* print_output_mode[3]
o->end(); o->end();
} } // Fl_Group* o
{ Fl_Return_Button* o = new Fl_Return_Button(123, 95, 79, 25, "Save"); { Fl_Return_Button* o = new Fl_Return_Button(123, 95, 79, 25, "Save");
o->callback((Fl_Callback*)cb_Save); o->callback((Fl_Callback*)cb_Save);
} } // Fl_Return_Button* o
{ Fl_Button* o = new Fl_Button(212, 95, 68, 25, "Cancel"); { Fl_Button* o = new Fl_Button(212, 95, 68, 25, "Cancel");
o->callback((Fl_Callback*)cb_Cancel1); o->callback((Fl_Callback*)cb_Cancel1);
} } // Fl_Button* o
{ Fl_Button* o = new Fl_Button(60, 95, 53, 25, "Use"); { Fl_Button* o = new Fl_Button(60, 95, 53, 25, "Use");
o->callback((Fl_Callback*)cb_Use); o->callback((Fl_Callback*)cb_Use);
} } // Fl_Button* o
o->set_modal(); print_properties_panel->set_modal();
o->end(); print_properties_panel->end();
} } // Fl_Double_Window* print_properties_panel
return w; return print_properties_panel;
} }
void print_cb(Fl_Return_Button *, void *); void print_cb(Fl_Return_Button *, void *);
void print_load() { void print_load() {
FILE *lpstat; FILE *lpstat;
+2 -2
View File
@@ -25,7 +25,7 @@
// http://www.fltk.org/str.php // 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.0300
#ifndef print_panel_h #ifndef print_panel_h
#define print_panel_h #define print_panel_h
@@ -61,7 +61,7 @@ extern Fl_Choice *print_page_size;
extern Fl_Button *print_output_mode[4]; extern Fl_Button *print_output_mode[4];
Fl_Double_Window* make_print_panel(); Fl_Double_Window* make_print_panel();
extern Fl_Menu_Item menu_print_page_size[]; extern Fl_Menu_Item menu_print_page_size[];
extern void print_cb(Fl_Return_Button *, void *); extern void print_cb(Fl_Return_Button *, void *);
void print_load(); void print_load();
void print_update_status(); void print_update_status();
#endif #endif
+39 -41
View File
@@ -25,7 +25,7 @@
// http://www.fltk.org/str.php // 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.0300
#include "template_panel.h" #include "template_panel.h"
#include <stdio.h> #include <stdio.h>
@@ -142,52 +142,50 @@ template_panel->hide();
} }
Fl_Double_Window* make_template_panel() { Fl_Double_Window* make_template_panel() {
Fl_Double_Window* w; { template_panel = new Fl_Double_Window(460, 355, "New/Save Template");
{ Fl_Double_Window* o = template_panel = new Fl_Double_Window(460, 355, "New/Save Template"); template_panel->callback((Fl_Callback*)cb_template_panel);
w = o; { template_browser = new Fl_Browser(10, 28, 180, 250, "Available Templates:");
o->callback((Fl_Callback*)cb_template_panel); template_browser->type(2);
{ Fl_Browser* o = template_browser = new Fl_Browser(10, 28, 180, 250, "Available Templates:"); template_browser->labelfont(1);
o->type(2); template_browser->callback((Fl_Callback*)cb_template_browser);
o->labelfont(1); template_browser->align(FL_ALIGN_TOP_LEFT);
o->callback((Fl_Callback*)cb_template_browser); template_browser->when(3);
o->align(FL_ALIGN_TOP_LEFT); } // Fl_Browser* template_browser
o->when(3); { template_preview = new Fl_Box(200, 28, 250, 250);
} template_preview->box(FL_THIN_DOWN_BOX);
{ Fl_Box* o = template_preview = new Fl_Box(200, 28, 250, 250); template_preview->align(69|FL_ALIGN_INSIDE);
o->box(FL_THIN_DOWN_BOX); Fl_Group::current()->resizable(template_preview);
o->align(69|FL_ALIGN_INSIDE); } // Fl_Box* template_preview
Fl_Group::current()->resizable(o); { template_name = new Fl_Input(124, 288, 326, 25, "Template Name:");
} template_name->labelfont(1);
{ Fl_Input* o = template_name = new Fl_Input(124, 288, 326, 25, "Template Name:"); template_name->textfont(4);
o->labelfont(1); template_name->callback((Fl_Callback*)cb_template_name);
o->textfont(4); template_name->when(3);
o->callback((Fl_Callback*)cb_template_name); } // Fl_Input* template_name
o->when(3); { template_instance = new Fl_Input(124, 288, 326, 25, "Instance Name:");
} template_instance->labelfont(1);
{ Fl_Input* o = template_instance = new Fl_Input(124, 288, 326, 25, "Instance Name:"); template_instance->textfont(4);
o->labelfont(1); template_instance->hide();
o->textfont(4); } // Fl_Input* template_instance
o->hide();
}
{ Fl_Group* o = new Fl_Group(10, 323, 440, 25); { Fl_Group* o = new Fl_Group(10, 323, 440, 25);
{ Fl_Button* o = template_delete = new Fl_Button(10, 323, 133, 25, "Delete Template"); { template_delete = new Fl_Button(10, 323, 133, 25, "Delete Template");
o->callback((Fl_Callback*)template_delete_cb); template_delete->callback((Fl_Callback*)template_delete_cb);
} } // Fl_Button* template_delete
{ Fl_Box* o = new Fl_Box(153, 323, 126, 25); { Fl_Box* o = new Fl_Box(153, 323, 126, 25);
Fl_Group::current()->resizable(o); Fl_Group::current()->resizable(o);
} } // Fl_Box* o
{ Fl_Button* o = new Fl_Button(289, 323, 72, 25, "Cancel"); { Fl_Button* o = new Fl_Button(289, 323, 72, 25, "Cancel");
o->callback((Fl_Callback*)cb_Cancel); o->callback((Fl_Callback*)cb_Cancel);
} } // Fl_Button* o
{ Fl_Return_Button* o = template_submit = new Fl_Return_Button(371, 323, 79, 25, "Save"); { template_submit = new Fl_Return_Button(371, 323, 79, 25, "Save");
o->callback((Fl_Callback*)cb_template_submit); template_submit->callback((Fl_Callback*)cb_template_submit);
} } // Fl_Return_Button* template_submit
o->end(); o->end();
} } // Fl_Group* o
o->set_modal(); template_panel->set_modal();
o->end(); template_panel->end();
} } // Fl_Double_Window* template_panel
return w; return template_panel;
} }
void template_clear() { void template_clear() {
+1 -2
View File
@@ -25,7 +25,7 @@
// http://www.fltk.org/str.php // 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.0300
#ifndef template_panel_h #ifndef template_panel_h
#define template_panel_h #define template_panel_h
@@ -41,7 +41,6 @@ extern Fl_Input *template_name;
extern Fl_Input *template_instance; extern Fl_Input *template_instance;
#include <FL/Fl_Group.H> #include <FL/Fl_Group.H>
#include <FL/Fl_Button.H> #include <FL/Fl_Button.H>
extern void template_delete_cb(Fl_Button*, void*);
extern Fl_Button *template_delete; extern Fl_Button *template_delete;
#include <FL/Fl_Return_Button.H> #include <FL/Fl_Return_Button.H>
extern Fl_Return_Button *template_submit; extern Fl_Return_Button *template_submit;
+1 -1
View File
@@ -25,7 +25,7 @@
// http://www.fltk.org/str.php // http://www.fltk.org/str.php
// //
// generated by Fast Light User Interface Designer (fluid) version 1.0108 // generated by Fast Light User Interface Designer (fluid) version 1.0300
#include "widget_panel.h" #include "widget_panel.h"
+1 -1
View File
@@ -25,7 +25,7 @@
// http://www.fltk.org/str.php // http://www.fltk.org/str.php
// //
// generated by Fast Light User Interface Designer (fluid) version 1.0108 // generated by Fast Light User Interface Designer (fluid) version 1.0300
#ifndef widget_panel_h #ifndef widget_panel_h
#define widget_panel_h #define widget_panel_h