Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
15fa8cb0
Commit
15fa8cb0
authored
Feb 16, 2010
by
Alexander Wiebel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADD] icon for module
parent
1efe3fcf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
0 deletions
+38
-0
src/modules/template/WMTemplate.cpp
src/modules/template/WMTemplate.cpp
+12
-0
src/modules/template/WMTemplate.h
src/modules/template/WMTemplate.h
+5
-0
src/modules/template/template.png
src/modules/template/template.png
+0
-0
src/modules/template/template.xpm
src/modules/template/template.xpm
+21
-0
No files found.
src/modules/template/WMTemplate.cpp
View file @
15fa8cb0
...
...
@@ -34,6 +34,7 @@
#include "../../common/WColor.h"
#include "WMTemplate.h"
#include "template.xpm"
WMTemplate
::
WMTemplate
()
:
WModule
()
...
...
@@ -81,6 +82,17 @@ boost::shared_ptr< WModule > WMTemplate::factory() const
return
boost
::
shared_ptr
<
WModule
>
(
new
WMTemplate
()
);
}
const
char
**
WMTemplate
::
getXPMIcon
()
const
{
// The template_xpm char array comes from the template.xpm file as included above.
// Such char arrays, i.e. files, can be easily created using an image manipulation program
// like GIMP. Be aware that the xpm file is a simple header file. Thus it contains real
// code. This code can be manipulated by hand. Unfortunately, you really have to fix the
// xpm files produced by gimp. You need to make the char array const in order to prevent
// compiler warnings or even errors.
return
template_xpm
;
}
const
std
::
string
WMTemplate
::
getName
()
const
{
// Specify your module name here. This name must be UNIQUE!
...
...
src/modules/template/WMTemplate.h
View file @
15fa8cb0
...
...
@@ -72,6 +72,11 @@ public:
*/
virtual
boost
::
shared_ptr
<
WModule
>
factory
()
const
;
/**
* Get the icon for this module in XPM format.
*/
virtual
const
char
**
getXPMIcon
()
const
;
protected:
/**
...
...
src/modules/template/template.png
0 → 100644
View file @
15fa8cb0
165 Bytes
src/modules/template/template.xpm
0 → 100644
View file @
15fa8cb0
/* XPM */
static const char * template_xpm[] = {
"16 16 2 1",
" c None",
". c #000000",
" ",
" ",
" .......... ",
" .......... ",
" .. ",
" .. ",
" .. ",
" .. ",
" .. ",
" .. ",
" .. ",
" .. ",
" .. ",
" .. ",
" .. ",
" "};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment