⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 toolbutton.h

📁 非常好用的可移植的多平台C/C++源代码编辑器
💻 H
字号:
///////////////////////////////////////////////////////////////////////////////
// Name:        wx/generic/toolbutton.h
// Purpose:     wxToolButton class
// Author:      Mark McCormack
// Modified by:
// Created:     19/05/04
// RCS-ID:      
// Copyright:   
// Licence:     wxWindows licence
///////////////////////////////////////////////////////////////////////////////

#ifndef _WX_TOOLBUTTON_H_
#define _WX_TOOLBUTTON_H_

// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------

#include <wx/toolbutton.h>

// ----------------------------------------------------------------------------
// wxToolButton
// ----------------------------------------------------------------------------

class wxToolButton : public wxToolButtonBase {
    DECLARE_EVENT_TABLE()

public:
    // Default constructor
    wxToolButton() { 
        Init();
    }

    void Init();

    // Normal constructor
    wxToolButton( wxWindow *parent,
                  wxWindowID id,
                  const wxPoint& pos = wxDefaultPosition,
                  const wxSize& size = wxDefaultSize,
                  long style = wxBORDER_NONE,
                  const wxString& name = wxButtonNameStr ) {
        Init();
        Create( parent, id, pos, size, style, name );
    }

    bool Create( wxWindow *parent,
                 wxWindowID id,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 long style = wxBORDER_NONE,
                 const wxString& name = wxButtonNameStr );

    virtual ~wxToolButton();

    // event handlers
    void OnErase( wxEraseEvent& event );
    void OnPaint( wxPaintEvent& event );
    void OnLeftDown( wxMouseEvent& event );
    void OnLeftUp( wxMouseEvent& event );
    void OnEnter( wxMouseEvent& event );
    void OnLeave( wxMouseEvent& event );

private:
    bool hovered_;
    bool pressed_;

private:
    DECLARE_DYNAMIC_CLASS( wxToolButton )
};

#endif
    // _WX_TOOLBUTTON_H_

⌨️ 快捷键说明

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