> I've read "Article 415: How Does Resizing Work?" and have
> been battling with trying to get one of my windows to behave
> how I'd like. I have done a mock sketch of my interface...
> it can be viewed here:
>
> http://i56.tinypic.com/2i94b4z.png
>
> The behavior I'm seeking may not be possible in FLTK, but I
> was hoping that in the picture where Fl_Hold_Browser is
> located, that the right-face of the widget (highlighted in
> yellow) would be clickable and could be resized horizontally,
> and in doing so Fl_Box, Fl_Table_Row, and Fl_Text_Display
> would be compressed. And with this functionality, Fl_Window
> should still be resizable however when resized
> Fl_Hold_Browser would remain horizontally fixed but can
> stretch vertically, and all other widgets resize both
> horizontally and vertically.
>
> Hope this makes sense. Is this or something very similar achievable?
See below - based on Greg's suggestion to use a tile....
-----------------
// demo of tiled resize behaviour
// fltk-config --compile tile-resize.cxx
//
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Menu_Bar.H>
#include <FL/Fl_Tile.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Browser.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Button.H>
static Fl_Double_Window *main_win=(Fl_Double_Window *)0;
static Fl_Menu_Bar *mb1=(Fl_Menu_Bar *)0;
static Fl_Tile *tile1=(Fl_Tile *)0;
static Fl_Group *gp1=(Fl_Group *)0;
static Fl_Group *gp2=(Fl_Group *)0;
static Fl_Box *bx1=(Fl_Box *)0;
static Fl_Box *bx2=(Fl_Box *)0;
static Fl_Box *bx3=(Fl_Box *)0;
static Fl_Box *bx4=(Fl_Box *)0;
static Fl_Button *quit_bt=(Fl_Button *)0;
static Fl_Menu_Item menu_mb1[] = {
{"submenu", 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0},
{"item", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
{0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0}
};
static void cb_quit_bt(Fl_Button*, void*) {
main_win->hide();
}
int main(int argc, char **argv) {
main_win = new Fl_Double_Window(460, 496, "Tiled Window");
main_win->begin();
mb1 = new Fl_Menu_Bar(0, 0, 460, 20);
mb1->menu(menu_mb1);
tile1 = new Fl_Tile(0, 20, 460, 415);
tile1->box(FL_FLAT_BOX);
gp1 = new Fl_Group(0, 20, 50, 415);
new Fl_Browser(0, 20, 50, 415);
gp1->end();
gp2 = new Fl_Group(50, 20, 410, 415);
gp2->box(FL_ENGRAVED_BOX);
bx1 = new Fl_Box(55, 24, 395, 42, "Box");
bx1->box(FL_ENGRAVED_BOX);
bx2 = new Fl_Box(55, 69, 395, 157, "Table Row...");
bx2->box(FL_ENGRAVED_BOX);
bx3 = new Fl_Box(55, 228, 93, 199, "Display 1");
bx3->box(FL_ENGRAVED_BOX);
bx4 = new Fl_Box(150, 228, 300, 199, "Display 2");
bx4->box(FL_ENGRAVED_BOX);
gp2->end();
tile1->end();
main_win->resizable(tile1);
quit_bt = new Fl_Button(391, 463, 64, 27, "Quit");
quit_bt->callback((Fl_Callback*)cb_quit_bt);
main_win->end();
main_win->show(argc, argv);
return Fl::run();
}
/* end of file */
-----------------
SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14
3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk