my log
[synfig.git] / synfig-studio / trunk / src / gtkmm / mod_palette / mod_palette.cpp
1 /* === S Y N F I G ========================================================= */
2 /*!     \file mod_palette.cpp
3 **      \brief Template File
4 **
5 **      $Id: mod_palette.cpp,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $
6 **
7 **      \legal
8 **      Copyright (c) 2002 Robert B. Quattlebaum Jr.
9 **
10 **      This software and associated documentation
11 **      are CONFIDENTIAL and PROPRIETARY property of
12 **      the above-mentioned copyright holder.
13 **
14 **      You may not copy, print, publish, or in any
15 **      other way distribute this software without
16 **      a prior written agreement with
17 **      the copyright holder.
18 **      \endlegal
19 */
20 /* ========================================================================= */
21
22 /* === H E A D E R S ======================================================= */
23
24 #ifdef USING_PCH
25 #       include "pch.h"
26 #else
27 #ifdef HAVE_CONFIG_H
28 #       include <config.h>
29 #endif
30
31 #include "mod_palette.h"
32 #include "dock_paledit.h"
33 #include "dock_palbrowse.h"
34
35 #include "../app.h"
36 #include "../dockmanager.h"
37
38 #endif
39
40 /* === U S I N G =========================================================== */
41
42 using namespace std;
43 using namespace etl;
44 using namespace synfig;
45 using namespace studio;
46
47 /* === M A C R O S ========================================================= */
48
49 /* === G L O B A L S ======================================================= */
50
51 /* === P R O C E D U R E S ================================================= */
52
53 /* === M E T H O D S ======================================================= */
54
55 bool
56 studio::ModPalette::start_vfunc()
57 {
58         dock_pal_edit=new Dock_PalEdit();
59         App::get_dock_manager()->register_dockable(*dock_pal_edit);
60
61         dock_pal_browse=new Dock_PalBrowse();
62         App::get_dock_manager()->register_dockable(*dock_pal_browse);
63         
64         return true;
65 }
66
67 bool
68 studio::ModPalette::stop_vfunc()
69 {
70         App::get_dock_manager()->unregister_dockable(*dock_pal_browse);
71         App::get_dock_manager()->unregister_dockable(*dock_pal_edit);
72
73         delete dock_pal_edit;
74         delete dock_pal_browse;
75
76         return true;
77 }