1
0
Fork 0

(svn r13130) -Codechange: remove some of the (old) WindowEvent wrapper functions/enums/variables as they are not used anymore.

release/0.7
rubidium 2008-05-16 23:30:10 +00:00
parent 55546ae82c
commit cc0dae2271
2 changed files with 7 additions and 78 deletions

View File

@ -99,58 +99,6 @@ void Window::OnClick(Point pt, int widget)
this->HandleWindowEvent(&e); this->HandleWindowEvent(&e);
} }
void Window::OnDoubleClick(Point pt, int widget)
{
WindowEvent e;
e.event = WE_DOUBLE_CLICK;
e.we.click.pt = pt;
e.we.click.widget = widget;
this->HandleWindowEvent(&e);
}
void Window::OnRightClick(Point pt, int widget)
{
WindowEvent e;
e.event = WE_RCLICK;
e.we.click.pt = pt;
e.we.click.widget = widget;
this->HandleWindowEvent(&e);
}
void Window::OnDragDrop(Point pt, int widget)
{
WindowEvent e;
e.event = WE_DRAGDROP;
e.we.click.pt = pt;
e.we.click.widget = widget;
this->HandleWindowEvent(&e);
}
void Window::OnScroll(Point delta)
{
WindowEvent e;
e.event = WE_SCROLL;
e.we.scroll.delta = delta;
this->HandleWindowEvent(&e);
}
void Window::OnMouseOver(Point pt, int widget)
{
WindowEvent e;
e.event = WE_MOUSEOVER;
e.we.click.pt = pt;
e.we.click.widget = widget;
this->HandleWindowEvent(&e);
}
void Window::OnMouseWheel(int wheel)
{
WindowEvent e;
e.event = WE_MOUSEWHEEL;
e.we.wheel.wheel = wheel;
this->HandleWindowEvent(&e);
}
void Window::OnMouseLoop() void Window::OnMouseLoop()
{ {
WindowEvent e; WindowEvent e;
@ -1972,7 +1920,7 @@ void MouseLoop(MouseClick click, int mousewheel)
if (mousewheel != 0) { if (mousewheel != 0) {
if (_patches.scrollwheel_scrolling == 0) { if (_patches.scrollwheel_scrolling == 0) {
/* Send WE_MOUSEWHEEL event to window */ /* Send mousewheel event to window */
w->OnMouseWheel(mousewheel); w->OnMouseWheel(mousewheel);
} }

View File

@ -114,10 +114,6 @@ enum WindowEventCodes {
WE_PAINT, ///< Repaint the window contents WE_PAINT, ///< Repaint the window contents
WE_KEYPRESS, ///< Key pressed WE_KEYPRESS, ///< Key pressed
WE_CLICK, ///< Left mouse button click WE_CLICK, ///< Left mouse button click
WE_DOUBLE_CLICK, ///< Left mouse button double click
WE_RCLICK, ///< Right mouse button click
WE_MOUSEOVER,
WE_MOUSEWHEEL,
WE_MOUSELOOP, ///< Event for each mouse event in the game (at least once every game tick) WE_MOUSELOOP, ///< Event for each mouse event in the game (at least once every game tick)
WE_TICK, ///< Regularly occurring event (every game tick) WE_TICK, ///< Regularly occurring event (every game tick)
WE_100_TICKS, ///< Regularly occurring event (every 100 game ticks, approximatelly 3 seconds) WE_100_TICKS, ///< Regularly occurring event (every 100 game ticks, approximatelly 3 seconds)
@ -125,13 +121,11 @@ enum WindowEventCodes {
WE_PLACE_OBJ, WE_PLACE_OBJ,
WE_ABORT_PLACE_OBJ, WE_ABORT_PLACE_OBJ,
WE_ON_EDIT_TEXT, WE_ON_EDIT_TEXT,
WE_DRAGDROP,
WE_PLACE_DRAG, WE_PLACE_DRAG,
WE_PLACE_MOUSEUP, WE_PLACE_MOUSEUP,
WE_PLACE_PRESIZE, WE_PLACE_PRESIZE,
WE_DROPDOWN_SELECT, WE_DROPDOWN_SELECT,
WE_RESIZE, ///< Request to resize the window, @see WindowEvent.we.resize WE_RESIZE, ///< Request to resize the window, @see WindowEvent.we.resize
WE_SCROLL,
WE_INVALIDATE_DATA, ///< Notification that data displayed by the window is obsolete WE_INVALIDATE_DATA, ///< Notification that data displayed by the window is obsolete
WE_CTRL_CHANGED, ///< CTRL key has changed state WE_CTRL_CHANGED, ///< CTRL key has changed state
}; };
@ -175,11 +169,6 @@ struct WindowEvent {
int index; int index;
} dropdown; } dropdown;
struct {
Point pt;
int widget;
} mouseover;
struct { struct {
bool cont; ///< continue the search? (default true) bool cont; ///< continue the search? (default true)
uint16 key; ///< 16-bit Unicode value of the key uint16 key; ///< 16-bit Unicode value of the key
@ -190,14 +179,6 @@ struct WindowEvent {
int data; int data;
} invalidate; } invalidate;
struct {
Point delta; ///< delta position against position of last call
} scroll;
struct {
int wheel; ///< how much was 'wheel'd'
} wheel;
struct { struct {
bool cont; ///< continue the search? (default true) bool cont; ///< continue the search? (default true)
} ctrl; } ctrl;
@ -380,27 +361,27 @@ public:
* @param pt the point inside the window that has been clicked. * @param pt the point inside the window that has been clicked.
* @param widget the clicked widget. * @param widget the clicked widget.
*/ */
virtual void OnDoubleClick(Point pt, int widget); virtual void OnDoubleClick(Point pt, int widget) {}
/** /**
* A click with the right mouse button has been made on the window. * A click with the right mouse button has been made on the window.
* @param pt the point inside the window that has been clicked. * @param pt the point inside the window that has been clicked.
* @param widget the clicked widget. * @param widget the clicked widget.
*/ */
virtual void OnRightClick(Point pt, int widget); virtual void OnRightClick(Point pt, int widget) {}
/** /**
* A dragged 'object' has been released. * A dragged 'object' has been released.
* @param pt the point inside the window where the release took place. * @param pt the point inside the window where the release took place.
* @param widget the widget where the release took place. * @param widget the widget where the release took place.
*/ */
virtual void OnDragDrop(Point pt, int widget); virtual void OnDragDrop(Point pt, int widget) {}
/** /**
* Handle the request for (viewport) scrolling. * Handle the request for (viewport) scrolling.
* @param delta the amount the viewport must be scrolled. * @param delta the amount the viewport must be scrolled.
*/ */
virtual void OnScroll(Point delta); virtual void OnScroll(Point delta) {}
/** /**
* The mouse is currently moving over the window or has just moved outside * The mouse is currently moving over the window or has just moved outside
@ -408,13 +389,13 @@ public:
* @param pt the point inside the window that the mouse hovers over. * @param pt the point inside the window that the mouse hovers over.
* @param widget the widget the mouse hovers over. * @param widget the widget the mouse hovers over.
*/ */
virtual void OnMouseOver(Point pt, int widget); virtual void OnMouseOver(Point pt, int widget) {}
/** /**
* The mouse wheel has been turned. * The mouse wheel has been turned.
* @param wheel the amount of movement of the mouse wheel. * @param wheel the amount of movement of the mouse wheel.
*/ */
virtual void OnMouseWheel(int wheel); virtual void OnMouseWheel(int wheel) {}
/** /**