XenevaOS
Loading...
Searching...
No Matches
scrollpane.h
Go to the documentation of this file.
1
30#ifndef __SCROLLPANE_H__
31#define __SCROLLPANE_H__
32
33#include <stdint.h>
34#include "..\chitralekha.h"
35#include "base.h"
36#include "window.h"
37
38#define CHITRALEKHA_SCROLL_TYPE_HORIZONTAL 1
39#define CHITRALEKHA_SCROLL_TYPE_VERTICAL 2
40
41#define SCROLLBAR_SIZE 18
42
63
72
73/*
74* ChCreateScrollPane -- Create a new scroll pane
75* @param win -- Pointer to main Window
76* @param x -- X position of the scroll pane
77* @param y -- Y position of the scroll pane
78* @param width -- Width of the scroll pane
79* @param height -- Height of the scroll pane
80*/
81XE_EXTERN XE_LIB ChScrollPane* ChCreateScrollPane(ChWindow* win,int x, int y, int width, int height);
82
83/*
84* ChScrollUpdateVerticalScroll -- updates the vertical scroll bur thumb
85* @param sp -- Pointer to scrollpane
86* @param viewport -- viewport
87* @param contentsz -- content size
88*/
89XE_EXTERN XE_LIB void ChScrollUpdateVerticalScroll(ChScrollPane* sp, ChRect* viewport, int contentSz);
90
91/*
92* ChScrollUpdateHorizontalScroll -- updates the horizontal scroll bar thumb
93* @param sp -- Pointer to scrollpane
94* @param viewport -- Pointer to viewport geometry
95* @param contentSz -- content size
96*/
97XE_EXTERN XE_LIB void ChScrollUpdateHorizontalScroll(ChScrollPane* sp, ChRect* viewport, int contentSz);
98
99#endif
#define XE_LIB
Definition _xeneva.h:55
#define XE_EXTERN
Definition _xeneva.h:50
unsigned char uint8_t
Definition acefiex.h:161
ChWindow * win
Definition namdapha.cpp:45
XE_EXTERN XE_LIB ChScrollPane * ChCreateScrollPane(ChWindow *win, int x, int y, int width, int height)
Definition scrollpane.cpp:240
XE_EXTERN XE_LIB void ChScrollUpdateVerticalScroll(ChScrollPane *sp, ChRect *viewport, int contentSz)
Definition scrollpane.cpp:286
struct _scrollpane_ ChScrollPane
XE_EXTERN XE_LIB void ChScrollUpdateHorizontalScroll(ChScrollPane *sp, ChRect *viewport, int contentSz)
Definition scrollpane.cpp:317
struct _scrollbar_ ChScrollbar
Definition window.h:114
Definition draw.h:43
Definition window.h:90
Definition scrollpane.h:43
int thumb_posx
Definition scrollpane.h:50
int bar_h
Definition scrollpane.h:49
int thumb_lastx
Definition scrollpane.h:57
int bar_x
Definition scrollpane.h:46
bool update
Definition scrollpane.h:45
double scrollOffset
Definition scrollpane.h:60
int thumb_lasty
Definition scrollpane.h:56
int thumb_posy
Definition scrollpane.h:51
uint8_t type
Definition scrollpane.h:44
bool thumbHover
Definition scrollpane.h:58
double scrollAmount
Definition scrollpane.h:59
int thumb_dragy
Definition scrollpane.h:55
int thumb_width
Definition scrollpane.h:52
int bar_w
Definition scrollpane.h:48
int bar_y
Definition scrollpane.h:47
int contentSize
Definition scrollpane.h:61
int thumb_dragx
Definition scrollpane.h:54
int thumb_height
Definition scrollpane.h:53
Definition scrollpane.h:64
ChWidget * scrollableView
Definition scrollpane.h:70
ChScrollbar vScrollBar
Definition scrollpane.h:67
int lastMouseButton
Definition scrollpane.h:69
ChWidget wid
Definition scrollpane.h:65
bool paintCallback
Definition scrollpane.h:68
ChScrollbar hScrollBar
Definition scrollpane.h:66