2020-03-30 11:29:48 +00:00
|
|
|
#ifndef __qwaq_ui_scrollbar_h
|
|
|
|
#define __qwaq_ui_scrollbar_h
|
|
|
|
|
2020-06-21 14:15:17 +00:00
|
|
|
#include "ruamoko/qwaq/ui/view.h"
|
2020-03-30 11:29:48 +00:00
|
|
|
|
|
|
|
@class Button;
|
2020-03-30 13:01:17 +00:00
|
|
|
@class DrawBuffer;
|
2020-03-30 11:29:48 +00:00
|
|
|
@class Group;
|
|
|
|
@class ListenerGroup;
|
|
|
|
|
|
|
|
@interface ScrollBar : View
|
|
|
|
{
|
|
|
|
int vertical;
|
|
|
|
int bgchar;
|
2020-03-30 14:42:06 +00:00
|
|
|
double mouseTime;
|
2020-03-30 11:29:48 +00:00
|
|
|
Point mouseStart;
|
2020-03-30 14:42:06 +00:00
|
|
|
Point tabStart;
|
2020-03-30 13:01:17 +00:00
|
|
|
DrawBuffer *buffer;
|
2020-03-30 11:29:48 +00:00
|
|
|
Button *backButton;
|
|
|
|
Button *forwardButton;
|
|
|
|
Button *thumbTab;
|
|
|
|
Group *objects;
|
2020-03-31 02:21:47 +00:00
|
|
|
ListenerGroup *onScrollBarModified;
|
2020-03-30 11:29:48 +00:00
|
|
|
|
|
|
|
unsigned pageStep;
|
|
|
|
unsigned singleStep;
|
|
|
|
unsigned range;
|
|
|
|
unsigned index;
|
|
|
|
}
|
|
|
|
+(ScrollBar *)horizontal:(unsigned)len at:(Point)pos;
|
|
|
|
+(ScrollBar *)vertical:(unsigned)len at:(Point)pos;
|
2020-03-31 02:21:47 +00:00
|
|
|
-(ListenerGroup *)onScrollBarModified;
|
2020-03-30 11:29:48 +00:00
|
|
|
-setRange:(unsigned)range;
|
|
|
|
-setPageStep:(unsigned)pageStep;
|
|
|
|
-setSingleStep:(unsigned)singleStep;
|
|
|
|
-setIndex:(unsigned)index;
|
2020-03-30 13:50:29 +00:00
|
|
|
-(unsigned)index;
|
2021-06-11 16:30:44 +00:00
|
|
|
-page:(unsigned)step dir:(unsigned) dir;
|
2020-03-30 11:29:48 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif//__qwaq_ui_scrollbar_h
|