The Gnome Chemistry Utils
0.12.11
Main Page
Namespaces
Classes
Files
File List
File Members
libs
gcp
gcp/window.h
Go to the documentation of this file.
1
/*
2
* GChemPaint library
3
* window.h
4
*
5
* Copyright (C) 2006-2008 Jean Bréfort <jean.brefort@normalesup.org>
6
*
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License as
9
* published by the Free Software Foundation; either version 2 of the
10
* License, or (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
20
* USA
21
*/
22
23
24
#ifndef GCP_WINDOW_H
25
#define GCP_WINDOW_H
26
27
#include "
target.h
"
28
#include <gtk/gtkwidget.h>
29
#include <gtk/gtkuimanager.h>
30
32
namespace
gcp {
33
34
class
Application;
35
class
Document;
36
41
class
Window
:
public
Target
42
{
43
public
:
63
Window
(
gcp::Application
*app,
char
const
*theme = NULL,
char
const
*extra_ui = NULL)
throw
(std::runtime_error);
64
virtual
~Window
();
65
69
void
OnFileNew
();
73
void
OnFileOpen
();
77
void
OnProperties
();
81
void
SetActive
(
gcp::Document
* pDoc, GtkWidget* w);
85
void
OnUndo
();
89
void
OnRedo
();
93
void
OnSelectAll
();
97
void
OnPasteSelection
();
101
void
OnCutSelection
();
105
void
OnCopySelection
();
109
void
OnDeleteSelection
();
113
void
OnPreferences
();
119
void
Zoom
(
double
zoom);
123
void
ClearStatus
();
129
void
SetStatusText
(
const
char
* text);
133
void
Show
();
137
bool
OnKeyPressed
(GtkWidget* widget, GdkEventKey* ev);
142
bool
OnKeyReleased
(GtkWidget* widget, GdkEventKey* ev);
146
bool
Close
();
147
151
virtual
void
OnSave
();
155
virtual
char
const
*
GetDefaultTitle
();
156
160
void
Destroy
();
166
void
SetTitle
(
char
const
*title);
179
void
ActivateActionWidget
(
char
const
*path,
bool
activate);
187
bool
VerifySaved
();
191
void
OnPageSetup
();
192
193
protected
:
197
GtkUIManager*
m_UIManager
;
198
199
private
:
200
GtkWidget* m_Bar;
//GtkStatusBar
201
unsigned
m_statusId;
202
unsigned
m_MessageId;
//currently displayed message in the status bar
203
};
204
205
}
// namespace gcp
206
207
#endif // GCP_WINDOW_H
Generated on Tue Jun 26 2012 08:44:53 for The Gnome Chemistry Utils by
1.8.1.1