2008-08-06 18:36:30 +00:00
|
|
|
// This file is part of BOINC.
|
2006-10-28 09:02:46 +00:00
|
|
|
// http://boinc.berkeley.edu
|
2008-08-06 18:36:30 +00:00
|
|
|
// Copyright (C) 2008 University of California
|
2006-10-28 09:02:46 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC 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 3 of the License, or (at your option) any later version.
|
2006-10-28 09:02:46 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
2006-10-28 09:02:46 +00:00
|
|
|
// 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.
|
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2006-10-28 09:02:46 +00:00
|
|
|
|
|
|
|
#ifndef _CUSTOMCONTROLS_H_
|
|
|
|
#define _CUSTOMCONTROLS_H_
|
|
|
|
|
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
|
|
#pragma interface "sg_CustomControls.cpp"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
class CTransparentStaticLine : public wxPanel
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS (CTransparentStaticLine)
|
|
|
|
|
|
|
|
public:
|
|
|
|
CTransparentStaticLine();
|
|
|
|
CTransparentStaticLine(
|
|
|
|
wxWindow* parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name= wxStaticTextNameStr
|
|
|
|
);
|
|
|
|
|
|
|
|
bool Create(
|
|
|
|
wxWindow* parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name= wxStaticTextNameStr
|
|
|
|
);
|
|
|
|
|
|
|
|
wxColour GetLineColor() const { return m_LineColor ; }
|
|
|
|
void SetLineColor(wxColour value) { m_LineColor = value ; }
|
|
|
|
|
|
|
|
virtual bool HasTransparentBackground() { return true; };
|
|
|
|
|
|
|
|
void OnPaint(wxPaintEvent& event);
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
|
|
|
|
private:
|
|
|
|
wxColour m_LineColor;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CTransparentStaticText : public wxStaticText
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS (CTransparentStaticText)
|
|
|
|
|
|
|
|
public:
|
|
|
|
CTransparentStaticText();
|
|
|
|
CTransparentStaticText(
|
|
|
|
wxWindow* parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name= wxStaticTextNameStr
|
|
|
|
);
|
|
|
|
|
|
|
|
bool Create(
|
|
|
|
wxWindow* parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name= wxStaticTextNameStr
|
|
|
|
);
|
|
|
|
|
|
|
|
virtual bool HasTransparentBackground() { return true; };
|
2006-10-29 00:24:26 +00:00
|
|
|
|
2006-11-01 08:58:24 +00:00
|
|
|
#ifdef __WXMAC__
|
|
|
|
virtual void OnEraseBackground(wxEraseEvent& /*event*/) {};
|
2011-01-27 14:36:49 +00:00
|
|
|
#else
|
|
|
|
virtual void SetLabel(const wxString& label);
|
2006-11-01 08:58:24 +00:00
|
|
|
#endif
|
2006-10-29 00:24:26 +00:00
|
|
|
virtual void OnPaint(wxPaintEvent& event);
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-02-14 21:43:31 +00:00
|
|
|
class CTransparentButton : public wxButton
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS (CTransparentButton)
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
|
|
|
|
public:
|
|
|
|
CTransparentButton();
|
|
|
|
CTransparentButton(
|
|
|
|
wxWindow* parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxButtonNameStr
|
|
|
|
);
|
|
|
|
|
|
|
|
bool Create(
|
|
|
|
wxWindow* parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxButtonNameStr
|
|
|
|
);
|
|
|
|
|
|
|
|
virtual bool HasTransparentBackground() { return true; };
|
|
|
|
|
|
|
|
virtual void SetLabel(const wxString& label);
|
|
|
|
virtual void OnEraseBackground(wxEraseEvent& event);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-10-29 00:24:26 +00:00
|
|
|
class CTransparentStaticTextAssociate : public wxPanel
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS (CTransparentStaticTextAssociate)
|
|
|
|
|
|
|
|
public:
|
|
|
|
CTransparentStaticTextAssociate();
|
|
|
|
CTransparentStaticTextAssociate(
|
|
|
|
wxWindow* parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name= wxStaticTextNameStr
|
|
|
|
);
|
|
|
|
|
|
|
|
bool Create(
|
|
|
|
wxWindow* parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxString& name= wxStaticTextNameStr
|
|
|
|
);
|
|
|
|
|
|
|
|
virtual bool HasTransparentBackground() { return true; };
|
|
|
|
virtual bool SetFont(const wxFont& font);
|
|
|
|
|
2006-10-28 09:02:46 +00:00
|
|
|
virtual bool AssociateWindow(wxWindow* pWnd);
|
|
|
|
|
2006-10-30 00:19:58 +00:00
|
|
|
virtual void OnEraseBackground(wxEraseEvent& /*event*/) {};
|
2006-10-28 09:02:46 +00:00
|
|
|
virtual void OnPaint(wxPaintEvent& event);
|
|
|
|
virtual void OnMouse(wxMouseEvent& event);
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
private:
|
|
|
|
wxWindow* m_pWnd;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-11-20 21:59:03 +00:00
|
|
|
class CLinkButton : public wxBitmapButton
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS (CLinkButton)
|
|
|
|
|
|
|
|
public:
|
|
|
|
CLinkButton();
|
|
|
|
CLinkButton(
|
|
|
|
wxWindow* parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxBitmap& bitmap,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name= wxButtonNameStr
|
|
|
|
);
|
|
|
|
|
|
|
|
bool Create(
|
|
|
|
wxWindow* parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxBitmap& bitmap,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name= wxButtonNameStr
|
|
|
|
);
|
|
|
|
|
|
|
|
virtual void OnMouse(wxMouseEvent& event);
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
private:
|
|
|
|
wxCursor m_HandCursor;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2006-10-28 09:02:46 +00:00
|
|
|
#endif
|
|
|
|
|