~ubuntu-branches/ubuntu/quantal/texmacs/quantal

« back to all changes in this revision

Viewing changes to src/Window/Widget/basic_widget.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Atsuhito KOHDA, Kamaraju Kusumanchi, kohda
  • Date: 2008-04-06 15:11:41 UTC
  • mfrom: (1.1.7 upstream) (4.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080406151141-w0sg20jnv86mlt6f
Tags: 1:1.0.6.14-1
[Kamaraju Kusumanchi <kamaraju@gmail.com>]
* New upstream release
* 01_american.dpatch is updated
* Since thread support in guile-1.8 is now disabled, the segmentation faults
  should not arise anymore. More info at #439923. (Closes: #450499, #458685)
[kohda]
* This version fixed menu problem.  (Closes: #447083)
* Reverted orig.tar.gz to the upstream tarball.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
/******************************************************************************
3
 
* MODULE     : basic_widget.hpp
4
 
* DESCRIPTION: Basic widgets can handle the most common events
5
 
* COPYRIGHT  : (C) 1999  Joris van der Hoeven
6
 
*******************************************************************************
7
 
* This software falls under the GNU general public license and comes WITHOUT
8
 
* ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for more details.
9
 
* If you don't have this file, write to the Free Software Foundation, Inc.,
10
 
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
11
 
******************************************************************************/
12
 
 
13
 
#ifndef BASIC_WIDGET_H
14
 
#define BASIC_WIDGET_H
15
 
#include "widget.hpp"
16
 
#include "Event/basic_event.hpp"
17
 
 
18
 
class basic_widget_rep: public widget_rep {
19
 
protected:
20
 
  int ptr_focus; // subwidget where the pointer is (-1 if none)
21
 
 
22
 
public:
23
 
  basic_widget_rep (display dis, gravity grav= north_west);
24
 
  basic_widget_rep (display dis, array<widget> a, gravity grav= north_west);
25
 
  basic_widget_rep (display dis, array<widget> a, array<string> name,
26
 
                    gravity grav= north_west);
27
 
 
28
 
  event emit_position   (SI ox, SI oy, SI w, SI h, gravity grav= north_west);
29
 
  event emit_invalidate (SI x1, SI y1, SI x2, SI y2);
30
 
  event emit_mouse      (mouse_event ev);
31
 
  event emit_mouse      (mouse_event ev, string type);
32
 
  event emit_mouse      (mouse_event ev, string type, SI x, SI y);
33
 
  event emit_clear      (SI x1, SI y1, SI x2, SI y2);
34
 
  event emit_repaint    (SI x1, SI y1, SI x2, SI y2, bool& stop);
35
 
  event emit_find_child (SI x, SI y, int& which);
36
 
 
37
 
  virtual void handle_get_size       (get_size_event ev);
38
 
  virtual void handle_get_widget     (get_widget_event ev);
39
 
  virtual void handle_set_widget     (set_widget_event ev);
40
 
  virtual void handle_set_language   (set_language_event ev);
41
 
  virtual void handle_attach_window  (attach_window_event ev);
42
 
  virtual void handle_position       (position_event ev);
43
 
  virtual void handle_move           (move_event ev);
44
 
  virtual void handle_resize         (resize_event ev);
45
 
  virtual void handle_destroy        (destroy_event ev);
46
 
  virtual void handle_keypress       (keypress_event ev);
47
 
  virtual void handle_keyboard_focus (keyboard_focus_event ev);
48
 
  virtual void handle_mouse          (mouse_event ev);
49
 
  virtual void handle_alarm          (alarm_event ev);
50
 
  virtual void handle_clear          (clear_event ev);
51
 
  virtual void handle_repaint        (repaint_event ev);
52
 
  virtual void handle_update         (update_event ev);
53
 
  virtual void handle_invalidate     (invalidate_event ev);
54
 
  virtual void handle_keyboard_grab  (keyboard_grab_event ev);
55
 
  virtual void handle_mouse_grab     (mouse_grab_event ev);
56
 
  virtual void handle_request_alarm  (request_alarm_event ev);
57
 
  virtual void handle_find_child     (find_child_event ev);
58
 
  virtual bool handle                (event ev);
59
 
};
60
 
 
61
 
#endif // defined BASIC_WIDGET_H