📄 button.h
字号:
/////////////////////////////////////////////////////////////////////////////
// Name: Button.h
// Copyright: wellgain
// Author: bet
// Date: 2003-10-18
// Description: interface for the CButton class.
/////////////////////////////////////////////////////////////////////////////
#ifndef _WG_BUTTON_H_
#define _WG_BUTTON_H_
#include "Widget.h"
#include "Pixmap.h"
#include "Label.h"
class CButton : public CWidget
{
public:
CButton(gchar* label=(gchar*)NULL, CWidget* parent=(CWidget*)NULL);
virtual ~CButton();
GtkWidget* GetChild() { return GTK_BIN (m_hHandle)->child; }
enum relief { normal, half, none };
void Set_Relief (CButton::relief rel)
{ gtk_button_set_relief (GTK_BUTTON (m_hHandle), (GtkReliefStyle)((int)(rel))); }
const char* GetLabel() const;
void SetLabel(const char* szText);
void SetPixLabel(const gchar* xpm_filename, const gchar* label_text);
//void SetBgPixmap(const gchar *file_normal, const gchar *file_active);
void SetPixmap(const gchar *file_normal, const gchar *file_active, bool isToggle=false);
void SetState(bool bActive);
bool GetState() { return m_bState; }
virtual GtkWidget* Create(gchar* label);
protected:
CPixmap* m_pix1;
CPixmap* m_pix2;
bool m_bState;
CLabel* m_Label;
private:
static void CButton::on_button_pressed (GtkButton *button, gpointer user_data);
static void CButton::on_button_released (GtkButton *button, gpointer user_data);
};
#endif // _WG_BUTTON_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -