Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Led plugin
ZinnJonas:
Hi all,
I found an old wxCode LedCtrl and want to integrate this in one of my projects.
This was for me the Reason to read how to write a wxSmithPlugin.
One Single Led is to less for a own Plugin ;D, so i searched for more LEDCtrls
and put them together in these Plugin.
The Ctrls are:
wxLed ( wxCode)
wxLCDWindow ( wxCode)
wxLEDPanel ( wxCode)
wxLEDNumberCtrl (gizmos)
The Led and the LedPanel, don't like the Proportion flag.
The Led can't be resized it has a fixed size.
The LedPanel can also Load Images and animation and scroll them, but it doesn't work for me with the
current Propgrid.
The Link to the Plug in is:
https://sourceforge.net/projects/wxledplugin/files/wxSmithLed.zip/download
Br
Jonas
MortenMacFly:
--- Quote from: ZinnJonas on September 14, 2010, 09:47:41 pm ---I found an old wxCode LedCtrl and want to integrate this in one of my projects.
--- End quote ---
What are actually your sources for the components? If I look at e.g. the "led" component than on wxCode there is a different version in HEAD (CVS version). Also I didn't find "LedCtrl" on wxCode?! Can you clarify the exact resources including versions your 3rd party components are based on, please?
ZinnJonas:
Hi,
first the LedCtrl was mine fault, because the wxCode Led is placed in a folder called LedCtrl on my computer.
LedCtr = wxLed.
wxLed, wxLCDWindow and LedPanel are from the wxCode Site.
wxLEDNumberCtrl was in the wxWidgets contrib folder.
the wxLed source was modified by me, because
so it can communicate on a simple way with wxSmith.
So I changed the Constructor
form
--- Code: ---wxLed (wxWindow * parent, wxWindowID id, const char * disabledColor = "000000", const wxPoint & pos = wxDefaultPosition, const wxSize & size = wxDefaultSize);
--- End code ---
to
--- Code: ---wxLed (wxWindow * parent, wxWindowID id, wxColour disabledColor = wxColour( 00,00,00), wxColour enableColour = wxColour( 00, 255, 00), const wxPoint & pos = wxDefaultPosition, const wxSize & size = wxDefaultSize);
--- End code ---
The reason is you don't need the html-Style for the Colors and you can use the
Enable flag from the wxPropgrid to draw the Led on or of.
So I had to change some small things in the other function too.
2 more Function in the source
--- Code: ---void Disable( void);
bool IsEnabled( void);
--- End code ---
The wxLCDWindow is nearly original
only the header was changed from
<wx/wxprec.h>
to
<wx/wx.h>
wxLEDPanel wasn't changed by me
and wxLEDNumberCtrl,
here I removed all the WXDLLIMPEXP_GIZMOS from the source.
to compile a libwx....a the other .cbp is in the folder ;D
Br
Jonas
p.s:
I'm not a English native so my english isn't the best ;D
Cryogen:
Hey Jonas,
Always good to see another plug-in. :-)
I might be able to have a look for you as well, if I get some time. In the meantime, there are some nice LED controls available in wxSmithKWIC which you could play with. It's available from the wxSmithAddons link below.
Cheers,
Cryo.
ZinnJonas:
Hi,
Now the wxSmithLed is Unicode friendly ;D.
And change some Color settings etc.;D
Cryogen i know the KWIC controls, but I can't compile your wxSmithKWIC, because there are to much
you have to change, to make it run.
;D
Br
Jonas
Navigation
[0] Message Index
[#] Next page
Go to full version