forked from yvt/xtbook
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathXTBDialogSheet.h
47 lines (36 loc) · 951 Bytes
/
XTBDialogSheet.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// XTBDialogSheet.h
// XTBook
//
// Created by 河田 智明 on 8/2/11.
// Copyright 2011 Nexhawks. All rights reserved.
//
#pragma once
#include <tcw/twDialog.h>
#include <tcw/twTimerWithInvocation.h>
#include <tcw/twEvent.h>
class XTBDialogSheet: public twDialog{
twTimerWithInvocation *m_appearAnimationTimer;
twTicks m_appearStartTime;
twTicks m_appearDuration;
int m_startY;
int m_endY;
int m_paddingHeight;
int m_lastSelectedIndex;
int m_currentIndex;
twRect finalRect() const;
void startAppearAnimation();
void stopAppearAnimation();
void updateAppearAnimation();
protected:
virtual twPoint getStartupPos(const twSize&,
const twRect&);
virtual twSize startupSize() const=0;
virtual twColor paddingColor() const{return 0xffffff;}
public:
XTBDialogSheet();
virtual ~XTBDialogSheet();
virtual void willAppear();
virtual void didDisappear();
virtual void clientPaint(const twPaintStruct&);
};