1 /*
2 * This file is part of wxSmithContribItems 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 * $Revision: 10749 $
20 * $Id: wxSmithContribItems.cpp 10749 2016-01-31 09:07:41Z mortenmacfly $
21 * $HeadURL: svn://svn.code.sf.net/p/codeblocks/code/branches/release-20.xx/src/plugins/contrib/wxSmithContribItems/wxSmithContribItems.cpp $
22 */
23 
24 #include <sdk.h> // Code::Blocks SDK
25 #include <configurationpanel.h>
26 #include "wxSmithContribItems.h"
27 
28 // Register the plugin with Code::Blocks.
29 // We are using an anonymous namespace so we don't litter the global one.
30 namespace
31 {
32     PluginRegistrant<wxSmithContribItems> reg(_T("wxSmithContribItems"));
33 }
34 
35 
36 
37 // constructor
wxSmithContribItems()38 wxSmithContribItems::wxSmithContribItems()
39 {
40     // Make sure our resources are available.
41     // In the generated boilerplate code we have no resources but when
42     // we add some, it will be nice that this code is in place already ;)
43     /*
44     if(!Manager::LoadResource(_T("wxSmithContribItems.zip")))
45     {
46         NotifyMissingFile(_T("wxSmithContribItems.zip"));
47     }
48     */
49 }
50 
51 // destructor
~wxSmithContribItems()52 wxSmithContribItems::~wxSmithContribItems()
53 {
54 }
55 
OnAttach()56 void wxSmithContribItems::OnAttach()
57 {
58 	// do whatever initialization you need for your plugin
59 	// NOTE: after this function, the inherited member variable
60 	// m_IsAttached will be TRUE...
61 	// You should check for it in other functions, because if it
62 	// is FALSE, it means that the application did *not* "load"
63 	// (see: does not need) this plugin...
64 }
65 
OnRelease(cb_unused bool appShutDown)66 void wxSmithContribItems::OnRelease(cb_unused bool appShutDown)
67 {
68 	// do de-initialization for your plugin
69 	// if appShutDown is true, the plugin is unloaded because Code::Blocks is being shut down,
70 	// which means you must not use any of the SDK Managers
71 	// NOTE: after this function, the inherited member variable
72 	// m_IsAttached will be FALSE...
73 }
74