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*/
82ChCreateScrollPane(ChWindow* win, int x, int y, int width, int height);
83
84/*
85* ChScrollUpdateVerticalScroll -- updates the vertical scroll bur thumb
86* @param sp -- Pointer to scrollpane
87* @param viewport -- viewport
88* @param contentsz -- content size
89*/
91ChScrollUpdateVerticalScroll(ChScrollPane* sp, ChRect* viewport, int contentSz);
92
93/*
94* ChScrollUpdateHorizontalScroll -- updates the horizontal scroll bar thumb
95* @param sp -- Pointer to scrollpane
96* @param viewport -- Pointer to viewport geometry
97* @param contentSz -- content size
98*/
100ChScrollUpdateHorizontalScroll(ChScrollPane* sp, ChRect* viewport, int contentSz);
101
102#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:54
XE_EXTERN XE_LIB ChScrollPane * ChCreateScrollPane(ChWindow *win, int x, int y, int width, int height)
Definition scrollpane.cpp:320
XE_EXTERN XE_LIB void ChScrollUpdateVerticalScroll(ChScrollPane *sp, ChRect *viewport, int contentSz)
Definition scrollpane.cpp:366
struct _scrollpane_ ChScrollPane
XE_EXTERN XE_LIB void ChScrollUpdateHorizontalScroll(ChScrollPane *sp, ChRect *viewport, int contentSz)
Definition scrollpane.cpp:397
struct _scrollbar_ ChScrollbar
Definition window.h:123
Definition draw.h:42
Definition window.h:99
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