-
Notifications
You must be signed in to change notification settings - Fork 8
fast_delegate
Freeman Zhang edited this page Apr 29, 2015
·
5 revisions
There's no doubt how important an event/delegate ("signal/slot" in Qt/libsigc++) mechanism implementation is in a GUI toolkit and there're already some successful C++ implementations, for example:
- Qt
- ligsigc++
- boost(signal2)
And also many excellent articles about fast delegate in C++ on the web. For example:
- Member Function Pointers and the Fastest Possible C++ Delegates by Don Clugston
- The Impossibly Fast C++ Delegates by by Sergey Ryazanov
- Fast C++ Delegate: Boost.Function 'drop-in' replacement and multicast by JaeWook Choi
- CppEvents by Nickolas V. Pohilets
BlendInt use libCppEvent to provide an object-oriented event/delegate framework. An event, for example, a button click event, can be connected to an view object:
button.clicked().connect(obj, &ViewObject::DoSth);
When you click a button in the window, the method ViewObject::DoSth() of obj will be called.
The event can be disconnected:
button.clicked().disconnect(obj, &ViewObject::DoSth);
Here is a quick guide of how to use libCppEvent.
The source code of libCppEvent in BlendInt:
Folder | Remark |
---|---|
Header | |
Source |
- Home
- Roadmap
- Known Issues
- Build from Source
- Using BlendInt
- H/W Requirements
- Fontconfig and Fonts
- Compile with BlendInt
- "Hello World" example
- Eclipse
- Xcode
- Tips
- Use BlendInt in real time app
- Use BlendInt in non-real time app
- Gallery
- Programming Guide
- Basic Class Diagrams
- Layout
- Draw
- Draw with OpenGL APIs
- Draw with Predefined Shaders
- Use event framework
- Process HID events from window system
- Memory Management
- MVC for ListView/TreeView
- Off-screen Render with FBO
- Write your custom Widget
- Write your custom Container
- Themes
- API Reference
- Development
- IDE Setup
- Code Layout 10-. Reporting a Bug
- FAQ