//================================================================
// Xe UI toolkit
//
// XeScrollBar
//  Public header file
//
// AUTHOR:  Gabor Nagy
// DATE:    2023-Aug-18 14:27:41
//
// Copyright (C) 1996-2026 by Gabor Nagy. All rights reserved.
//================================================================
#ifndef _XeScrollBarWidget_h
#define _XeScrollBarWidget_h

#include "Xe.h"
#include "Manager.h"
#include "ArrowButton.h"

#if defined (__cplusplus) && (!(defined (__CPLUSLIBS)))
extern "C" {
#endif

extern XeWidgetClass*                 XeScrollBarWidget_class;
typedef struct _XeScrollBarClassRec*  XeScrollBarWidgetClass;
typedef struct _XeScrollBarRec*       XeScrollBarWidget;


typedef struct
{
	XeCallbackStructCore;

	int  Value, Minimum, Maximum;
	int  ScaleSizeX, ScaleSizeY;
	int  SliderSizeX, SliderSizeY;
} XeScrollBarCallbackStruct;


extern int  Xe_SmoothScrollIncrementTimer_us;  // E.g. 16666 for 60Hz. This may be changed for different screen refresh rates


extern void  XeScrollBar_SetValue(XeWidget PWidget, int PValue, const EBool PNotify);
extern void  XeScrollBar_SetRangeAndValue(XeWidget PWidget, const int PMinimum, const int PMaximum, const int PValue, const EBool PNotify);
extern int   XeScrollBar_GetValue(XeWidget PWidget);
extern void  Xe_ScrollbarScroll(XeWidget PScrollBarW, const int PDirection, const int PUnits, const int PSmoothSteps, const int PIntervalMicroseconds);


#if defined (__cplusplus) && (!(defined (__CPLUSLIBS)))
}	// Close scope of 'extern "C"' declaration
#endif

#endif // _XeScrollBarWidget_h
