📄 stylemanager_boring.h
字号:
/* $Id: stylemanager_boring.h,v 1.6 2004/01/02 15:42:44 mbn Exp $
**
** ClanLib Game SDK
** Copyright (C) 2003 The ClanLib Team
** For a total list of contributers see the file CREDITS.
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library 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
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
*/
//! clanGUI="Style: Boring"
//! header=guistyleboring.h
#ifndef header_stylemanager_boring
#define header_stylemanager_boring
#if _MSC_VER > 1000
#pragma once
#endif
#include "../GUI/stylemanager.h"
#include "../Core/XML/dom_element.h"
class CL_ResourceManager;
class CL_Component;
//: GUIColor Enum
//- !group=GUI/Style: Boring!
//- !header=guistyleboring.h!
enum GUIColor
{
GUICOLOR_SELECTED_OUTLINE,
GUICOLOR_DARK_OUTLINE,
GUICOLOR_DARK_OUTLINE_DISABLED,
GUICOLOR_DARKER_SHADE,
GUICOLOR_MEDIUM_SHADE,
GUICOLOR_BRIGHT_SHADE,
GUICOLOR_BRIGHT_SHADE_DISABLED,
GUICOLOR_DARK_SHADE,
GUICOLOR_DARK_SHADE_DISABLED,
GUICOLOR_WHITE,
GUICOLOR_RED,
GUICOLOR_SELECTION,
GUICOLOR_CARET,
GUICOLOR_SCROLLBAR,
GUICOLOR_FOCUS,
GUICOLOR_BUTTON,
GUICOLOR_BUTTON_DISABLED,
GUICOLOR_BUTTON_TOGGLED,
GUICOLOR_WINDOW_NORMAL,
GUICOLOR_WINDOW_TITLEBAR,
GUICOLOR_WINDOW_TITLEBAR_DISABLED,
GUICOLOR_PROGRESSBAR,
GUICOLOR_PROGRESSBAR_FILLED
};
//: Style manager that uses the default clanlib gui style.
//- !group=GUI/Style: Boring!
//- !header=gui.h!
class CL_StyleManager_Boring : public CL_StyleManager
{
//! Construction:
public:
//: Construct a default style manager using the specified resources.
CL_StyleManager_Boring(CL_ResourceManager *resources);
//: Destructor.
virtual ~CL_StyleManager_Boring();
//! Attributes:
public:
void get_color(GUIColor col, int &r, int &g, int &b, int &a);
//! Operations:
public:
//: Fill rect
void fill_rect(int x1, int y1, int x2, int y2, GUIColor col);
//: Draw rect
void draw_rect(int x1, int y1, int x2, int y2, GUIColor col);
//: Draw line
void draw_line(int x1, int y1, int x2, int y2, GUIColor col);
//: Draw box
void draw_box(int x1, int y1, int x2, int y2, GUIColor topleft, GUIColor bottomright);
//! Overrideables:
public:
//: Connect component styles to component.
//: The 'type' parameter indicates what type the component is.
virtual void connect_styles(
const std::string &type,
CL_Component *component);
//! Implementation:
private:
// Disallow copy contruction of style managers.
CL_StyleManager_Boring(const CL_StyleManager_Boring ©) : CL_StyleManager(0) { return; }
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -