scrollbar_boring.h

来自「这是一款2d游戏引擎」· C头文件 代码 · 共 73 行

H
73
字号
/*  $Id: scrollbar_boring.h,v 1.6 2004/01/02 15:42:44 mbn Exp $
	
	ClanGUI, copyrights by various people. Have a look in the CREDITS file.
	
	This sourcecode is distributed using the Library GNU Public Licence,
	version 2 or (at your option) any later version. Please read LICENSE
	for details.
*/

//! clanGUI="Style: Boring"
//! header=guistyleboring.h

#ifndef header_scrollbar_boring
#define header_scrollbar_boring

#if _MSC_VER > 1000
#pragma once
#endif

#include "../Core/System/timer.h"
#include "../GUI/scrollbar.h"
#include "../GUI/component_style.h"

class CL_ResourceManager;
class CL_Surface;
class CL_StyleManager_Boring;

//: ScrollBar default style.
//- !group=GUI/Style: Boring!
//- !header=guistyleboring.h!
class CL_ScrollBar_Boring : public CL_ComponentStyle
{
//! Construction:
public:
	//: Constructor
	CL_ScrollBar_Boring(
		CL_ScrollBar *scrollbar,
		CL_StyleManager_Boring *style);
	
	//: Destructor
	virtual ~CL_ScrollBar_Boring();

//! Implementation:
private:
	void start_scroll(int delta);
	void stop_scroll();

	void on_paint();
	void on_timer_scroll();
	void on_resize(int old_width, int old_height);
	void on_set_options(const CL_DomElement &options);

	CL_SlotContainer slots;

	CL_Timer timer_scroll;
	int scroll_delta;

	CL_ScrollBar *scrollbar;
	
	CL_Button *button_increase;
	CL_Button *button_decrease;

	CL_StyleManager_Boring *style;
	CL_ResourceManager *resources;
	CL_Surface *sur_increase_normal;
	CL_Surface *sur_increase_toggled;
	CL_Surface *sur_decrease_normal;
	CL_Surface *sur_decrease_toggled;
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?