mail[Wesnoth-commits] r25037 - in /trunk/src/gui/widgets: button.cpp button.hpp event_handler.cpp event_handler.hpp widget.hpp window.cpp window.hpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by koraq on March 23, 2008 - 22:52:
Author: mordante
Date: Sun Mar 23 22:52:20 2008
New Revision: 25037

URL: http://svn.gna.org/viewcvs/wesnoth?rev=25037&view=rev
Log:
Rename tevent_info to tevent_handler.

Modified:
    trunk/src/gui/widgets/button.cpp
    trunk/src/gui/widgets/button.hpp
    trunk/src/gui/widgets/event_handler.cpp
    trunk/src/gui/widgets/event_handler.hpp
    trunk/src/gui/widgets/widget.hpp
    trunk/src/gui/widgets/window.cpp
    trunk/src/gui/widgets/window.hpp

Modified: trunk/src/gui/widgets/button.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/button.cpp?rev=25037&r1=25036&r2=25037&view=diff
==============================================================================
--- trunk/src/gui/widgets/button.cpp (original)
+++ trunk/src/gui/widgets/button.cpp Sun Mar 23 22:52:20 2008
@@ -73,27 +73,27 @@
        tcontrol::set_label(label);
 }
 
-void tbutton::mouse_enter(tevent_info&) 
+void tbutton::mouse_enter(tevent_handler&) 
 { 
        DBG_G_E << "Button: mouse enter.\n"; 
 
        set_state(FOCUSSED);
 }
 
-void tbutton::mouse_hover(tevent_info&)
+void tbutton::mouse_hover(tevent_handler&)
 {
        DBG_G_E << "Button: mouse hover.\n"; 
 
 }
 
-void tbutton::mouse_leave(tevent_info&) 
+void tbutton::mouse_leave(tevent_handler&) 
 { 
        DBG_G_E << "Button: mouse leave.\n"; 
 
        set_state(ENABLED);
 }
 
-void tbutton::mouse_left_button_down(tevent_info& event) 
+void tbutton::mouse_left_button_down(tevent_handler& event) 
 { 
        DBG_G_E << "Button: left mouse button down.\n"; 
 
@@ -102,19 +102,19 @@
        set_state(PRESSED);
 }
 
-void tbutton::mouse_left_button_up(tevent_info&) 
+void tbutton::mouse_left_button_up(tevent_handler&) 
 { 
        DBG_G_E << "Button: left mouse button up.\n";
 
        set_state(FOCUSSED);
 }
 
-void tbutton::mouse_left_button_click(tevent_info&) 
+void tbutton::mouse_left_button_click(tevent_handler&) 
 { 
        DBG_G_E << "Button: left mouse button click.\n"; 
 }
 
-void tbutton::mouse_left_button_double_click(tevent_info&) 
+void tbutton::mouse_left_button_double_click(tevent_handler&) 
 { 
        DBG_G_E << "Button: left mouse button double click.\n"; 
 }

Modified: trunk/src/gui/widgets/button.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/button.hpp?rev=25037&r1=25036&r2=25037&view=diff
==============================================================================
--- trunk/src/gui/widgets/button.hpp (original)
+++ trunk/src/gui/widgets/button.hpp Sun Mar 23 22:52:20 2008
@@ -46,14 +46,14 @@
        void set_label(const t_string& label);
 
        
-       void mouse_enter(tevent_info&);
-       void mouse_hover(tevent_info&);
-       void mouse_leave(tevent_info&);
+       void mouse_enter(tevent_handler&);
+       void mouse_hover(tevent_handler&);
+       void mouse_leave(tevent_handler&);
 
-       void mouse_left_button_down(tevent_info& event);
-       void mouse_left_button_up(tevent_info&);
-       void mouse_left_button_click(tevent_info&);
-       void mouse_left_button_double_click(tevent_info&); //FIXME remove
+       void mouse_left_button_down(tevent_handler& event);
+       void mouse_left_button_up(tevent_handler&);
+       void mouse_left_button_click(tevent_handler&);
+       void mouse_left_button_double_click(tevent_handler&); //FIXME remove
 
        void draw(surface& canvas);
 

Modified: trunk/src/gui/widgets/event_handler.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/event_handler.cpp?rev=25037&r1=25036&r2=25037&view=diff
==============================================================================
--- trunk/src/gui/widgets/event_handler.cpp (original)
+++ trunk/src/gui/widgets/event_handler.cpp Sun Mar 23 22:52:20 2008
@@ -55,7 +55,7 @@
 //! At construction we should get the state and from that moment on we keep
 //! track of the changes ourselves, not yet sure what happens when an input
 //! blocker is used.
-tevent_info::tevent_info() :
+tevent_handler::tevent_handler() :
        // fixme get state at construction
        mouse_x_(-1),
        mouse_y_(-1),
@@ -79,7 +79,7 @@
        }
 }
 
-void tevent_info::handle_event(const SDL_Event& event, twidget* mouse_over)
+void tevent_handler::handle_event(const SDL_Event& event, twidget* 
mouse_over)
 {
        switch(event.type) {
                case SDL_MOUSEMOTION:
@@ -143,13 +143,13 @@
 
 }
 
-void tevent_info::mouse_capture(const bool capture)
+void tevent_handler::mouse_capture(const bool capture)
 {
        assert(mouse_focus_);
        mouse_captured_ = capture;
 }
 
-void tevent_info::mouse_enter(const SDL_Event& event, twidget* mouse_over)
+void tevent_handler::mouse_enter(const SDL_Event& event, twidget* mouse_over)
 {
        assert(mouse_over);
 
@@ -159,7 +159,7 @@
        set_hover();
 }
 
-void tevent_info::mouse_hover(const SDL_Event& event, twidget* mouse_over)
+void tevent_handler::mouse_hover(const SDL_Event& event, twidget* mouse_over)
 {
 
        const unsigned hover_id = *static_cast<unsigned*>(event.user.data1);
@@ -176,7 +176,7 @@
        had_hover_ = true;
 }
 
-void tevent_info::mouse_move(const SDL_Event& event, twidget* mouse_over)
+void tevent_handler::mouse_move(const SDL_Event& event, twidget* mouse_over)
 {
        // Note we use the fact that a NULL pointer evaluates to false
        // and non NULL pointer to true;
@@ -201,7 +201,7 @@
        }
 }
 
-void tevent_info::mouse_leave(const SDL_Event& event, twidget* mouse_over)
+void tevent_handler::mouse_leave(const SDL_Event& event, twidget* mouse_over)
 {
        assert(mouse_focus_);
 
@@ -212,7 +212,7 @@
        mouse_focus_ = 0;
 }
 
-void tevent_info::mouse_left_button_down(const SDL_Event& event, twidget* 
mouse_over)
+void tevent_handler::mouse_left_button_down(const SDL_Event& event, twidget* 
mouse_over)
 {
        if(mouse_left_button_down_) {
                WRN_G_E << "In 'left button down' but the mouse "
@@ -238,7 +238,7 @@
        }
 }
 
-void tevent_info::mouse_left_button_up(const SDL_Event& event, twidget* 
mouse_over)
+void tevent_handler::mouse_left_button_up(const SDL_Event& event, twidget* 
mouse_over)
 {
        if(!mouse_left_button_down_) {
                WRN_G_E << "In 'left button up' but the mouse "
@@ -292,7 +292,7 @@
 
 }
 
-void tevent_info::set_hover(const bool test_on_widget)
+void tevent_handler::set_hover(const bool test_on_widget)
 {
        // Only one hover event.
        if(had_hover_) {

Modified: trunk/src/gui/widgets/event_handler.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/event_handler.hpp?rev=25037&r1=25036&r2=25037&view=diff
==============================================================================
--- trunk/src/gui/widgets/event_handler.hpp (original)
+++ trunk/src/gui/widgets/event_handler.hpp Sun Mar 23 22:52:20 2008
@@ -25,10 +25,10 @@
 
 class twidget;
 
-class tevent_info 
+class tevent_handler 
 {
 public:
-       tevent_info();
+       tevent_handler();
 
        void handle_event(const SDL_Event& event, twidget* mouse_over);
 

Modified: trunk/src/gui/widgets/widget.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/widget.hpp?rev=25037&r1=25036&r2=25037&view=diff
==============================================================================
--- trunk/src/gui/widgets/widget.hpp (original)
+++ trunk/src/gui/widgets/widget.hpp Sun Mar 23 22:52:20 2008
@@ -83,27 +83,27 @@
 // wait for possible double click if widget wants double click
 // - mouse click
 
-       virtual void mouse_enter(tevent_info&) {}
-       virtual void mouse_move(tevent_info&) {}
-       virtual void mouse_hover(tevent_info&) {}
-       virtual void mouse_leave(tevent_info&) {}
-
-       virtual void mouse_left_button_down(tevent_info&) {}
-       virtual void mouse_left_button_up(tevent_info&) {}
-       virtual void mouse_left_button_click(tevent_info&) {}
-       virtual void mouse_left_button_double_click(tevent_info&) {}
-
-       virtual void mouse_middle_button_down(tevent_info&) {}
-       virtual void mouse_middle_button_up(tevent_info&) {}
-       virtual void mouse_middle_button_click(tevent_info&) {}
-       virtual void mouse_middle_button_double_click(tevent_info&) {}
-
-       virtual void mouse_right_button_down(tevent_info&) {}
-       virtual void mouse_right_button_up(tevent_info&) {}
-       virtual void mouse_right_button_click(tevent_info&) {}
-       virtual void mouse_right_button_double_click(tevent_info&) {}
-
-       virtual void window_resize(tevent_info&, const unsigned /* new_width 
*/, 
+       virtual void mouse_enter(tevent_handler&) {}
+       virtual void mouse_move(tevent_handler&) {}
+       virtual void mouse_hover(tevent_handler&) {}
+       virtual void mouse_leave(tevent_handler&) {}
+
+       virtual void mouse_left_button_down(tevent_handler&) {}
+       virtual void mouse_left_button_up(tevent_handler&) {}
+       virtual void mouse_left_button_click(tevent_handler&) {}
+       virtual void mouse_left_button_double_click(tevent_handler&) {}
+
+       virtual void mouse_middle_button_down(tevent_handler&) {}
+       virtual void mouse_middle_button_up(tevent_handler&) {}
+       virtual void mouse_middle_button_click(tevent_handler&) {}
+       virtual void mouse_middle_button_double_click(tevent_handler&) {}
+
+       virtual void mouse_right_button_down(tevent_handler&) {}
+       virtual void mouse_right_button_up(tevent_handler&) {}
+       virtual void mouse_right_button_click(tevent_handler&) {}
+       virtual void mouse_right_button_double_click(tevent_handler&) {}
+
+       virtual void window_resize(tevent_handler&, const unsigned /* 
new_width */, 
                const unsigned /* new_height */) {}
 
 #if 0

Modified: trunk/src/gui/widgets/window.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/window.cpp?rev=25037&r1=25036&r2=25037&view=diff
==============================================================================
--- trunk/src/gui/widgets/window.cpp (original)
+++ trunk/src/gui/widgets/window.cpp Sun Mar 23 22:52:20 2008
@@ -210,7 +210,7 @@
        }
 }
 
-void twindow::window_resize(tevent_info&, 
+void twindow::window_resize(tevent_handler&, 
                const unsigned new_width, const unsigned new_height)
 {
        screen_width = new_width;

Modified: trunk/src/gui/widgets/window.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/window.hpp?rev=25037&r1=25036&r2=25037&view=diff
==============================================================================
--- trunk/src/gui/widgets/window.hpp (original)
+++ trunk/src/gui/widgets/window.hpp Sun Mar 23 22:52:20 2008
@@ -81,7 +81,7 @@
 
        tstatus status_;
 
-       tevent_info event_info_;
+       tevent_handler event_info_;
 
        /***** The event processing stuff *****/
 
@@ -92,7 +92,7 @@
        //! Implement events::handler::handle_event().
        void handle_event(const SDL_Event& event);
 
-       void window_resize(tevent_info&, 
+       void window_resize(tevent_handler&, 
                const unsigned new_width, const unsigned new_height);
 
        //! When set the form needs a full layout redraw cycle.




Related Messages


Powered by MHonArc, Updated Sun Mar 23 23:41:15 2008