mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 14:20:59 +00:00
2572011a4b
The editor now uses the vertical scrollbar for handling mouse wheel scrolling, thus keeping the scrollbar in sync. Scrollbar index can now cover the full range (not sure why I had that -1), and the potential divide by zero is avoided properly. Thumb-tab now positioned properly when the range is 0.
41 lines
924 B
Objective-C
41 lines
924 B
Objective-C
#ifndef __qwaq_ui_scrollbar_h
|
|
#define __qwaq_ui_scrollbar_h
|
|
|
|
#include "ruamoko/qwaq/ui/view.h"
|
|
|
|
@class Button;
|
|
@class DrawBuffer;
|
|
@class Group;
|
|
@class ListenerGroup;
|
|
|
|
@interface ScrollBar : View
|
|
{
|
|
int vertical;
|
|
int bgchar;
|
|
double mouseTime;
|
|
Point mouseStart;
|
|
Point tabStart;
|
|
DrawBuffer *buffer;
|
|
Button *backButton;
|
|
Button *forwardButton;
|
|
Button *thumbTab;
|
|
Group *objects;
|
|
ListenerGroup *onScrollBarModified;
|
|
|
|
unsigned pageStep;
|
|
unsigned singleStep;
|
|
unsigned range;
|
|
unsigned index;
|
|
}
|
|
+(ScrollBar *)horizontal:(unsigned)len at:(Point)pos;
|
|
+(ScrollBar *)vertical:(unsigned)len at:(Point)pos;
|
|
-(ListenerGroup *)onScrollBarModified;
|
|
-setRange:(unsigned)range;
|
|
-setPageStep:(unsigned)pageStep;
|
|
-setSingleStep:(unsigned)singleStep;
|
|
-setIndex:(unsigned)index;
|
|
-(unsigned)index;
|
|
-page:(unsigned)step dir:(unsigned) dir;
|
|
@end
|
|
|
|
#endif//__qwaq_ui_scrollbar_h
|