2016-02-26 15:51:47 +03:00
|
|
|
//
|
|
|
|
// Drivers code for the Fast Light Tool Kit (FLTK).
|
|
|
|
//
|
|
|
|
// Copyright 1998-2016 by Bill Spitzak and others.
|
|
|
|
//
|
|
|
|
// This library is free software. Distribution and use rights are outlined in
|
|
|
|
// the file "COPYING" which should have been included with this file. If this
|
|
|
|
// file is missing or damaged, see the license at:
|
|
|
|
//
|
2020-07-01 19:03:10 +03:00
|
|
|
// https://www.fltk.org/COPYING.php
|
2016-02-26 15:51:47 +03:00
|
|
|
//
|
2020-07-01 19:03:10 +03:00
|
|
|
// Please see the following page on how to report bugs and issues:
|
2016-02-26 15:51:47 +03:00
|
|
|
//
|
2020-07-01 19:03:10 +03:00
|
|
|
// https://www.fltk.org/bugs.php
|
2016-02-26 15:51:47 +03:00
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef Fl_Widget_Surface_h
|
|
|
|
#define Fl_Widget_Surface_h
|
|
|
|
|
|
|
|
#include <FL/Fl_Device.H>
|
|
|
|
#include <FL/Fl_Window.H>
|
|
|
|
|
|
|
|
/** A surface on which any FLTK widget can be drawn.
|
|
|
|
*/
|
|
|
|
class FL_EXPORT Fl_Widget_Surface : public Fl_Surface_Device {
|
|
|
|
private:
|
|
|
|
void traverse(Fl_Widget *widget); // finds subwindows of widget and prints them
|
|
|
|
protected:
|
|
|
|
/** \brief horizontal offset to the origin of graphics coordinates */
|
|
|
|
int x_offset;
|
|
|
|
/** \brief vertical offset to the origin of graphics coordinates */
|
|
|
|
int y_offset;
|
|
|
|
Fl_Widget_Surface(Fl_Graphics_Driver *d);
|
2016-02-26 20:45:13 +03:00
|
|
|
public:
|
2016-03-03 03:07:17 +03:00
|
|
|
virtual void translate(int x, int y);
|
2019-04-12 11:32:46 +03:00
|
|
|
virtual void untranslate();
|
2016-04-30 18:07:16 +03:00
|
|
|
void draw(Fl_Widget* widget, int delta_x = 0, int delta_y = 0);
|
2023-10-31 20:33:04 +03:00
|
|
|
void draw_decorated_window(Fl_Window *win, int x_offset = 0, int y_offset = 0);
|
2018-05-04 18:11:47 +03:00
|
|
|
void print_window_part(Fl_Window *win, int x, int y, int w, int h, int delta_x = 0, int delta_y = 0);
|
2016-02-26 15:51:47 +03:00
|
|
|
virtual int printable_rect(int *w, int *h);
|
|
|
|
virtual void origin(int x, int y);
|
|
|
|
virtual void origin(int *x, int *y);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* Fl_Widget_Surface_h */
|