2016-03-27 11:49:47 +02:00
|
|
|
/*
|
|
|
|
===========================================================================
|
|
|
|
Copyright (C) 2015 the OpenMoHAA team
|
|
|
|
|
|
|
|
This file is part of OpenMoHAA source code.
|
|
|
|
|
|
|
|
OpenMoHAA source code is free software; you can redistribute it
|
|
|
|
and/or modify it under the terms of the GNU General Public License as
|
|
|
|
published by the Free Software Foundation; either version 2 of the License,
|
|
|
|
or (at your option) any later version.
|
|
|
|
|
|
|
|
OpenMoHAA source code is distributed in the hope that it will be
|
|
|
|
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with OpenMoHAA source code; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
===========================================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "ui_local.h"
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
Event W_HScrollbar_Positioned
|
|
|
|
(
|
|
|
|
"hscrollbar_positioned",
|
|
|
|
EV_DEFAULT,
|
|
|
|
"i",
|
|
|
|
"new_position",
|
|
|
|
"Signaled when the user scrolls the view"
|
|
|
|
);
|
|
|
|
Event EV_HScrollbar_Scroll
|
|
|
|
(
|
|
|
|
"_hscrollbar_scroll",
|
|
|
|
EV_DEFAULT,
|
|
|
|
"ii",
|
|
|
|
"scrollrate autorepeat",
|
|
|
|
"scroll the scrollbar, at the specified rate.\n"
|
|
|
|
"The autorepeat is used for autoscrolling with the mouse button held down"
|
|
|
|
);
|
|
|
|
|
|
|
|
CLASS_DECLARATION(UIWidget, UIHorizScroll, NULL) {
|
|
|
|
{&W_LeftMouseDown, &UIHorizScroll::MouseDown },
|
|
|
|
{&W_LeftMouseUp, &UIHorizScroll::MouseUp },
|
|
|
|
{&W_LeftMouseDragged, &UIHorizScroll::MouseDragged},
|
|
|
|
{&W_MouseEntered, &UIHorizScroll::MouseEnter },
|
|
|
|
{&W_MouseExited, &UIHorizScroll::MouseLeave },
|
|
|
|
{&EV_HScrollbar_Scroll, &UIHorizScroll::Scroll },
|
|
|
|
{NULL, NULL }
|
2016-03-27 11:49:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
UIHorizScroll::UIHorizScroll()
|
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
void UIHorizScroll::DrawArrow(float top, const char *text, bool pressed)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
void UIHorizScroll::DrawThumb(void)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
void UIHorizScroll::Draw(void)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
void UIHorizScroll::Scroll(Event *ev)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
bool UIHorizScroll::AttemptScrollTo(int to)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
|
|
|
return false;
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
void UIHorizScroll::MouseDown(Event *ev)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
int UIHorizScroll::getItemFromWidth(float height)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
|
|
|
return 0;
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
void UIHorizScroll::MouseUp(Event *ev)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
void UIHorizScroll::MouseDragged(Event *ev)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
void UIHorizScroll::InitFrameAlignRight(UIWidget *parent)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
void UIHorizScroll::MouseEnter(Event *ev)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
void UIHorizScroll::MouseLeave(Event *ev)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
bool UIHorizScroll::isEnoughItems(void)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
|
|
|
return false;
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
void UIHorizScroll::setNumItems(int i)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
void UIHorizScroll::setPageWidth(int i)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
void UIHorizScroll::setTopItem(int i)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
int UIHorizScroll::getTopItem(void)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
|
|
|
return 0;
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
int UIHorizScroll::getPageWidth(void)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
|
|
|
return 0;
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
int UIHorizScroll::getNumItems(void)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
|
|
|
return 0;
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
void UIHorizScroll::setThumbColor(const UColor& thumb)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|
|
|
|
|
2024-01-01 15:01:23 +01:00
|
|
|
void UIHorizScroll::setSolidBorderColor(const UColor& col)
|
2016-03-27 11:49:47 +02:00
|
|
|
{
|
2024-01-01 15:01:23 +01:00
|
|
|
// FIXME: stub
|
2016-03-27 11:49:47 +02:00
|
|
|
}
|