FLTK 1.4.4
Loading...
Searching...
No Matches
Fl_Widget_Surface.H
1//
2// Drivers code for the Fast Light Tool Kit (FLTK).
3//
4// Copyright 1998-2016 by Bill Spitzak and others.
5//
6// This library is free software. Distribution and use rights are outlined in
7// the file "COPYING" which should have been included with this file. If this
8// file is missing or damaged, see the license at:
9//
10// https://www.fltk.org/COPYING.php
11//
12// Please see the following page on how to report bugs and issues:
13//
14// https://www.fltk.org/bugs.php
15//
16
17#ifndef Fl_Widget_Surface_h
18#define Fl_Widget_Surface_h
19
20#include <FL/Fl_Device.H>
21#include <FL/Fl_Window.H>
22
25class FL_EXPORT Fl_Widget_Surface : public Fl_Surface_Device {
26private:
27 void traverse(Fl_Widget *widget); // finds subwindows of widget and prints them
28protected:
33 Fl_Widget_Surface(Fl_Graphics_Driver *d);
34public:
35 virtual void translate(int x, int y);
36 virtual void untranslate();
37 void draw(Fl_Widget* widget, int delta_x = 0, int delta_y = 0);
38 void draw_decorated_window(Fl_Window *win, int x_offset = 0, int y_offset = 0);
39 void print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x = 0, int delta_y = 0);
40 virtual int printable_rect(int *w, int *h);
41 virtual void origin(int x, int y);
42 virtual void origin(int *x, int *y);
43};
44
45#endif /* Fl_Widget_Surface_h */
declaration of classes Fl_Surface_Device, Fl_Display_Device, Fl_Device_Plugin.
Fl_Window widget .
Fl_Surface_Device(Fl_Graphics_Driver *graphics_driver)
Constructor that sets the graphics driver to use for the created surface.
Definition Fl_Device.H:69
void draw(Fl_Widget *widget, int delta_x=0, int delta_y=0)
Draws the widget on the drawing surface.
Definition Fl_Widget_Surface.cxx:43
int x_offset
horizontal offset to the origin of graphics coordinates
Definition Fl_Widget_Surface.H:30
int y_offset
vertical offset to the origin of graphics coordinates
Definition Fl_Widget_Surface.H:32
virtual int printable_rect(int *w, int *h)
Computes the width and height of the drawable area of the drawing surface.
Definition Fl_Widget_Surface.cxx:190
Fl_Widget_Surface(Fl_Graphics_Driver *d)
The constructor.
Definition Fl_Widget_Surface.cxx:28
void print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x=0, int delta_y=0)
Draws a rectangular part of an on-screen window.
Definition Fl_Widget_Surface.cxx:160
void draw_decorated_window(Fl_Window *win, int x_offset=0, int y_offset=0)
Draws a window with its title bar and frame if any.
Definition Fl_Widget_Surface.cxx:198
virtual void origin(int x, int y)
Sets the position of the origin of graphics in the drawable part of the drawing surface.
Definition Fl_Widget_Surface.cxx:145
virtual void untranslate()
Undoes the effect of a previous translate() call.
Definition Fl_Widget_Surface.cxx:121
virtual void translate(int x, int y)
Translates the current graphics origin accounting for the current rotation.
Definition Fl_Widget_Surface.cxx:114
Fl_Widget is the base class for all widgets in FLTK.
Definition Fl_Widget.H:112
This widget produces an actual window.
Definition Fl_Window.H:55