-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOpenFrameworks.h
More file actions
125 lines (112 loc) · 4.81 KB
/
OpenFrameworks.h
File metadata and controls
125 lines (112 loc) · 4.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/***************************************************************
* Name: OpenFrameworks
* Purpose: Code::Blocks plugin
* Author: Diederick ([email protected])
* Created: 2009-07-28
* Copyright: Diederick
* License: GPL
**************************************************************/
#ifndef OpenFrameworks_H_INCLUDED
#define OpenFrameworks_H_INCLUDED
// For compilers that support precompilation, includes <wx/wx.h>
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
#include <cbplugin.h> // for "class cbToolPlugin"
#include <tinyxml.h>
#include <vector>
#include "InstallParser.h"
#include "AddonDialog.h"
/**
* This is the main class for the openFrameworks plugin which
* let you easily install/add new addons to your openFramework
* project.
*
* This plugin uses the install.xml files of the addons to add
* addons to your project.
*
* Please contact me for questions or improvements!
*
* Note:
* ------------------------------------------------------------
* 1) Creating a .cbplugin file
* ------------------------------------------------------------
* There were some things I needed to change/create when I started
* this plugin. On of the things were the creation of the installable
* plugin for code::blocks. To create a .cbplugin file you need to
* package your plugin in a zip. On windows you can do this by
* adding these lines to you post build options:
*
* "C:\Program Files\7-Zip\7z.exe" a -tzip OpenFrameworks.zip manifest.xml
* "C:\Program Files\7-Zip\7z.exe" a -tzip OpenFrameworks.cbplugin OpenFrameworks.dll OpenFrameworks.zip
*
* We used the opensource 7-zip here.
*
* ------------------------------------------------------------
* 2) Linking against the correct file..
* ------------------------------------------------------------
* While developing I used the svn version. But when I wanted to
* test this plugin I had to link it against the installed code::blocks
* on my computer if I remember correctly.
* See the build options > search directories.
*
*
* ------------------------------------------------------------
* 3) Link order
* ------------------------------------------------------------
* I had some trouble fixing the install.xml of ofxOsc. Somehow it
* wouldnt link agains ws2_32 on windows. The "oscpack.a" linkage must
* be above the -ws2_32 linker options. Therefore I changed the order
* at which the libs are added to the linker options. All libs are
* added to the top of the libs. So In your install.xml you need to
* put the lib which must be linked against first at the bottom
* of the <link> items.
*
* @author Diederick Huijbers <[email protected]
*
*
* When you want to compile your plugin on the Mac, check out this page:
* http://wiki.codeblocks.org/index.php?title=Compiling_Code::Blocks_in_Mac_OS_X
*/
class OpenFrameworks : public cbToolPlugin
{
public:
/** Constructor. */
OpenFrameworks();
/** Destructor. */
virtual ~OpenFrameworks();
/** @brief Execute the plugin.
*
* This is the only function needed by a cbToolPlugin.
* This will be called when the user selects the plugin from the "Plugins"
* menu.
*/
virtual int Execute();
void addAddons(std::vector<AddonFile> oAddons, std::vector<AddonFile> oAvailableAddons);
void removeAddons(std::vector<AddonFile> oAddons);
protected:
/** Any descendent plugin should override this virtual method and
* perform any necessary initialization. This method is called by
* Code::Blocks (PluginManager actually) when the plugin has been
* loaded and should attach in Code::Blocks. When Code::Blocks
* starts up, it finds and <em>loads</em> all plugins but <em>does
* not</em> activate (attaches) them. It then activates all plugins
* that the user has selected to be activated on start-up.\n
* This means that a plugin might be loaded but <b>not</b> activated...\n
* Think of this method as the actual constructor...
*/
virtual void OnAttach();
/** Any descendent plugin should override this virtual method and
* perform any necessary de-initialization. This method is called by
* Code::Blocks (PluginManager actually) when the plugin has been
* loaded, attached and should de-attach from Code::Blocks.\n
* Think of this method as the actual destructor...
* @param appShutDown If true, the application is shutting down. In this
* case *don't* use Manager::Get()->Get...() functions or the
* behaviour is undefined...
*/
virtual void OnRelease(bool appShutDown);
private:
};
#endif // OpenFrameworks_H_INCLUDED