1 // -*- C++ -*-
2 
3 /*
4  * GChemPaint templates plugin
5  * templatetool.h
6  *
7  * Copyright (C) 2004-2007 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 GCHEMPAINT_TEMPLATETOOL_H
26 #define GCHEMPAINT_TEMPLATETOOL_H
27 
28 #include <gcp/tool.h>
29 
30 class gcpTemplate;
31 
32 namespace gcp {
33 	class Document;
34 }
35 
36 class gcpTemplateTool: public gcp::Tool
37 {
38 public:
39 	gcpTemplateTool (gcp::Application* App);
40 	~gcpTemplateTool ();
41 
42 	virtual bool OnClicked ();
43 	virtual void OnDrag ();
44 	virtual void OnRelease ();
GetTemplate()45 	gcpTemplate* GetTemplate () {return m_Template;}
46 	GtkWidget *GetPropertyPage ();
47 	void OnChanged (GtkComboBox *combo);
48 	void OnPreviewSize (GtkAllocation *allocation);
49 	void OnAddTemplate ();
50 	void OnDeleteTemplate ();
GetHelpTag()51 	char const *GetHelpTag () {return "templates";}
52 	void OnConfigChanged ();
53 
54 private:
55 	gcpTemplate* m_Template;
56 	GtkWidget *m_DeleteBtn;
57 	GtkNotebook *m_Book;
58 	int m_Width, m_Height;
59 };
60 
61 #endif //GCHEMPAINT_TEMPLATETOOL_H
62