Back to index

texmacs  1.0.7.15
aqua_simple_widget.h
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : aqua_simple_widget.hpp
00004 * DESCRIPTION: Aqua simple widget class
00005 * COPYRIGHT  : (C) 2007  Massimiliano Gubinelli
00006 *******************************************************************************
00007 * This software falls under the GNU general public license version 3 or later.
00008 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
00009 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
00010 ******************************************************************************/
00011 
00012 #ifndef AQUA_SIMPLE_WIDGET_H
00013 #define AQUA_SIMPLE_WIDGET_H
00014 
00015 #include "widget.hpp"
00016 
00017 #include "aqua_widget.h"
00018 
00019 class simple_widget_rep: public aqua_view_widget_rep {
00020 public:
00021   simple_widget_rep ();
00022        
00023   virtual void handle_get_size_hint (SI& w, SI& h);
00024   virtual void handle_notify_resize (SI w, SI h);
00025   virtual void handle_keypress (string key, time_t t);
00026   virtual void handle_keyboard_focus (bool has_focus, time_t t);
00027   virtual void handle_mouse (string kind, SI x, SI y, int mods, time_t t);
00028   virtual void handle_set_shrinking_factor (int sf);
00029   virtual void handle_clear (SI x1, SI y1, SI x2, SI y2);
00030   virtual void handle_repaint (SI x1, SI y1, SI x2, SI y2);
00031 
00032        virtual void send (slot s, blackbox val);
00033        // send a message val to the slot s
00034   virtual blackbox query (slot s, int type_id);
00035        // obtain information of a given type from the slot s
00036   virtual widget read (slot s, blackbox index);
00037        // abstract read access (of type s) of a subwidget at position index
00038   virtual void write (slot s, blackbox index, widget w);
00039        // abstract write access (of type s) of a subwidget at position index
00040   virtual void notify (slot s, blackbox new_val);
00041 
00042 
00043   virtual TMMenuItem *as_menuitem();
00044 };
00045 
00046 #endif // defined AQUA_SIMPLE_WIDGET_H