Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Codeblocks ported to sqrat
BlueHazzard:
--- Quote from: oBFusCATed on April 07, 2014, 12:18:27 am ---I hope you know you can edit the wiki yourself (use the login details for the forum).
--- End quote ---
Yes, i edited the wiki a lot in the past ;)
in the actual implementation of c::b and squirrel this makes no difference but in the implementation with sqrat it wont work...
I will update the wiki, as soon as the sqrat port will go into trunk...
BlueHazzard:
* Add some basic wx controls functionality (didn't had time to test)
BlueHazzard:
* Add more controls. Now implemented:
wxEvent, wxTextCtrl, wxButton, wxAnimationCtrl, wxCommandLinkButton, wxCheckBox, wxChoice, wxCollapsiblePane, wxComboBox, wxRadioBox, wxGauge, wxHyperlinkCtrl, wxRadioButton, wxListBox, wxCheckListBox, wxStaticText, wxSlider, wxToggleButton, wxSearchCtrl, wxColourPickerCtrl, wxDirPickerCtrl, wxFilePickerCtrl, wxTimer, wxSpinButton, wxSpinCtrl
i haven't exported all functions, only the important one.(Almost) All functions are documented with doxygen (markdown). The controls can't be created on "runtime", only imported from xrc files.
You can test the implemented controls with the xrc-test-plugin.
instruction:
--- Code: --- 1.a) Download https://github.com/bluehazzard/codeblocks_sf and compile it
1) Open Script console
2) Open "scripts/test/xrc-test-plugin.script"
3) Start test with Plugins->Test scripting-> Test XRC
4) open "scripts/test/xrc_test.xrc
5) test the controls and discover the gimmicks/bugs ;)
--- End code ---
my plan for the future:
* implement wxPropertyGrid (next main goal)
* implement the possibility to install script plugins with the Plugin->Manage Plugins-> install
* encapsulate script plugins in .cbplugin container (for delivering xrc and script files ins one container)
* implement wxFrame
* implement wxTreeCtrl
i think the main controls are implemented now. I don't know if tabs and ScrollBars are necessary...
greetings
LETARTARE:
Hello,
I unfortunately do not currently have the time to test your excellent work.
It's a pity, because I have "wxTranslatepluginForCB" transpose.
I recouped "https://github.com/bluehazzard/codeblocks_sf" by Tortoise.
Sincerely
oBFusCATed:
Two patches, so far:
http://cmpt.benbmp.org/codeblocks/patches/sqrat/0001-scripting-no-pch-build-fix.patch
http://cmpt.benbmp.org/codeblocks/patches/sqrat/0002-scripting-Fix-compilation-it-seems-that-Play-doesn-t.patch
I'm trying to make the thing to compile with autotools and noPCH.
And I'm hitting a road block:
--- Code: ---
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../../../../src/sdk/scripting/bindings -I../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../../../../src/include -I../../../../../src/sdk/wxscintilla/include -I../../../../../src/include/scripting/squirrel -I../../../../../src/include/scripting/bindings -I../../../../../src/include/scripting/sqrat -ansi -DTIXML_USE_STL -O2 -ffast-math -DCB_AUTOCONF -fPIC -DPIC -fexceptions -MT sq_wx/sq_wxBaseControls.lo -MD -MP -MF sq_wx/.deps/sq_wxBaseControls.Tpo -c ../../../../../src/sdk/scripting/bindings/sq_wx/sq_wxBaseControls.cpp -fPIC -DPIC -o sq_wx/.libs/sq_wxBaseControls.o
In file included from ../../../../../src/include/scripting/sqrat/sqrat/sqratTypes.h:39:0,
from ../../../../../src/include/scripting/sqrat/sqrat/sqratAllocator.h:35,
from ../../../../../src/include/scripting/sqrat/sqrat/sqratObject.h:34,
from ../../../../../src/include/scripting/sqrat/sqrat/sqratTable.h:34,
from ../../../../../src/include/scripting/sqrat/sqrat.h:33,
from ../../../../../src/include/scripting/bindings/sq_wx/sq_wx_type_handler.h:5,
from ../../../../../src/include/scripting/bindings/sq_wx/sq_wxBaseControls.h:4,
from ../../../../../src/sdk/scripting/bindings/sq_wx/sq_wxBaseControls.cpp:2:
../../../../../src/include/scripting/sqrat/sqrat/sqratClassType.h: In instantiation of ‘void* Sqrat::ClassTypeData<C, B>::Cast(SQUserPointer, SQUserPointer) [with C = wxSpinCtrl; B = wxSpinButton; SQUserPointer = void*]’:
../../../../../src/sdk/scripting/bindings/sq_wx/sq_wxBaseControls.cpp:1104:1: required from here
../../../../../src/include/scripting/sqrat/sqrat/sqratClassType.h:64:13: error: invalid static_cast from type ‘wxSpinCtrl*’ to type ‘wxSpinButton*’
../../../../../src/include/scripting/sqrat/sqrat/sqratClassType.h: In instantiation of ‘void* Sqrat::ClassTypeData<C, B>::Cast(SQUserPointer, SQUserPointer) [with C = wxGauge; B = wxGaugeBase; SQUserPointer = void*]’:
../../../../../src/sdk/scripting/bindings/sq_wx/sq_wxBaseControls.cpp:1104:1: required from here
../../../../../src/include/scripting/sqrat/sqrat/sqratClassType.h:64:13: error: invalid static_cast from type ‘wxGauge*’ to type ‘wxGaugeBase*’
../../../../../src/include/scripting/sqrat/sqrat/sqratClassType.h: In instantiation of ‘void* Sqrat::ClassTypeData<C, B>::Cast(SQUserPointer, SQUserPointer) [with C = wxComboBox; B = wxChoice; SQUserPointer = void*]’:
../../../../../src/sdk/scripting/bindings/sq_wx/sq_wxBaseControls.cpp:1104:1: required from here
../../../../../src/include/scripting/sqrat/sqrat/sqratClassType.h:64:13: error: invalid static_cast from type ‘wxComboBox*’ to type ‘wxChoice*’
Makefile:477: recipe for target 'sq_wx/sq_wxBaseControls.lo' failed
make[4]: *** [sq_wx/sq_wxBaseControls.lo] Error 1
--- End code ---
Is there any real reason you have to bind the wxXXXBase class? This is an implementation detail the wx user shouldn't care!
Other notes:
1. There is an include for sqplus in a lot of places, still.
2. sqrat/sqrat looks ugly, I'd prefer if you remove one of the levels.
3. It will be good if all public headers for scripting could be included without the need of additional paths
4. Please keep filename only with lower case letters and underscores.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version