Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/headers/win
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8573/adobe-source/adobe/test/visual/headers/win
Modified Files:
ui_core_implementation.hpp
Log Message:
Event handling in Win32 has been rewritten. Most of the custom window procedures have been removed to allow for a more traditional event handling mechanism.
I will add modifiers in a later commit, as I am still experimenting with the best way to capture modifier events.
Index: ui_core_implementation.hpp
===================================================================
RCS file: /cvsroot/adobe-source/sandbox/adobe-source/adobe/test/visual/headers/win/ui_core_implementation.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ui_core_implementation.hpp 1 Apr 2005 19:11:49 -0000 1.6
--- ui_core_implementation.hpp 4 Apr 2005 23:32:24 -0000 1.7
***************
*** 87,91 ****
void set_bounds(const point_t& position, const rectangle_t& geometry);
void set_name(const std::string& name);
! virtual void set_theme(theme_t theme);
void adorn_theme(theme_t theme);
void unadorn_theme(theme_t theme);
--- 87,91 ----
void set_bounds(const point_t& position, const rectangle_t& geometry);
void set_name(const std::string& name);
! virtual void set_theme(theme_t theme);
void adorn_theme(theme_t theme);
void unadorn_theme(theme_t theme);
***************
*** 96,99 ****
--- 96,114 ----
void signal_focus(const implementation::control_focus_proc_t& proc);
void trap_window_proc(WNDPROC new_window_proc);
+ //
+ /// This function is invoked when the parent window of this control recieves a message
+ /// generated by the control's window.
+ ///
+ /// \param message Windows message code.
+ /// \param wParam pointer parameter.
+ /// \param lParam long parameter.
+ //
+ virtual LRESULT event(UINT message, WPARAM wParam, LPARAM lParam);
+ //
+ /// This function is invoked when one of the modifier keys is pressed or released.
+ ///
+ /// \param modifiers the modifier keys currently pressed.
+ //
+ virtual void modify(modifiers_t modifiers);
ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::control_t);
***************
*** 110,113 ****
--- 125,131 ----
point_t position_m; // saving set_bounds param for widget framing
int uxtheme_type_m;
+ static HWND invisible_parent_m; // an invisible window used as the initial parent for all controls.
+ class event_dispatcher& event_dispatcher_m; // event handling mechanism.
+ HMENU child_id_m; // this control_m's child id.
#ifndef NDEBUG
bool placed_m; // used in the framing rect code to make sure the widget is placed first
***************
*** 202,205 ****
--- 220,224 ----
void set_value(const value_t& new_value);
void signal_value_change(const implementation::tab_group_value_proc_t& proc);
+ virtual LRESULT event(UINT msg, WPARAM wParam, LPARAM lParam);
ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::tab_group_t::implementation_t);
***************
*** 246,249 ****
--- 265,269 ----
void set_value(modifiers_t modifiers, const value_t& value);
void set_contributing(modifiers_t modifiers, const dictionary_t& value);
+ virtual void modify(modifiers_t modifiers);
ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::button_t::implementation_t);
***************
*** 254,257 ****
--- 274,278 ----
state_set_t state_set_m;
+ modifiers_t modifiers_m;
//EventHandlerRef handler_ref_m;
};
***************
*** 419,422 ****
--- 440,444 ----
void signal_post_edit(const implementation::edit_text_post_edit_proc_t& proc);
void signal_label_hit(const implementation::edit_text_label_hit_proc_t& proc);
+ virtual LRESULT event(UINT msg, WPARAM wParam, LPARAM lParam);
ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::edit_text_t::implementation_t);
***************
*** 425,429 ****
static_text_t name_m;
! std::string field_text_m;
static_text_t static_disabled_text_m;
//HWND scroll_control_m;
--- 447,451 ----
static_text_t name_m;
! std::wstring field_text_m;
static_text_t static_disabled_text_m;
//HWND scroll_control_m;
***************
*** 466,469 ****
--- 488,492 ----
void select_with_text(const std::string& text);
void signal_value_change(const implementation::popup_value_proc_t& proc);
+ virtual LRESULT event(UINT message, WPARAM wParam, LPARAM lParam);
ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::popup_t::implementation_t);
***************
*** 502,511 ****
void set_static_disabled(bool is_static_disabled);
! void add_popup_menu_item(const std::string& name, const adobe::value_t& value)
! { get_popup().add_menu_item(name, value); }
! void select_popup_with_text(const std::string& text)
! { get_popup().select_with_text(text); }
! void signal_popup_value_change(implementation::popup_value_proc_t proc)
! { get_popup().signal_value_change(proc); }
ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::unit_edit_text_t::implementation_t);
--- 525,531 ----
void set_static_disabled(bool is_static_disabled);
! void add_popup_menu_item(const std::string& name, const adobe::value_t& value);
! void select_popup_with_text(const std::string& text);
! void signal_popup_value_change(implementation::popup_value_proc_t proc);
ADOBE_SERIALIZABLE_TOTAL_ORDERING_BOILERPLATE_FRIEND_DECLARATION(adobe::unit_edit_text_t::implementation_t);
|