Debian Codegraph @

src/plugins/contrib/wxSmithSTC/wxsSmithSTC.cpp

raw
1 /*
2 * This file is part of wxSmithFoldbar plugin for Code::Blocks Studio
3 * Copyright (C) 2007 Bartlomiej Swiecki
4 *
5 * wxSmith is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * wxSmith is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with wxSmith; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
18 *
19 */
20
21 #include <sdk.h> // Code::Blocks SDK
22 #include <configurationpanel.h>
23 #include "wxsSmithSTC.h"
24
25 // Register the plugin with Code::Blocks.
26 // We are using an anonymous namespace so we don't litter the global one.
27 namespace
28 {
29 PluginRegistrant<wxsSmithSTC> reg(_T("wxsSmithSTC"));
30 }
31
32
33
34 // constructor
35 wxsSmithSTC::wxsSmithSTC()
36 {
37 // Make sure our resources are available.
38 // In the generated boilerplate code we have no resources but when
39 // we add some, it will be nice that this code is in place already ;)
40 /*
41 if(!Manager::LoadResource(_T("wxSmithContribItems.zip")))
42 {
43 NotifyMissingFile(_T("wxSmithContribItems.zip"));
44 }
45 */
46 }
47
48 // destructor
49 wxsSmithSTC::~wxsSmithSTC()
50 {
51 }
52
53 void wxsSmithSTC::OnAttach()
54 {
55 // do whatever initialization you need for your plugin
56 // NOTE: after this function, the inherited member variable
57 // m_IsAttached will be TRUE...
58 // You should check for it in other functions, because if it
59 // is FALSE, it means that the application did *not* "load"
60 // (see: does not need) this plugin...
61 }
62
63 void wxsSmithSTC::OnRelease(bool appShutDown)
64 {
65 // do de-initialization for your plugin
66 // if appShutDown is true, the plugin is unloaded because Code::Blocks is being shut down,
67 // which means you must not use any of the SDK Managers
68 // NOTE: after this function, the inherited member variable
69 // m_IsAttached will be FALSE...
70 }