Text sample field in utf8 test resizable

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8163 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2011-01-01 19:34:14 +00:00
parent 39818616b9
commit 4562798f69
2 changed files with 78 additions and 56 deletions

View File

@ -143,7 +143,6 @@ void create_the_forms() {
fontobj->box(FL_FRAME_BOX);
fontobj->color(53,3);
fontobj->callback(font_cb);
form->resizable(fontobj);
sizeobj = new Fl_Hold_Browser(410, 190, 130, 170);
sizeobj->box(FL_FRAME_BOX);
sizeobj->color(53,3);
@ -153,6 +152,7 @@ void create_the_forms() {
tile->end();
form->resizable(tile);
form->end();
}

View File

@ -31,6 +31,7 @@
#include <FL/Fl_Choice.H>
#include <FL/Fl_Input.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Tile.H>
#include <FL/Fl_Hold_Browser.H>
#include <FL/Fl_Value_Output.H>
#include <FL/Fl_Button.H>
@ -322,8 +323,7 @@ static void own_face_cb(Fl_Widget *, void *)
static void create_font_widget()
{
fnt_chooser_win = new Fl_Double_Window(380, 420, "Font Selector");
// Create the font sample label
strcpy(label, "Font Sample\n");
int i = 12; // strlen(label);
int n = 0;
@ -340,10 +340,24 @@ static void create_font_widget()
}
label[i] = 0;
// Create the window layout
fnt_chooser_win = new Fl_Double_Window(380, 420, "Font Selector");
{
Fl_Tile *tile = new Fl_Tile(0, 0, 380, 420);
{
Fl_Group *textgroup = new Fl_Group(0, 0, 380, 105);
{
textobj = new FontDisplay(FL_FRAME_BOX, 10, 10, 360, 90, label);
textobj->align(FL_ALIGN_TOP|FL_ALIGN_LEFT|FL_ALIGN_INSIDE|FL_ALIGN_CLIP);
textobj->color(53, 3);
textgroup->box(FL_FLAT_BOX);
textgroup->resizable(textobj);
textgroup->end();
}
Fl_Group *fontgroup = new Fl_Group(0, 105, 380, 315);
{
fontobj = new Fl_Hold_Browser(10, 110, 290, 270);
fontobj->box(FL_FRAME_BOX);
fontobj->color(53, 3);
@ -356,9 +370,8 @@ static void create_font_widget()
sizeobj->callback(size_cb);
// Create the status bar
Fl_Group * stat_bar = new Fl_Group (10, 385, 380, 30);
stat_bar->begin();
Fl_Group *stat_bar = new Fl_Group (10, 385, 380, 30);
{
fnt_cnt = new Fl_Value_Output(10, 390, 40, 20);
fnt_cnt->label("fonts");
fnt_cnt->align(FL_ALIGN_RIGHT);
@ -385,10 +398,19 @@ static void create_font_widget()
refresh_btn->label("Refresh");
refresh_btn->callback(refresh_cb);
stat_bar->end();
stat_bar->resizable (dummy);
stat_bar->end();
}
fontgroup->box(FL_FLAT_BOX);
fontgroup->resizable(fontobj);
fontgroup->end();
}
tile->end();
}
fnt_chooser_win->resizable(tile);
fnt_chooser_win->end();
}
}