class Fl_Window : public Fl_Group

This widget produces an actual X window. This can either be a main window, with a border and title and all the window management controls, or a "subwindow" inside a window. This is controlled by whether or not the window has a parent().

Once you create a window, you usually add children Fl_Widgets to it by using window->add(child) for each new widget. See Fl_Group for more information on how to add and remove children.

Depending on what you need to draw, there are subclasses of Fl_Window with some extra drawing capabilities:

The window's callback is done if the user tries to close a window using the window manager (and Fl::modal() is zero or equal to this). Fl_Window has a default callback that calls Fl_Window::hide() and calls exit(0) if this is the last window (not counting child, non_modal(), and modal() windows).

Methods

Fl_Window::Fl_Window(int,int,int,int, const char * = 0);
Fl_Window::Fl_Window(int,int, const char * = 0);

virtual Fl_Window::~Fl_Window();

int Fl::x();
int Fl::y();
int Fl::w();
int Fl::h();

void Fl_Window::size_range(int minw, int minh, int maxw=0, int maxh=0, int dw=0, int dh=0, int aspect=0);

virtual void Fl_Window::show();

int Fl_Window::show(int argc, char **argv, int i);
void Fl_Window::show(int argc, char **argv);

virtual void Fl_Window::hide();

int Fl_Window::shown() const ;

void Fl_Window::iconize();

Fl_Window *Fl::first_window();
Fl_Window *Fl::next_window(const Fl_Window*);

void Fl_Window::resize(int,int,int,int);

void Fl_Window::free_position();

void Fl_Window::hotspot(int x, int y, int offscreen = 0);
void Fl_Window::hotspot(const Fl_Widget*, int offscreen = 0);
void Fl_Window::hotspot(const Fl_Widget& p, int offscreen = 0);

void Fl_Window::fullscreen();

int Fl_Window::fullscreen_off(int x,int y,int w,int h);

int Fl_Window::border(int);
void Fl_Window::clear_border();
uchar Fl_Window::border() const;

void Fl_Window::set_modal();
uchar Fl_Window::modal() const;

void Fl_Window::set_non_modal();
uchar Fl_Window::non_modal() const;

void Fl_Window::label(const char*);
const char* Fl_Window::label() const;
void Fl_Window::iconlabel(const char*);
const char* Fl_Window::iconlabel() const;
void Fl_Window::label(const char* label, const char* iconlabel);

void Fl_Window::xclass(const char*);
const char* Fl_Window::xclass() const;

void Fl_Window::make_current();
static Fl_Window* Fl_Window::current();

(back to contents)