The Gnome Chemistry Utils  0.14.0
client.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  * Gnome Chemistry Utils
5  * gccv/client.h
6  *
7  * Copyright (C) 2008 Jean Bréfort <jean.brefort@normalesup.org>
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License as
11  * published by the Free Software Foundation; either version 3 of the
12  * License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
22  * USA
23  */
24 
25 #ifndef GCCV_CLIENT_H
26 #define GCCV_CLIENT_H
27 
28 #include <gcu/macros.h>
29 
32 namespace gccv {
33 
34 class Canvas;
35 class ItemClient;
36 
43 class Client {
44 friend class Canvas;
45 public:
49  Client ();
53  virtual ~Client ();
54 
55  // Signals
68  virtual bool OnButtonPressed (ItemClient *client, unsigned button, double x, double y, unsigned state);
82  virtual bool OnButtonReleased (ItemClient *client, unsigned button, double x, double y, unsigned state);
95  virtual bool OnMotion (ItemClient *client, double x, double y, unsigned state);
108  virtual bool OnDrag (ItemClient *client, double x, double y, unsigned state);
116  virtual bool OnLeaveNotify (unsigned state);
117 
125 };
126 
127 }
128 
129 #endif // GCCV_CLIENT_H