By Bryan Wu, on 六月 10th, 2009, Category: C++ Programming
Tags: C++, cross platform, FLTK, GUI, LGPL, Programming, Qt, wxWidgets
By Bryan Wu, on 六月 3rd, 2009, Category: Code Insight, Open Source, wxWidgets
Tags: Book, C++, cross platform, GUI, Open Source, Programming, Python, wxPython, wxWidgets, 下载, 编程
以前通过学习Python认识了wxPython,那里面有很多文档和源代码实例可以参考学习,对编程帮助很大。后来在C++项目中也需要用到wxWidgets,发现这本书非常实用,结合wxWidgets的官方手册,编程感觉非常畅快。特别推荐大家阅读,如果你对wxWidgets编程感兴趣的话。有什么读书心得也可以跟贴共享给大家。
wxWidgets now has its own 700-page book to help you learn or brush up on your cross-platform programming skills. Written by Julian Smart and Kevin Hock with Stefan Csomor, "Cross-Platform GUI Programming with wxWidgets" was published on July 27th 2005 by Prentice Hall. It’s part of Bruce Perens’ Open Source Series.
Continue reading Book: Cross-Platform GUI Programming with wxWidgets (Bruce Perens)(含中英文版本下载地址) - 全文阅读
By Bryan Wu, on 六月 3rd, 2009, Category: C++ Programming, Code::Blocks
Tags: C++, code blocks, GUI, MinGW, SDL, UI, 多媒体, 编译
1 首先去下载一份最新版的 CodeBlocks;2 在SDL官方下载一份SDL-MingW版;3 开始我们的SDL之旅吧
首先建立一个空的项目并且选择编译规则为Gcc;其次在编译和调试选项中设置好SDL的库目录。这里值得注意的是在项目工程属性中 编译目标 中的 选项设置类型为 Gui applications;最后在编译和调试选项中的 连接设置中的 其他链接选项 输入-lmingw32 -lSDLmain –lSDL
Continue reading CodeBlocks下SDL编译成功实例 - 全文阅读
By Bryan Wu, on 五月 25th, 2009, Category: C++ Programming, CodeLite IDE, wxWidgets
Tags: accelerator, CodeLite IDE, GUI, plugin, Singleton Pattern, Splash Screen, wxApp, wxFrame, wxGTK, 代码分析, 插件
转载请注明出处,该文章来源于cbforge.com by Bryan Wu. CodeLite IDE的主应用程序类实现在文件 /liteeditor/app.cpp中,系统初始化时,从wxApp继承的App类会调用OnInit成员函数,bool App::OnInit()
- If it is Linux or MAC system, block signal pipe first;
- wxSocketBase::Initialize();
- 打开fatal exception handler,假如系统crash,会调用wxApp::OnFatalException,在此处可以采集一些调试信息;
- InitXmlResource:通过wxMemoryFSHandler加载资源文件到内存,包括很多PNG文件和xml文件;
- 调用wxCmdLineParser解析命令行参数,命令行描述如下:
假如是h,会打印帮助并推出,如果有b,重新设置basedir。static const wxCmdLineEntryDesc cmdLineDesc[] = {
{wxCMD_LINE_SWITCH, “v“, “version”, “Print current version”, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{wxCMD_LINE_SWITCH, “h“, “help”, “Print usage”, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{wxCMD_LINE_OPTION, “l“, “line”, “Open the file at a given line number”, wxCMD_LINE_VAL_NUMBER, wxCMD_LINE_PARAM_OPTIONAL },
{wxCMD_LINE_OPTION, “b“, “basedir”, “The base directory of CodeLite”, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
{wxCMD_LINE_PARAM, NULL, NULL, “Input file”, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE|wxCMD_LINE_PARAM_OPTIONAL },
{wxCMD_LINE_NONE }
};
- 设置各种目录,包括homeDir,installPath,CurDir,StartupDir等;
- Load Menu resource, rc/menu.xrc
- Initialize the configuration file locater,ConfFileLocator::Instance()->Initialize
- 初始化Manager类,该类从Singleton Pattern template而来;
- read the last frame size from the configuration file and initialise editor configuration files;
- 加入SingleInstance为真,我们需要通过调用wxSingleInstanceChecker来检查CodeLite运行实例是否唯一;
- Update PATH environment variable with the install directory and MinGW default installation (if exists)
- 显示splash screen,图片存储在 /images/splashscreen.png(可选,配置在GeneralInfo中)
- 重头戏来了,Frame::Initialize,初始化Frame中会包括很多内容,下面详述;
- update the accelerators table;
- 显示由第14步初始化的Frame并置为top window;
- 刚才第5步中解析的结果中如果有line,和input file,会依次打开并跳转至line-1行;
- 最后一步:通过wxLogMessage打印Install path和Startup Path信息,Over。
Continue reading CodeLite Initializaion analysis - 初始化流程分析(1) - 全文阅读
By Bryan Wu, on 五月 6th, 2009, Category: Code::Blocks, wxWidgets
Tags: C++, code blocks, GPL, GUI, RAD, wxSmith, wxWidgets
wxSmith在CB中可以协助你快速开发wxWidgets界面部分。
Comparison of wxSmith features
Here is a list of wxSmith features when compared to other wxWidgets RAD solutions.
Note that support for new features are added on a daily basis for some of these RADs.
Contents
[hide]
General information
Basic general information about the RADs: developer, license/price etc.
RAD Developer Cost (USD) Open source Software licence
wxSmith Bartlomiej Swiecki Free Yes GPL
Continue reading 关于wxSmith与其他RAD之间的比较 - 全文阅读
|
|
|