1 2 /****************************************************************************** 3 * MODULE : aqua_simple_widget.hpp 4 * DESCRIPTION: Aqua simple widget class 5 * COPYRIGHT : (C) 2007 Massimiliano Gubinelli 6 ******************************************************************************* 7 * This software falls under the GNU general public license version 3 or later. 8 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE 9 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>. 10 ******************************************************************************/ 11 12 #ifndef AQUA_SIMPLE_WIDGET_H 13 #define AQUA_SIMPLE_WIDGET_H 14 15 #include "widget.hpp" 16 17 #include "aqua_widget.h" 18 19 class simple_widget_rep: public aqua_view_widget_rep { 20 public: 21 simple_widget_rep (); 22 23 virtual void handle_get_size_hint (SI& w, SI& h); 24 virtual void handle_notify_resize (SI w, SI h); 25 virtual void handle_keypress (string key, time_t t); 26 virtual void handle_keyboard_focus (bool has_focus, time_t t); 27 virtual void handle_mouse (string kind, SI x, SI y, int mods, time_t t); 28 virtual void handle_set_zoom_factor (double zoom); 29 virtual void handle_clear (SI x1, SI y1, SI x2, SI y2); 30 virtual void handle_repaint (SI x1, SI y1, SI x2, SI y2); 31 32 virtual void send (slot s, blackbox val); 33 // send a message val to the slot s 34 virtual blackbox query (slot s, int type_id); 35 // obtain information of a given type from the slot s 36 virtual widget read (slot s, blackbox index); 37 // abstract read access (of type s) of a subwidget at position index 38 virtual void write (slot s, blackbox index, widget w); 39 // abstract write access (of type s) of a subwidget at position index 40 virtual void notify (slot s, blackbox new_val); 41 42 43 virtual TMMenuItem *as_menuitem(); 44 }; 45 46 #endif // defined AQUA_SIMPLE_WIDGET_H 47