source: projects/synaptic/trunk/gtk/rgwindow.h @ 280

Revision 280, 1.6 KB checked in by yasumichi, 15 years ago (diff)

first import

Line 
1/* rgwindow.h
2 *
3 * Copyright (c) 2000, 2001 Conectiva S/A
4 *               2002 Michael Vogt <mvo@debian.org>
5 *
6 * Author: Alfredo K. Kojima <kojima@conectiva.com.br>
7 *         Michael Vogt <mvo@debian.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 2 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * USA
23 */
24
25
26#ifndef _RGWINDOW_H_
27#define _RGWINDOW_H_
28
29#include <gtk/gtk.h>
30#include <string>
31
32using namespace std;
33
34class RGWindow {
35 protected:
36   GtkWidget *_win;
37   GtkWidget *_topBox;
38
39   static bool windowCloseCallback(GtkWidget *widget, GdkEvent * event);
40   virtual bool close();
41
42 public:
43   inline virtual GtkWidget *window() {
44      return _win;
45   };
46
47   virtual void setTitle(string title);
48
49   inline virtual void hide() {
50      gtk_widget_hide(_win);
51   };
52   inline virtual void show() {
53      gtk_widget_show(_win);
54   };
55
56   RGWindow() : _win(0), _topBox(0) {};
57   RGWindow(string name, bool makeBox = true);
58   RGWindow(RGWindow *parent, string name, bool makeBox = true,
59            bool closable = true);
60   virtual ~RGWindow();
61};
62
63#endif
Note: See TracBrowser for help on using the repository browser.