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
25 class FL_EXPORT Fl_Widget_Surface : public Fl_Surface_Device {
26 private:
27 void traverse(Fl_Widget *widget); // finds subwindows of widget and prints them
28 protected:
30 int x_offset;
32 int y_offset;
33 Fl_Widget_Surface(Fl_Graphics_Driver *d);
34 public:
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 */
Fl_Device.H
declaration of classes Fl_Surface_Device, Fl_Display_Device, Fl_Device_Plugin.
Fl_Window.H
Fl_Window widget .
Fl_Surface_Device::Fl_Surface_Device
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
Fl_Widget_Surface::draw
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
Fl_Widget_Surface::x_offset
int x_offset
horizontal offset to the origin of graphics coordinates
Definition Fl_Widget_Surface.H:30
Fl_Widget_Surface::y_offset
int y_offset
vertical offset to the origin of graphics coordinates
Definition Fl_Widget_Surface.H:32
Fl_Widget_Surface::printable_rect
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_Widget_Surface
Fl_Widget_Surface(Fl_Graphics_Driver *d)
The constructor.
Definition Fl_Widget_Surface.cxx:28
Fl_Widget_Surface::print_window_part
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
Fl_Widget_Surface::draw_decorated_window
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
Fl_Widget_Surface::origin
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
Fl_Widget_Surface::untranslate
virtual void untranslate()
Undoes the effect of a previous translate() call.
Definition Fl_Widget_Surface.cxx:121
Fl_Widget_Surface::translate
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
Fl_Widget is the base class for all widgets in FLTK.
Definition Fl_Widget.H:112
Fl_Window
This widget produces an actual window.
Definition Fl_Window.H:55