List/Tree Widget
From Adobe Open Source Wiki
(Difference between revisions)
| Line 12: | Line 12: | ||
[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/treeview/treeview.asp?hidetoc=true Win32 Tree Control API Documentation (Tree View)] | [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/treeview/treeview.asp?hidetoc=true Win32 Tree Control API Documentation (Tree View)] | ||
| − | [http://developer.apple.com/documentation/Carbon/Conceptual/display_databrowser/ | + | [http://developer.apple.com/documentation/Carbon/Conceptual/display_databrowser/index.html| Carbon Tree Control API Documentation (Data Browser)] |
= API = | = API = | ||
Revision as of 20:36, 10 January 2007
(For the time being the focus will be on lists, not heirarchical trees.)
The tricky part of a list controller/view is that you have a controller/view on a sequence. You need to figure out:
- How to communicate requests for changes to the sequence
- What those requests are
- How to communicate a change in the visible portion of the sequence to the view
We assume the sequences in a list are disjoint.
Contents |
Related Docs
Win32 Tree Control API Documentation (Tree View)
Carbon Tree Control API Documentation (Data Browser)
API
This API set will be updated piecemeal as I am able to further the implementation
Typedefs
Assume for the time being that the model_type is simple:
typedef std::string value_type; typedef std::list<value_type> model_type; typedef model_type::iterator iterator; typedef std::pair<iterator, iterator> range_type; typedef std::vector<range_type> selection_type; typedef boost::function<void (iterator before, const selection_type&)> monitor_splice_callback_t;
Model
void splice(iterator before, const selection_type& value); void monitor_splice(const monitor_splice_callback_t& how);
View
void splice(iterator before, const selection_type& value);
Controller
void monitor_splice(const monitor_splice_callback_t& how);