Remove ancient commented-out code in the event distributor

These have been unused since their introduction in 2009.
This commit is contained in:
Steve Cotton 2020-10-13 11:45:01 +02:00
parent ca84e724ad
commit d7f6d8646b
2 changed files with 0 additions and 64 deletions

View file

@ -33,44 +33,6 @@ namespace gui2
namespace event
{
/**
* SDL_AddTimer() callback for the hover event.
*
* When this callback is called it pushes a new hover event in the event queue.
*
* @param interval The time parameter of SDL_AddTimer.
* @param param Pointer to a widget that's able to show the
* tooltip (will be used as a dispatcher).
*
* @returns The new timer interval, 0 to stop.
*/
#if 0
/**
* SDL_AddTimer() callback for the popup event.
*
* This event makes sure the popup is removed again.
*
* @param interval The time parameter of SDL_AddTimer.
* @param param Pointer to parameter structure.
*
* @returns The new timer interval, 0 to stop.
*/
static uint32_t popup_callback(uint32_t /*interval*/, void* /*param*/)
{
DBG_GUI_E << "Pushing popup removal event in queue.\n";
SDL_Event event;
sdl::UserEvent data(HOVER_REMOVE_POPUP_EVENT);
event.type = HOVER_REMOVE_POPUP_EVENT;
event.user = data;
SDL_PushEvent(&event);
return 0;
}
#endif
/**
* Small helper to keep a resource (boolean) locked.
*
@ -576,14 +538,6 @@ distributor::distributor(widget& owner,
, mouse_button_left("left", owner, queue_position)
, mouse_button_middle("middle", owner, queue_position)
, mouse_button_right("right", owner, queue_position)
#if 0
, hover_pending_(false)
, hover_id_(0)
, hover_box_()
, had_hover_(false)
, tooltip_(nullptr)
, help_popup_(nullptr)
#endif
, keyboard_focus_(nullptr)
, keyboard_focus_chain_()
{

View file

@ -318,24 +318,6 @@ private:
// make sure the appropriate things happens when we close.
layer layer_;
#if 0
bool hover_pending_; /**< Is there a hover event pending? */
unsigned hover_id_; /**< Id of the pending hover event. */
SDL_Rect hover_box_; /**< The area the mouse can move in,
* moving outside invalidates the
* pending hover event.
*/
bool had_hover_; /**< A widget only gets one hover event
* per enter cycle.
*/
/** The widget of the currently active tooltip. */
widget* tooltip_;
/** The widget of the currently active help popup. */
widget* help_popup_;
#endif
/** The widget that holds the keyboard focus_. */
widget* keyboard_focus_;