The Gnome Chemistry Utils
0.14.0
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-2011 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 3 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/gtk.h>
29
32
namespace
gcugtk {
33
class
UIManager;
34
}
35
36
namespace
gcp {
37
38
class
Application;
39
class
Document;
40
45
class
Window
:
public
Target
46
{
47
friend
class
WindowPrivate;
48
public
:
68
Window
(
gcp::Application
*app,
char
const
*theme = NULL,
char
const
*extra_ui = NULL)
throw
(std::runtime_error);
69
virtual
~Window
();
70
74
void
OnFileNew
();
78
void
OnFileOpen
();
82
void
OnProperties
();
86
void
SetActive
(
gcp::Document
* pDoc, GtkWidget* w);
90
void
OnUndo
();
94
void
OnRedo
();
98
void
OnSelectAll
();
102
void
OnPasteSelection
();
106
void
OnCutSelection
();
110
void
OnCopySelection
();
114
void
OnDeleteSelection
();
118
void
OnPreferences
();
124
void
Zoom
(
double
zoom);
128
void
ClearStatus
();
134
void
SetStatusText
(
const
char
* text);
138
void
Show
();
142
bool
OnKeyPressed
(GtkWidget* widget, GdkEventKey* ev);
147
bool
OnKeyReleased
(GtkWidget* widget, GdkEventKey* ev);
151
bool
Close
();
152
156
virtual
void
OnSave
();
160
virtual
char
const
*
GetDefaultTitle
();
161
165
void
Destroy
();
171
void
SetTitle
(
char
const
*title);
179
bool
VerifySaved
();
183
void
OnPageSetup
();
184
185
private
:
186
GtkWidget* m_Bar;
//GtkStatusBar
187
unsigned
m_statusId;
188
unsigned
m_MessageId;
//currently displayed message in the status bar
189
};
190
191
}
// namespace gcp
192
193
#endif // GCP_WINDOW_H
Generated on Tue Jan 1 2013 22:29:23 for The Gnome Chemistry Utils by
1.8.1.2