56 lines
1.7 KiB
C
56 lines
1.7 KiB
C
/*
|
|
* Roo/E, the Kangaroo Punch Portable GUI Toolkit
|
|
* Copyright (C) 2022 Scott Duensing
|
|
*
|
|
* http://kangaroopunch.com
|
|
*
|
|
*
|
|
* This file is part of Roo/E.
|
|
*
|
|
* Roo/E is free software: you can redistribute it and/or modify it under the
|
|
* terms of the GNU Affero General Public License as published by the Free
|
|
* Software Foundation, either version 3 of the License, or (at your option)
|
|
* any later version.
|
|
*
|
|
* Roo/E is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
* details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with Roo/E. If not, see <https://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
|
|
|
|
#ifndef VSCROLL_H
|
|
#define VSCROLL_H
|
|
|
|
|
|
#include "../gui.h"
|
|
|
|
|
|
typedef struct VscrollS {
|
|
WidgetT base; // Required by all widgets.
|
|
int32_t min;
|
|
int32_t max;
|
|
int32_t value;
|
|
int32_t maxValue;
|
|
RectT thumb;
|
|
ClickHandlerT handler; // Actual event handler.
|
|
} VscrollT;
|
|
|
|
|
|
extern uint8_t __MAGIC_VSCROLL; // Magic ID assigned to us from the GUI.
|
|
|
|
|
|
void vscrollClickSet(VscrollT *vscroll, ClickHandlerT handler, void *data);
|
|
VscrollT *vscrollCreate(int16_t h, ClickHandlerT handler, void *data, ...);
|
|
void vscrollHeightSet(VscrollT *vscroll, int16_t h);
|
|
void vscrollRangeSet(VscrollT *vscroll, int32_t min, int32_t max);
|
|
RegisterT *vscrollRegister(uint8_t magic);
|
|
int32_t vscrollValueGet(VscrollT *vscroll);
|
|
void vscrollValueSet(VscrollT *vscroll, int32_t value);
|
|
|
|
|
|
#endif // VSCROLL_H
|