My Project
Loading...
Searching...
No Matches
scrollpane.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "component.h"
4
#include "toucharea.h"
5
#include "
typedefine.h
"
6
7
class
ColorBlock;
8
9
class
ScrollPane
:
public
Component{
10
public
:
11
class
TouchController
:
public
TouchArea{
12
private
:
13
float
dragThreshold;
14
boolean
dragging;
15
PointF
lastPos;
16
protected
:
17
virtual
void
onClick
(TouchScreen::Touch* touch);
18
virtual
void
onDrag
(TouchScreen::Touch* t);
19
public
:
20
ScrollPane
*
sp
;
21
TouchController
(
ScrollPane
* s);
22
};
23
protected
:
24
static
const
int
THUMB_COLOR
= 0xFF7b8073;
25
static
const
float
THUMB_ALPHA
;
26
27
TouchController
*
controller
;
28
Component*
content
;
29
ColorBlock*
thumb
;
30
31
float
minX
;
32
float
minY
;
33
float
maxX
;
34
float
maxY
;
35
36
virtual
void
createChildren
();
37
virtual
void
layout
();
38
public
:
39
ScrollPane
(Component*
content
);
40
41
virtual
void
destroy
();
42
void
scrollTo
(
float
x,
float
y);
43
Component*
Content
() {
44
return
content
;
45
}
46
47
virtual
void
onClick
(
float
x,
float
y) {
48
}
49
50
};
ScrollPane::TouchController
Definition
scrollpane.h:11
ScrollPane::TouchController::sp
ScrollPane * sp
Definition
scrollpane.h:20
ScrollPane::TouchController::onClick
virtual void onClick(TouchScreen::Touch *touch)
Definition
scrollpane.cpp:69
ScrollPane::TouchController::TouchController
TouchController(ScrollPane *s)
Definition
scrollpane.cpp:125
ScrollPane::TouchController::onDrag
virtual void onDrag(TouchScreen::Touch *t)
Definition
scrollpane.cpp:85
ScrollPane::createChildren
virtual void createChildren()
Definition
scrollpane.cpp:8
ScrollPane::layout
virtual void layout()
Definition
scrollpane.cpp:18
ScrollPane::THUMB_COLOR
static const int THUMB_COLOR
Definition
scrollpane.h:24
ScrollPane::Content
Component * Content()
Definition
scrollpane.h:43
ScrollPane::minY
float minY
Definition
scrollpane.h:32
ScrollPane::maxX
float maxX
Definition
scrollpane.h:33
ScrollPane::THUMB_ALPHA
static const float THUMB_ALPHA
Definition
scrollpane.h:25
ScrollPane::maxY
float maxY
Definition
scrollpane.h:34
ScrollPane::destroy
virtual void destroy()
Definition
scrollpane.cpp:55
ScrollPane::onClick
virtual void onClick(float x, float y)
Definition
scrollpane.h:47
ScrollPane::scrollTo
void scrollTo(float x, float y)
Definition
scrollpane.cpp:63
ScrollPane::controller
TouchController * controller
Definition
scrollpane.h:27
ScrollPane::ScrollPane
ScrollPane(Component *content)
Definition
scrollpane.cpp:41
ScrollPane::minX
float minX
Definition
scrollpane.h:31
ScrollPane::thumb
ColorBlock * thumb
Definition
scrollpane.h:29
ScrollPane::content
Component * content
Definition
scrollpane.h:28
PointF
glm::vec2 PointF
Definition
define.h:7
typedefine.h
pd
scrollpane.h
Generated by
1.13.2