mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
Import r67258 of the wxWidgets trunk, which I expect will before
long become wxWidgets 2.9.2, which in turn is expected to be the last 2.9 release before the 3.0 stable release. Since the full wxWidgets distribution is rather large, I have imported only the parts that we use, on a subdirectory basis: art include/wx/*.* include/wx/aui include/wx/cocoa include/wx/generic include/wx/gtk include/wx/meta include/wx/msw include/wx/osx include/wx/persist include/wx/private include/wx/protocol include/wx/unix src/aui src/common src/generic src/gtk src/msw src/osx src/unix git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7380 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
15
Externals/wxWidgets3/include/wx/gtk/accel.h
vendored
Normal file
15
Externals/wxWidgets3/include/wx/gtk/accel.h
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/accel.h
|
||||
// Purpose: wxAcceleratorTable redirection file
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created:
|
||||
// Copyright: (c) Julian Smart
|
||||
// RCS-ID: $Id: accel.h 33948 2005-05-04 18:57:50Z JS $
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// VZ: keeping the old file just in case we're going to have a native GTK+
|
||||
// wxAcceleratorTable implementation one day, but for now use the generic
|
||||
// version
|
||||
#include "wx/generic/accel.h"
|
153
Externals/wxWidgets3/include/wx/gtk/animate.h
vendored
Normal file
153
Externals/wxWidgets3/include/wx/gtk/animate.h
vendored
Normal file
@ -0,0 +1,153 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/animate.h
|
||||
// Purpose: Animation classes
|
||||
// Author: Julian Smart and Guillermo Rodriguez Garcia
|
||||
// Modified by: Francesco Montorsi
|
||||
// Created: 13/8/99
|
||||
// RCS-ID: $Id: animate.h 53629 2008-05-17 22:51:52Z VZ $
|
||||
// Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTKANIMATEH__
|
||||
#define _WX_GTKANIMATEH__
|
||||
|
||||
typedef struct _GdkPixbufAnimation GdkPixbufAnimation;
|
||||
typedef struct _GdkPixbufAnimationIter GdkPixbufAnimationIter;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAnimation
|
||||
// Unlike the generic wxAnimation object (see generic\animate.cpp), we won't
|
||||
// use directly wxAnimationHandlers as gdk-pixbuf already provides the
|
||||
// concept of handler and will automatically use the available handlers.
|
||||
// Like generic wxAnimation object, this implementation of wxAnimation is
|
||||
// refcounted so that assignment is very fast
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxAnimation : public wxAnimationBase
|
||||
{
|
||||
public:
|
||||
wxAnimation(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY)
|
||||
: m_pixbuf(NULL) { LoadFile(name, type); }
|
||||
wxAnimation(GdkPixbufAnimation *p = NULL);
|
||||
wxAnimation(const wxAnimation&);
|
||||
~wxAnimation() { UnRef(); }
|
||||
|
||||
wxAnimation& operator= (const wxAnimation&);
|
||||
|
||||
virtual bool IsOk() const
|
||||
{ return m_pixbuf != NULL; }
|
||||
|
||||
|
||||
// unfortunately GdkPixbufAnimation does not expose these info:
|
||||
|
||||
virtual unsigned int GetFrameCount() const { return 0; }
|
||||
virtual wxImage GetFrame(unsigned int frame) const;
|
||||
|
||||
// we can retrieve the delay for a frame only after building
|
||||
// a GdkPixbufAnimationIter...
|
||||
virtual int GetDelay(unsigned int WXUNUSED(frame)) const { return 0; }
|
||||
|
||||
virtual wxSize GetSize() const;
|
||||
|
||||
virtual bool LoadFile(const wxString &name, wxAnimationType type = wxANIMATION_TYPE_ANY);
|
||||
virtual bool Load(wxInputStream &stream, wxAnimationType type = wxANIMATION_TYPE_ANY);
|
||||
|
||||
// Implementation
|
||||
public: // used by GTK callbacks
|
||||
|
||||
GdkPixbufAnimation *GetPixbuf() const
|
||||
{ return m_pixbuf; }
|
||||
void SetPixbuf(GdkPixbufAnimation* p);
|
||||
|
||||
protected:
|
||||
GdkPixbufAnimation *m_pixbuf;
|
||||
|
||||
private:
|
||||
void UnRef();
|
||||
|
||||
typedef wxAnimationBase base_type;
|
||||
DECLARE_DYNAMIC_CLASS(wxAnimation)
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAnimationCtrl
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Resize to animation size if this is set
|
||||
#define wxAN_FIT_ANIMATION 0x0010
|
||||
|
||||
class WXDLLIMPEXP_ADV wxAnimationCtrl: public wxAnimationCtrlBase
|
||||
{
|
||||
public:
|
||||
wxAnimationCtrl() { Init(); }
|
||||
wxAnimationCtrl(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxAnimation& anim = wxNullAnimation,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxAC_DEFAULT_STYLE,
|
||||
const wxString& name = wxAnimationCtrlNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, anim, pos, size, style, name);
|
||||
}
|
||||
|
||||
void Init();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxAnimation& anim = wxNullAnimation,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxAC_DEFAULT_STYLE,
|
||||
const wxString& name = wxAnimationCtrlNameStr);
|
||||
|
||||
~wxAnimationCtrl();
|
||||
|
||||
public: // event handler
|
||||
|
||||
void OnTimer(wxTimerEvent &);
|
||||
|
||||
public: // public API
|
||||
|
||||
virtual bool LoadFile(const wxString& filename, wxAnimationType type = wxANIMATION_TYPE_ANY);
|
||||
virtual bool Load(wxInputStream& stream, wxAnimationType type = wxANIMATION_TYPE_ANY);
|
||||
|
||||
virtual void SetAnimation(const wxAnimation &anim);
|
||||
virtual wxAnimation GetAnimation() const
|
||||
{ return wxAnimation(m_anim); }
|
||||
|
||||
virtual bool Play();
|
||||
virtual void Stop();
|
||||
|
||||
virtual bool IsPlaying() const;
|
||||
|
||||
bool SetBackgroundColour( const wxColour &colour );
|
||||
|
||||
protected:
|
||||
|
||||
virtual void DisplayStaticImage();
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
void FitToAnimation();
|
||||
void ClearToBackgroundColour();
|
||||
|
||||
void ResetAnim();
|
||||
void ResetIter();
|
||||
|
||||
protected: // internal vars
|
||||
|
||||
GdkPixbufAnimation *m_anim;
|
||||
GdkPixbufAnimationIter *m_iter;
|
||||
|
||||
wxTimer m_timer;
|
||||
bool m_bPlaying;
|
||||
|
||||
private:
|
||||
typedef wxAnimationCtrlBase base_type;
|
||||
DECLARE_DYNAMIC_CLASS(wxAnimationCtrl)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // _WX_GTKANIMATEH__
|
87
Externals/wxWidgets3/include/wx/gtk/app.h
vendored
Normal file
87
Externals/wxWidgets3/include/wx/gtk/app.h
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/app.h
|
||||
// Purpose: wxApp definition for wxGTK
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: app.h 63091 2010-01-07 18:30:18Z PC $
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_APP_H_
|
||||
#define _WX_GTK_APP_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
|
||||
typedef struct _HildonProgram HildonProgram;
|
||||
#endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxApp
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxApp: public wxAppBase
|
||||
{
|
||||
public:
|
||||
wxApp();
|
||||
virtual ~wxApp();
|
||||
|
||||
/* override for altering the way wxGTK intializes the GUI
|
||||
* (palette/visual/colorcube). under wxMSW, OnInitGui() does nothing by
|
||||
* default. when overriding this method, the code in it is likely to be
|
||||
* platform dependent, otherwise use OnInit(). */
|
||||
virtual bool SetNativeTheme(const wxString& theme);
|
||||
virtual bool OnInitGui();
|
||||
|
||||
// override base class (pure) virtuals
|
||||
virtual void WakeUpIdle();
|
||||
|
||||
virtual bool Initialize(int& argc, wxChar **argv);
|
||||
virtual void CleanUp();
|
||||
|
||||
virtual void OnAssertFailure(const wxChar *file,
|
||||
int line,
|
||||
const wxChar *func,
|
||||
const wxChar *cond,
|
||||
const wxChar *msg);
|
||||
|
||||
// GTK-specific methods
|
||||
// -------------------
|
||||
|
||||
// this can be overridden to return a specific visual to be used for GTK+
|
||||
// instead of the default one (it's used by wxGLApp)
|
||||
//
|
||||
// must return XVisualInfo pointer (it is not freed by caller)
|
||||
virtual void *GetXVisualInfo() { return NULL; }
|
||||
|
||||
#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
|
||||
// Maemo-specific method: get the main program object
|
||||
HildonProgram *GetHildonProgram();
|
||||
#endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
// check for pending events, without interference from our idle source
|
||||
bool EventsPending();
|
||||
bool DoIdle();
|
||||
|
||||
private:
|
||||
// true if we're inside an assert modal dialog
|
||||
bool m_isInAssert;
|
||||
|
||||
#if wxUSE_THREADS
|
||||
wxMutex m_idleMutex;
|
||||
#endif
|
||||
guint m_idleSourceId;
|
||||
|
||||
#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
|
||||
HildonProgram *m_hildonProgram;
|
||||
#endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxApp)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_APP_H_
|
91
Externals/wxWidgets3/include/wx/gtk/assertdlg_gtk.h
vendored
Normal file
91
Externals/wxWidgets3/include/wx/gtk/assertdlg_gtk.h
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
/* ///////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/assertdlg_gtk.h
|
||||
// Purpose: GtkAssertDialog
|
||||
// Author: Francesco Montorsi
|
||||
// Id: $Id: assertdlg_gtk.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 2006 Francesco Montorsi
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
#ifndef __GTK_ASSERTDLG_H__
|
||||
#define __GTK_ASSERTDLG_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define GTK_TYPE_ASSERT_DIALOG (gtk_assert_dialog_get_type ())
|
||||
#define GTK_ASSERT_DIALOG(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialog))
|
||||
#define GTK_ASSERT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialogClass))
|
||||
#define GTK_IS_ASSERT_DIALOG(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_ASSERT_DIALOG))
|
||||
#define GTK_IS_ASSERT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ASSERT_DIALOG))
|
||||
#define GTK_ASSERT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ASSERT_DIALOG, GtkAssertDialogClass))
|
||||
|
||||
typedef struct _GtkAssertDialog GtkAssertDialog;
|
||||
typedef struct _GtkAssertDialogClass GtkAssertDialogClass;
|
||||
typedef void (*GtkAssertDialogStackFrameCallback)(void *);
|
||||
|
||||
struct _GtkAssertDialog
|
||||
{
|
||||
GtkDialog parent_instance;
|
||||
|
||||
/* GtkAssertDialog widgets */
|
||||
GtkWidget *expander;
|
||||
GtkWidget *message;
|
||||
GtkWidget *treeview;
|
||||
|
||||
GtkWidget *shownexttime;
|
||||
|
||||
/* callback for processing the stack frame */
|
||||
GtkAssertDialogStackFrameCallback callback;
|
||||
void *userdata;
|
||||
};
|
||||
|
||||
struct _GtkAssertDialogClass
|
||||
{
|
||||
GtkDialogClass parent_class;
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GTK_ASSERT_DIALOG_STOP,
|
||||
GTK_ASSERT_DIALOG_CONTINUE,
|
||||
GTK_ASSERT_DIALOG_CONTINUE_SUPPRESSING
|
||||
} GtkAssertDialogResponseID;
|
||||
|
||||
|
||||
|
||||
|
||||
GType gtk_assert_dialog_get_type(void);
|
||||
GtkWidget *gtk_assert_dialog_new(void);
|
||||
|
||||
/* get the assert message */
|
||||
gchar *gtk_assert_dialog_get_message(GtkAssertDialog *assertdlg);
|
||||
|
||||
/* set the assert message */
|
||||
void gtk_assert_dialog_set_message(GtkAssertDialog *assertdlg, const gchar *msg);
|
||||
|
||||
/* get a string containing all stack frames appended to the dialog */
|
||||
gchar *gtk_assert_dialog_get_backtrace(GtkAssertDialog *assertdlg);
|
||||
|
||||
/* sets the callback to use when the user wants to see the stackframe */
|
||||
void gtk_assert_dialog_set_backtrace_callback(GtkAssertDialog *assertdlg,
|
||||
GtkAssertDialogStackFrameCallback callback,
|
||||
void *userdata);
|
||||
|
||||
/* appends a stack frame to the dialog */
|
||||
void gtk_assert_dialog_append_stack_frame(GtkAssertDialog *dlg,
|
||||
const gchar *function,
|
||||
const gchar *arguments,
|
||||
const gchar *sourcefile,
|
||||
guint line_number);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __GTK_ASSERTDLG_H__ */
|
||||
|
||||
|
151
Externals/wxWidgets3/include/wx/gtk/bitmap.h
vendored
Normal file
151
Externals/wxWidgets3/include/wx/gtk/bitmap.h
vendored
Normal file
@ -0,0 +1,151 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/bitmap.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// RCS-ID: $Id: bitmap.h 63774 2010-03-28 23:20:49Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_BITMAP_H_
|
||||
#define _WX_GTK_BITMAP_H_
|
||||
|
||||
typedef struct _GdkPixbuf GdkPixbuf;
|
||||
class WXDLLIMPEXP_FWD_CORE wxPixelDataBase;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMask
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMask: public wxMaskBase
|
||||
{
|
||||
public:
|
||||
wxMask();
|
||||
wxMask(const wxMask& mask);
|
||||
wxMask( const wxBitmap& bitmap, const wxColour& colour );
|
||||
#if wxUSE_PALETTE
|
||||
wxMask( const wxBitmap& bitmap, int paletteIndex );
|
||||
#endif // wxUSE_PALETTE
|
||||
wxMask( const wxBitmap& bitmap );
|
||||
virtual ~wxMask();
|
||||
|
||||
// implementation
|
||||
GdkBitmap *m_bitmap;
|
||||
GdkBitmap *GetBitmap() const;
|
||||
|
||||
protected:
|
||||
virtual void FreeData();
|
||||
virtual bool InitFromColour(const wxBitmap& bitmap, const wxColour& colour);
|
||||
virtual bool InitFromMonoBitmap(const wxBitmap& bitmap);
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMask)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxBitmap
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmap: public wxBitmapBase
|
||||
{
|
||||
public:
|
||||
wxBitmap() { }
|
||||
wxBitmap( int width, int height, int depth = wxBITMAP_SCREEN_DEPTH )
|
||||
{ Create(width, height, depth); }
|
||||
wxBitmap( const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH )
|
||||
{ Create(sz, depth); }
|
||||
wxBitmap( const char bits[], int width, int height, int depth = 1 );
|
||||
wxBitmap( const char* const* bits );
|
||||
#ifdef wxNEEDS_CHARPP
|
||||
// needed for old GCC
|
||||
wxBitmap(char** data)
|
||||
{ *this = wxBitmap(const_cast<const char* const*>(data)); }
|
||||
#endif
|
||||
wxBitmap( const wxString &filename, wxBitmapType type = wxBITMAP_DEFAULT_TYPE );
|
||||
#if wxUSE_IMAGE
|
||||
wxBitmap( const wxImage& image, int depth = wxBITMAP_SCREEN_DEPTH )
|
||||
{ (void)CreateFromImage(image, depth); }
|
||||
#endif // wxUSE_IMAGE
|
||||
virtual ~wxBitmap();
|
||||
|
||||
bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH);
|
||||
bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH)
|
||||
{ return Create(sz.GetWidth(), sz.GetHeight(), depth); }
|
||||
|
||||
virtual int GetHeight() const;
|
||||
virtual int GetWidth() const;
|
||||
virtual int GetDepth() const;
|
||||
|
||||
#if wxUSE_IMAGE
|
||||
wxImage ConvertToImage() const;
|
||||
#endif // wxUSE_IMAGE
|
||||
|
||||
// copies the contents and mask of the given (colour) icon to the bitmap
|
||||
virtual bool CopyFromIcon(const wxIcon& icon);
|
||||
|
||||
wxMask *GetMask() const;
|
||||
void SetMask( wxMask *mask );
|
||||
|
||||
wxBitmap GetSubBitmap( const wxRect& rect ) const;
|
||||
|
||||
bool SaveFile(const wxString &name, wxBitmapType type,
|
||||
const wxPalette *palette = NULL) const;
|
||||
bool LoadFile(const wxString &name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE);
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
wxPalette *GetPalette() const;
|
||||
void SetPalette(const wxPalette& palette);
|
||||
wxPalette *GetColourMap() const { return GetPalette(); };
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
static void InitStandardHandlers();
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
void SetHeight( int height );
|
||||
void SetWidth( int width );
|
||||
void SetDepth( int depth );
|
||||
void SetPixbuf(GdkPixbuf* pixbuf);
|
||||
|
||||
GdkPixmap *GetPixmap() const;
|
||||
bool HasPixmap() const;
|
||||
bool HasPixbuf() const;
|
||||
GdkPixbuf *GetPixbuf() const;
|
||||
|
||||
// raw bitmap access support functions
|
||||
void *GetRawData(wxPixelDataBase& data, int bpp);
|
||||
void UngetRawData(wxPixelDataBase& data);
|
||||
|
||||
bool HasAlpha() const;
|
||||
|
||||
protected:
|
||||
#if wxUSE_IMAGE
|
||||
bool CreateFromImage(const wxImage& image, int depth);
|
||||
#endif // wxUSE_IMAGE
|
||||
|
||||
virtual wxGDIRefData* CreateGDIRefData() const;
|
||||
virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const;
|
||||
|
||||
private:
|
||||
void SetPixmap(GdkPixmap* pixmap);
|
||||
#if wxUSE_IMAGE
|
||||
// to be called from CreateFromImage only!
|
||||
bool CreateFromImageAsPixmap(const wxImage& image, int depth);
|
||||
bool CreateFromImageAsPixbuf(const wxImage& image);
|
||||
#endif // wxUSE_IMAGE
|
||||
|
||||
public:
|
||||
// implementation only
|
||||
enum Representation
|
||||
{
|
||||
Pixmap,
|
||||
Pixbuf
|
||||
};
|
||||
// removes other representations from memory, keeping only 'keep'
|
||||
// (wxBitmap may keep same bitmap e.g. as both pixmap and pixbuf):
|
||||
void PurgeOtherRepresentations(Representation keep);
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmap)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_BITMAP_H_
|
47
Externals/wxWidgets3/include/wx/gtk/bmpbuttn.h
vendored
Normal file
47
Externals/wxWidgets3/include/wx/gtk/bmpbuttn.h
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/bmpbutton.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: bmpbuttn.h 61221 2009-06-27 22:22:48Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_BMPBUTTON_H_
|
||||
#define _WX_GTK_BMPBUTTON_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBitmapButton
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmapButton : public wxBitmapButtonBase
|
||||
{
|
||||
public:
|
||||
wxBitmapButton() { }
|
||||
|
||||
wxBitmapButton(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)
|
||||
{
|
||||
Create(parent, id, bitmap, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapButton)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_BMPBUTTON_H_
|
147
Externals/wxWidgets3/include/wx/gtk/bmpcbox.h
vendored
Normal file
147
Externals/wxWidgets3/include/wx/gtk/bmpcbox.h
vendored
Normal file
@ -0,0 +1,147 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/bmpcbox.h
|
||||
// Purpose: wxBitmapComboBox
|
||||
// Author: Jaakko Salli
|
||||
// Created: 2008-05-19
|
||||
// RCS-ID: $Id: bmpcbox.h 61448 2009-07-18 08:33:55Z JMS $
|
||||
// Copyright: (c) 2008 Jaakko Salli
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_BMPCBOX_H_
|
||||
#define _WX_GTK_BMPCBOX_H_
|
||||
|
||||
|
||||
#include "wx/combobox.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBitmapComboBox: a wxComboBox that allows images to be shown
|
||||
// in front of string items.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxBitmapComboBox : public wxComboBox,
|
||||
public wxBitmapComboBoxBase
|
||||
{
|
||||
public:
|
||||
// ctors and such
|
||||
wxBitmapComboBox() : wxComboBox(), wxBitmapComboBoxBase()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
wxBitmapComboBox(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0,
|
||||
const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxBitmapComboBoxNameStr)
|
||||
: wxComboBox(),
|
||||
wxBitmapComboBoxBase()
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(parent, id, value, pos, size, n,
|
||||
choices, style, validator, name);
|
||||
}
|
||||
|
||||
wxBitmapComboBox(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& value,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxBitmapComboBoxNameStr);
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& value,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
int n,
|
||||
const wxString choices[],
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxBitmapComboBoxNameStr);
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& value,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxBitmapComboBoxNameStr);
|
||||
|
||||
virtual ~wxBitmapComboBox();
|
||||
|
||||
// Sets the image for the given item.
|
||||
virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap);
|
||||
|
||||
// Returns the image of the item with the given index.
|
||||
virtual wxBitmap GetItemBitmap(unsigned int n) const;
|
||||
|
||||
// Returns size of the image used in list
|
||||
virtual wxSize GetBitmapSize() const
|
||||
{
|
||||
return m_bitmapSize;
|
||||
}
|
||||
|
||||
// Adds item with image to the end of the combo box.
|
||||
int Append(const wxString& item, const wxBitmap& bitmap = wxNullBitmap);
|
||||
int Append(const wxString& item, const wxBitmap& bitmap, void *clientData);
|
||||
int Append(const wxString& item, const wxBitmap& bitmap, wxClientData *clientData);
|
||||
|
||||
// Inserts item with image into the list before pos. Not valid for wxCB_SORT
|
||||
// styles, use Append instead.
|
||||
int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos);
|
||||
int Insert(const wxString& item, const wxBitmap& bitmap,
|
||||
unsigned int pos, void *clientData);
|
||||
int Insert(const wxString& item, const wxBitmap& bitmap,
|
||||
unsigned int pos, wxClientData *clientData);
|
||||
|
||||
// Override some wxTextEntry interface.
|
||||
virtual void WriteText(const wxString& value);
|
||||
|
||||
virtual wxString GetValue() const;
|
||||
virtual void Remove(long from, long to);
|
||||
|
||||
virtual void SetInsertionPoint(long pos);
|
||||
virtual long GetInsertionPoint() const;
|
||||
virtual long GetLastPosition() const;
|
||||
|
||||
virtual void SetSelection(long from, long to);
|
||||
virtual void GetSelection(long *from, long *to) const;
|
||||
|
||||
virtual void SetSelection(int n) { wxComboBox::SetSelection(n); }
|
||||
virtual int GetSelection() const { return wxComboBox::GetSelection(); }
|
||||
|
||||
virtual bool IsEditable() const;
|
||||
virtual void SetEditable(bool editable);
|
||||
|
||||
virtual GtkWidget* GetConnectWidget();
|
||||
|
||||
protected:
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
virtual void GTKCreateComboBoxWidget();
|
||||
virtual void GTKInsertComboBoxTextItem( unsigned int n, const wxString& text );
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
wxSize m_bitmapSize;
|
||||
int m_bitmapCellIndex;
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapComboBox)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_BMPCBOX_H_
|
56
Externals/wxWidgets3/include/wx/gtk/brush.h
vendored
Normal file
56
Externals/wxWidgets3/include/wx/gtk/brush.h
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/brush.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: brush.h 54273 2008-06-17 17:28:26Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_BRUSH_H_
|
||||
#define _WX_GTK_BRUSH_H_
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
||||
class WXDLLIMPEXP_FWD_CORE wxColour;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxBrush
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase
|
||||
{
|
||||
public:
|
||||
wxBrush() { }
|
||||
|
||||
wxBrush( const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID );
|
||||
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
||||
wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) );
|
||||
#endif
|
||||
wxBrush( const wxBitmap &stippleBitmap );
|
||||
virtual ~wxBrush();
|
||||
|
||||
bool operator==(const wxBrush& brush) const;
|
||||
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
||||
|
||||
wxBrushStyle GetStyle() const;
|
||||
wxColour GetColour() const;
|
||||
wxBitmap *GetStipple() const;
|
||||
|
||||
void SetColour( const wxColour& col );
|
||||
void SetColour( unsigned char r, unsigned char g, unsigned char b );
|
||||
void SetStyle( wxBrushStyle style );
|
||||
void SetStipple( const wxBitmap& stipple );
|
||||
|
||||
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
||||
wxDEPRECATED_FUTURE( void SetStyle(int style) )
|
||||
{ SetStyle((wxBrushStyle)style); }
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxBrush)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_BRUSH_H_
|
116
Externals/wxWidgets3/include/wx/gtk/button.h
vendored
Normal file
116
Externals/wxWidgets3/include/wx/gtk/button.h
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/button.h
|
||||
// Purpose: wxGTK wxButton class declaration
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: button.h 67066 2011-02-27 12:48:30Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_BUTTON_H_
|
||||
#define _WX_GTK_BUTTON_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxButton : public wxButtonBase
|
||||
{
|
||||
public:
|
||||
wxButton() { Init(); }
|
||||
wxButton(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr);
|
||||
|
||||
virtual wxWindow *SetDefault();
|
||||
virtual void SetLabel( const wxString &label );
|
||||
virtual bool Enable( bool enable = true );
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
// helper to allow access to protected member from GTK callback
|
||||
void MoveWindow(int x, int y, int width, int height) { DoMoveWindow(x, y, width, height); }
|
||||
|
||||
// called from GTK callbacks: they update the button state and call
|
||||
// GTKUpdateBitmap()
|
||||
void GTKMouseEnters();
|
||||
void GTKMouseLeaves();
|
||||
void GTKPressed();
|
||||
void GTKReleased();
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
virtual wxBitmap DoGetBitmap(State which) const;
|
||||
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
|
||||
virtual void DoSetBitmapPosition(wxDirection dir);
|
||||
|
||||
#if wxUSE_MARKUP
|
||||
virtual bool DoSetLabelMarkup(const wxString& markup);
|
||||
#endif // wxUSE_MARKUP
|
||||
|
||||
private:
|
||||
typedef wxButtonBase base_type;
|
||||
|
||||
// common part of all ctors
|
||||
void Init()
|
||||
{
|
||||
m_isCurrent =
|
||||
m_isPressed = false;
|
||||
}
|
||||
|
||||
// focus event handler: calls GTKUpdateBitmap()
|
||||
void GTKOnFocus(wxFocusEvent& event);
|
||||
|
||||
// update the bitmap to correspond to the current button state
|
||||
void GTKUpdateBitmap();
|
||||
|
||||
// return the current button state from m_isXXX flags (which means that it
|
||||
// might not correspond to the real current state as e.g. m_isCurrent will
|
||||
// never be true if we don't have a valid current bitmap)
|
||||
State GTKGetCurrentState() const;
|
||||
|
||||
// show the given bitmap (must be valid)
|
||||
void GTKDoShowBitmap(const wxBitmap& bitmap);
|
||||
|
||||
// Return the GtkLabel used by this button.
|
||||
GtkLabel *GTKGetLabel() const;
|
||||
|
||||
|
||||
// the bitmaps for the different state of the buttons, all of them may be
|
||||
// invalid and the button only shows a bitmap at all if State_Normal bitmap
|
||||
// is valid
|
||||
wxBitmap m_bitmaps[State_Max];
|
||||
|
||||
// true iff mouse is currently over the button
|
||||
bool m_isCurrent;
|
||||
|
||||
// true iff the button is in pressed state
|
||||
bool m_isPressed;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxButton)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_BUTTON_H_
|
54
Externals/wxWidgets3/include/wx/gtk/calctrl.h
vendored
Normal file
54
Externals/wxWidgets3/include/wx/gtk/calctrl.h
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/calctrl.h
|
||||
// Purpose: wxGtkCalendarCtrl control
|
||||
// Author: Marcin Wojdyr
|
||||
// RCS-ID: $Id: calctrl.h 58757 2009-02-08 11:45:59Z VZ $
|
||||
// Copyright: (C) 2008 Marcin Wojdyr
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef GTK_CALCTRL_H__
|
||||
#define GTK_CALCTRL_H__
|
||||
|
||||
class WXDLLIMPEXP_ADV wxGtkCalendarCtrl : public wxCalendarCtrlBase
|
||||
{
|
||||
public:
|
||||
wxGtkCalendarCtrl() {}
|
||||
wxGtkCalendarCtrl(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxDateTime& date = wxDefaultDateTime,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxCAL_SHOW_HOLIDAYS,
|
||||
const wxString& name = wxCalendarNameStr)
|
||||
{
|
||||
Create(parent, id, date, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxDateTime& date = wxDefaultDateTime,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxCAL_SHOW_HOLIDAYS,
|
||||
const wxString& name = wxCalendarNameStr);
|
||||
|
||||
virtual ~wxGtkCalendarCtrl() {}
|
||||
|
||||
virtual bool SetDate(const wxDateTime& date);
|
||||
virtual wxDateTime GetDate() const;
|
||||
|
||||
virtual bool EnableMonthChange(bool enable = true);
|
||||
|
||||
virtual void Mark(size_t day, bool mark);
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
wxDateTime m_selectedDate;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxGtkCalendarCtrl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxGtkCalendarCtrl);
|
||||
};
|
||||
|
||||
#endif // GTK_CALCTRL_H__
|
67
Externals/wxWidgets3/include/wx/gtk/checkbox.h
vendored
Normal file
67
Externals/wxWidgets3/include/wx/gtk/checkbox.h
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/checkbox.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: checkbox.h 62786 2009-12-05 19:26:39Z PC $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTKCHECKBOX_H_
|
||||
#define _WX_GTKCHECKBOX_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCheckBox
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCheckBox : public wxCheckBoxBase
|
||||
{
|
||||
public:
|
||||
wxCheckBox();
|
||||
wxCheckBox( 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 = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
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 = wxCheckBoxNameStr );
|
||||
|
||||
void SetValue( bool state );
|
||||
bool GetValue() const;
|
||||
|
||||
virtual void SetLabel( const wxString& label );
|
||||
virtual bool Enable( bool enable = true );
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
// implementation
|
||||
void GTKDisableEvents();
|
||||
void GTKEnableEvents();
|
||||
|
||||
protected:
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
void DoSet3StateValue(wxCheckBoxState state);
|
||||
wxCheckBoxState DoGet3StateValue() const;
|
||||
|
||||
private:
|
||||
typedef wxCheckBoxBase base_type;
|
||||
|
||||
GtkWidget *m_widgetCheckbox;
|
||||
GtkWidget *m_widgetLabel;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxCheckBox)
|
||||
};
|
||||
|
||||
#endif // _WX_GTKCHECKBOX_H_
|
62
Externals/wxWidgets3/include/wx/gtk/checklst.h
vendored
Normal file
62
Externals/wxWidgets3/include/wx/gtk/checklst.h
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/checklst.h
|
||||
// Purpose: wxCheckListBox class
|
||||
// Author: Robert Roebling
|
||||
// Modified by:
|
||||
// RCS-ID: $Id: checklst.h 61508 2009-07-23 20:30:22Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKCHECKLISTH__
|
||||
#define __GTKCHECKLISTH__
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// there is no "right" choice of the checkbox indicators, so allow the user to
|
||||
// define them himself if he wants
|
||||
#ifndef wxCHECKLBOX_CHECKED
|
||||
#define wxCHECKLBOX_CHECKED wxT('x')
|
||||
#define wxCHECKLBOX_UNCHECKED wxT(' ')
|
||||
|
||||
#define wxCHECKLBOX_STRING wxT("[ ] ")
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxCheckListBox
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCheckListBox : public wxListBox
|
||||
{
|
||||
public:
|
||||
wxCheckListBox();
|
||||
wxCheckListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int nStrings = 0,
|
||||
const wxString *choices = (const wxString *)NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
wxCheckListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
bool IsChecked(unsigned int index) const;
|
||||
void Check(unsigned int index, bool check = true);
|
||||
|
||||
int GetItemHeight() const;
|
||||
|
||||
void DoCreateCheckList();
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxCheckListBox)
|
||||
};
|
||||
|
||||
#endif //__GTKCHECKLISTH__
|
31
Externals/wxWidgets3/include/wx/gtk/chkconf.h
vendored
Normal file
31
Externals/wxWidgets3/include/wx/gtk/chkconf.h
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Name: wx/gtk/chkconf.h
|
||||
* Purpose: wxGTK-specific settings consistency checks
|
||||
* Author: Vadim Zeitlin
|
||||
* Created: 2007-07-19 (extracted from wx/chkconf.h)
|
||||
* RCS-ID: $Id: chkconf.h 47564 2007-07-19 15:47:11Z VZ $
|
||||
* Copyright: (c) 2000-2007 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
* Licence: wxWindows licence
|
||||
*/
|
||||
|
||||
#ifndef __WXUNIVERSAL__
|
||||
# if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
# error "MDI requires wxUSE_MENUS in wxGTK"
|
||||
# else
|
||||
# undef wxUSE_MENUS
|
||||
# define wxUSE_MENUS 1
|
||||
# endif
|
||||
# endif
|
||||
#endif /* !__WXUNIVERSAL__ */
|
||||
|
||||
#if wxUSE_JOYSTICK
|
||||
# if !wxUSE_THREADS
|
||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||
# error "wxJoystick requires threads in wxGTK"
|
||||
# else
|
||||
# undef wxUSE_JOYSTICK
|
||||
# define wxUSE_JOYSTICK 0
|
||||
# endif
|
||||
# endif
|
||||
#endif /* wxUSE_JOYSTICK */
|
120
Externals/wxWidgets3/include/wx/gtk/choice.h
vendored
Normal file
120
Externals/wxWidgets3/include/wx/gtk/choice.h
vendored
Normal file
@ -0,0 +1,120 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/choice.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: choice.h 65818 2010-10-15 23:46:32Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_CHOICE_H_
|
||||
#define _WX_GTK_CHOICE_H_
|
||||
|
||||
class WXDLLIMPEXP_FWD_BASE wxSortedArrayString;
|
||||
class WXDLLIMPEXP_FWD_BASE wxArrayString;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxChoice
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxGtkCollatedArrayString;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxChoice : public wxChoiceBase
|
||||
{
|
||||
public:
|
||||
wxChoice()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
wxChoice( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = (const wxString *) NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr )
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
wxChoice( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr )
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, pos, size, choices, style, validator, name);
|
||||
}
|
||||
virtual ~wxChoice();
|
||||
bool Create( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr );
|
||||
bool Create( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr );
|
||||
|
||||
void SendSelectionChangedEvent(wxEventType evt_type);
|
||||
|
||||
int GetSelection() const;
|
||||
void SetSelection(int n);
|
||||
|
||||
virtual unsigned int GetCount() const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual wxString GetString(unsigned int n) const;
|
||||
virtual void SetString(unsigned int n, const wxString& string);
|
||||
|
||||
virtual void SetColumns(int n=1);
|
||||
virtual int GetColumns() const;
|
||||
|
||||
virtual void GTKDisableEvents();
|
||||
virtual void GTKEnableEvents();
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
protected:
|
||||
// this array is only used for controls with wxCB_SORT style, so only
|
||||
// allocate it if it's needed (hence using pointer)
|
||||
wxGtkCollatedArrayString *m_strings;
|
||||
|
||||
// contains the client data for the items
|
||||
wxArrayPtrVoid m_clientData;
|
||||
|
||||
// index to GtkListStore cell which displays the item text
|
||||
int m_stringCellIndex;
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual int DoInsertItems(const wxArrayStringsAdapter& items,
|
||||
unsigned int pos,
|
||||
void **clientData, wxClientDataType type);
|
||||
virtual void DoSetItemClientData(unsigned int n, void* clientData);
|
||||
virtual void* DoGetItemClientData(unsigned int n) const;
|
||||
virtual void DoClear();
|
||||
virtual void DoDeleteOneItem(unsigned int n);
|
||||
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
|
||||
// in derived classes, implement this to insert list store entry
|
||||
// with all items default except text
|
||||
virtual void GTKInsertComboBoxTextItem( unsigned int n, const wxString& text );
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxChoice)
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_GTK_CHOICE_H_
|
133
Externals/wxWidgets3/include/wx/gtk/clipbrd.h
vendored
Normal file
133
Externals/wxWidgets3/include/wx/gtk/clipbrd.h
vendored
Normal file
@ -0,0 +1,133 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/clipbrd.h
|
||||
// Purpose: wxClipboard for wxGTK
|
||||
// Author: Robert Roebling, Vadim Zeitlin
|
||||
// Id: $Id: clipbrd.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// (c) 2007 Vadim Zeitlin
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_CLIPBOARD_H_
|
||||
#define _WX_GTK_CLIPBOARD_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxClipboard
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/weakref.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxClipboard : public wxClipboardBase
|
||||
{
|
||||
public:
|
||||
// there are several clipboards in X11 (and in GDK)
|
||||
enum Kind
|
||||
{
|
||||
Primary,
|
||||
Clipboard
|
||||
};
|
||||
|
||||
wxClipboard();
|
||||
virtual ~wxClipboard();
|
||||
|
||||
// open the clipboard before SetData() and GetData()
|
||||
virtual bool Open();
|
||||
|
||||
// close the clipboard after SetData() and GetData()
|
||||
virtual void Close();
|
||||
|
||||
// query whether the clipboard is opened
|
||||
virtual bool IsOpened() const;
|
||||
|
||||
// set the clipboard data. all other formats will be deleted.
|
||||
virtual bool SetData( wxDataObject *data );
|
||||
|
||||
// add to the clipboard data.
|
||||
virtual bool AddData( wxDataObject *data );
|
||||
|
||||
// ask if data in correct format is available
|
||||
virtual bool IsSupported( const wxDataFormat& format );
|
||||
|
||||
// ask if data in correct format is available
|
||||
virtual bool IsSupportedAsync( wxEvtHandler *sink );
|
||||
|
||||
// fill data with data on the clipboard (if available)
|
||||
virtual bool GetData( wxDataObject& data );
|
||||
|
||||
// clears wxTheClipboard and the system's clipboard if possible
|
||||
virtual void Clear();
|
||||
|
||||
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
// get our clipboard item (depending on m_usePrimary value)
|
||||
GdkAtom GTKGetClipboardAtom() const;
|
||||
|
||||
// get the data object currently being requested
|
||||
wxDataObject *GTKGetDataObject( GdkAtom atom );
|
||||
|
||||
// clear the data for the given clipboard kind
|
||||
void GTKClearData(Kind kind);
|
||||
|
||||
// called when selection data is received
|
||||
void GTKOnSelectionReceived(const GtkSelectionData& sel);
|
||||
|
||||
// called when available target information is received
|
||||
bool GTKOnTargetReceived(const wxDataFormat& format);
|
||||
|
||||
private:
|
||||
// the data object for the specific selection
|
||||
wxDataObject *& Data(Kind kind)
|
||||
{
|
||||
return kind == Primary ? m_dataPrimary : m_dataClipboard;
|
||||
}
|
||||
|
||||
// the data object we're currently using
|
||||
wxDataObject *& Data()
|
||||
{
|
||||
return Data(m_usePrimary ? Primary : Clipboard);
|
||||
}
|
||||
|
||||
|
||||
// set or unset selection ownership
|
||||
bool SetSelectionOwner(bool set = true);
|
||||
|
||||
// add atom to the list of supported targets
|
||||
void AddSupportedTarget(GdkAtom atom);
|
||||
|
||||
// check if the given format is supported
|
||||
bool DoIsSupported(const wxDataFormat& format);
|
||||
|
||||
|
||||
// both of these pointers can be non-NULL simultaneously but we only use
|
||||
// one of them at any moment depending on m_usePrimary value, use Data()
|
||||
// (from inside) or GTKGetDataObject() (from outside) accessors
|
||||
wxDataObject *m_dataPrimary,
|
||||
*m_dataClipboard;
|
||||
|
||||
// this is used to temporarily hold the object passed to our GetData() so
|
||||
// that GTK callbacks could access it
|
||||
wxDataObject *m_receivedData;
|
||||
|
||||
// used to pass information about the format we need from DoIsSupported()
|
||||
// to GTKOnTargetReceived()
|
||||
GdkAtom m_targetRequested;
|
||||
|
||||
GtkWidget *m_clipboardWidget; // for getting and offering data
|
||||
GtkWidget *m_targetsWidget; // for getting list of supported formats
|
||||
|
||||
bool m_open;
|
||||
bool m_formatSupported;
|
||||
|
||||
public:
|
||||
// async stuff
|
||||
wxEvtHandlerRef m_sink;
|
||||
private:
|
||||
GtkWidget *m_targetsWidgetAsync; // for getting list of supported formats
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxClipboard)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_CLIPBOARD_H_
|
65
Externals/wxWidgets3/include/wx/gtk/clrpicker.h
vendored
Normal file
65
Externals/wxWidgets3/include/wx/gtk/clrpicker.h
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/clrpicker.h
|
||||
// Purpose: wxColourButton header
|
||||
// Author: Francesco Montorsi
|
||||
// Modified by:
|
||||
// Created: 14/4/2006
|
||||
// Copyright: (c) Francesco Montorsi
|
||||
// RCS-ID: $Id: clrpicker.h 49668 2007-11-06 00:32:34Z MR $
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_CLRPICKER_H_
|
||||
#define _WX_GTK_CLRPICKER_H_
|
||||
|
||||
#include "wx/button.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxColourButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxColourButton : public wxButton,
|
||||
public wxColourPickerWidgetBase
|
||||
{
|
||||
public:
|
||||
wxColourButton() : m_topParent(NULL) {}
|
||||
wxColourButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxColour& initial = *wxBLACK,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxCLRBTN_DEFAULT_STYLE,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxColourPickerWidgetNameStr)
|
||||
: m_topParent(NULL)
|
||||
{
|
||||
Create(parent, id, initial, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxColour& initial = *wxBLACK,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxCLRBTN_DEFAULT_STYLE,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxColourPickerWidgetNameStr);
|
||||
|
||||
virtual ~wxColourButton();
|
||||
|
||||
protected:
|
||||
void UpdateColour();
|
||||
|
||||
public: // used by the GTK callback only
|
||||
|
||||
void SetGdkColor(const GdkColor& gdkColor)
|
||||
{ m_colour = wxColor(gdkColor); }
|
||||
|
||||
wxWindow *m_topParent;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxColourButton)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_CLRPICKER_H_
|
||||
|
80
Externals/wxWidgets3/include/wx/gtk/collpane.h
vendored
Normal file
80
Externals/wxWidgets3/include/wx/gtk/collpane.h
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/collpane.h
|
||||
// Purpose: wxCollapsiblePane
|
||||
// Author: Francesco Montorsi
|
||||
// Modified by:
|
||||
// Created: 8/10/2006
|
||||
// RCS-ID: $Id: collpane.h 58632 2009-02-03 09:53:33Z RR $
|
||||
// Copyright: (c) Francesco Montorsi
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COLLAPSABLE_PANEL_H_GTK_
|
||||
#define _WX_COLLAPSABLE_PANEL_H_GTK_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCollapsiblePane
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCollapsiblePane : public wxCollapsiblePaneBase
|
||||
{
|
||||
public:
|
||||
wxCollapsiblePane() { Init(); }
|
||||
|
||||
wxCollapsiblePane(wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxCP_DEFAULT_STYLE,
|
||||
const wxValidator& val = wxDefaultValidator,
|
||||
const wxString& name = wxCollapsiblePaneNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, winid, label, pos, size, style, val, name);
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
m_bIgnoreNextChange = false;
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID winid,
|
||||
const wxString& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxCP_DEFAULT_STYLE,
|
||||
const wxValidator& val = wxDefaultValidator,
|
||||
const wxString& name = wxCollapsiblePaneNameStr);
|
||||
|
||||
virtual void Collapse(bool collapse = true);
|
||||
virtual bool IsCollapsed() const;
|
||||
virtual void SetLabel(const wxString& str);
|
||||
|
||||
virtual wxWindow *GetPane() const { return m_pPane; }
|
||||
virtual wxString GetLabel() const { return m_strLabel; }
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
public: // used by GTK callbacks
|
||||
bool m_bIgnoreNextChange;
|
||||
wxSize m_szCollapsed;
|
||||
|
||||
wxWindow *m_pPane;
|
||||
|
||||
// the button label without ">>" or "<<"
|
||||
wxString m_strLabel;
|
||||
|
||||
private:
|
||||
void OnSize(wxSizeEvent&);
|
||||
virtual void AddChildGTK(wxWindowGTK* child);
|
||||
GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxCollapsiblePane)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // _WX_COLLAPSABLE_PANEL_H_GTK_
|
49
Externals/wxWidgets3/include/wx/gtk/colordlg.h
vendored
Normal file
49
Externals/wxWidgets3/include/wx/gtk/colordlg.h
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/colordlg.h
|
||||
// Purpose: wxColourDialog
|
||||
// Author: Vaclav Slavik
|
||||
// Modified by:
|
||||
// Created: 2004/06/04
|
||||
// RCS-ID: $Id: colordlg.h 66615 2011-01-07 05:26:57Z PC $
|
||||
// Copyright: (c) Vaclav Slavik, 2004
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_COLORDLG_H_
|
||||
#define _WX_GTK_COLORDLG_H_
|
||||
|
||||
#include "wx/dialog.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxColourDialog : public wxDialog
|
||||
{
|
||||
public:
|
||||
wxColourDialog() {}
|
||||
wxColourDialog(wxWindow *parent,
|
||||
wxColourData *data = NULL);
|
||||
virtual ~wxColourDialog() {}
|
||||
|
||||
bool Create(wxWindow *parent, wxColourData *data = NULL);
|
||||
|
||||
wxColourData &GetColourData() { return m_data; }
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
protected:
|
||||
// implement some base class methods to do nothing to avoid asserts and
|
||||
// GTK warnings, since this is not a real wxDialog.
|
||||
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(width), int WXUNUSED(height),
|
||||
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
||||
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(width), int WXUNUSED(height)) {}
|
||||
|
||||
// copy data between the dialog and m_colourData:
|
||||
void ColourDataToDialog();
|
||||
void DialogToColourData();
|
||||
|
||||
wxColourData m_data;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxColourDialog)
|
||||
};
|
||||
|
||||
#endif
|
50
Externals/wxWidgets3/include/wx/gtk/colour.h
vendored
Normal file
50
Externals/wxWidgets3/include/wx/gtk/colour.h
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/colour.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: colour.h 50897 2007-12-22 15:03:58Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_COLOUR_H_
|
||||
#define _WX_GTK_COLOUR_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxColour
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxColour : public wxColourBase
|
||||
{
|
||||
public:
|
||||
// constructors
|
||||
// ------------
|
||||
DEFINE_STD_WXCOLOUR_CONSTRUCTORS
|
||||
wxColour(const GdkColor& gdkColor);
|
||||
|
||||
virtual ~wxColour();
|
||||
|
||||
bool operator==(const wxColour& col) const;
|
||||
bool operator!=(const wxColour& col) const { return !(*this == col); }
|
||||
|
||||
unsigned char Red() const;
|
||||
unsigned char Green() const;
|
||||
unsigned char Blue() const;
|
||||
unsigned char Alpha() const;
|
||||
|
||||
// Implementation part
|
||||
void CalcPixel( GdkColormap *cmap );
|
||||
int GetPixel() const;
|
||||
const GdkColor *GetColor() const;
|
||||
|
||||
protected:
|
||||
virtual void
|
||||
InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
|
||||
|
||||
virtual bool FromString(const wxString& str);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxColour)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_COLOUR_H_
|
159
Externals/wxWidgets3/include/wx/gtk/combobox.h
vendored
Normal file
159
Externals/wxWidgets3/include/wx/gtk/combobox.h
vendored
Normal file
@ -0,0 +1,159 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/combobox.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id: $Id: combobox.h 65324 2010-08-16 17:48:28Z RR $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_COMBOBOX_H_
|
||||
#define _WX_GTK_COMBOBOX_H_
|
||||
|
||||
#include "wx/choice.h"
|
||||
|
||||
typedef struct _GtkEntry GtkEntry;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxComboBox
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxComboBox : public wxChoice,
|
||||
public wxTextEntry
|
||||
{
|
||||
public:
|
||||
wxComboBox()
|
||||
: wxChoice(), wxTextEntry()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
wxComboBox(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr)
|
||||
: wxChoice(), wxTextEntry()
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, value, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
|
||||
wxComboBox(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr)
|
||||
: wxChoice(), wxTextEntry()
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, value, pos, size, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = (const wxString *) NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr);
|
||||
|
||||
// Set/GetSelection() from wxTextEntry and wxChoice
|
||||
|
||||
virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
|
||||
virtual void SetSelection(long from, long to)
|
||||
{ wxTextEntry::SetSelection(from, to); }
|
||||
|
||||
virtual int GetSelection() const { return wxChoice::GetSelection(); }
|
||||
virtual void GetSelection(long *from, long *to) const
|
||||
{ return wxTextEntry::GetSelection(from, to); }
|
||||
|
||||
virtual wxString GetStringSelection() const
|
||||
{
|
||||
return wxItemContainer::GetStringSelection();
|
||||
}
|
||||
virtual void Popup();
|
||||
virtual void Dismiss();
|
||||
|
||||
virtual void Clear()
|
||||
{
|
||||
wxTextEntry::Clear();
|
||||
wxItemContainer::Clear();
|
||||
}
|
||||
|
||||
bool IsEmpty() const { return wxItemContainer::IsEmpty(); }
|
||||
|
||||
void OnChar( wxKeyEvent &event );
|
||||
|
||||
virtual void SetValue(const wxString& value);
|
||||
|
||||
// Standard event handling
|
||||
void OnCut(wxCommandEvent& event);
|
||||
void OnCopy(wxCommandEvent& event);
|
||||
void OnPaste(wxCommandEvent& event);
|
||||
void OnUndo(wxCommandEvent& event);
|
||||
void OnRedo(wxCommandEvent& event);
|
||||
void OnDelete(wxCommandEvent& event);
|
||||
void OnSelectAll(wxCommandEvent& event);
|
||||
|
||||
void OnUpdateCut(wxUpdateUIEvent& event);
|
||||
void OnUpdateCopy(wxUpdateUIEvent& event);
|
||||
void OnUpdatePaste(wxUpdateUIEvent& event);
|
||||
void OnUpdateUndo(wxUpdateUIEvent& event);
|
||||
void OnUpdateRedo(wxUpdateUIEvent& event);
|
||||
void OnUpdateDelete(wxUpdateUIEvent& event);
|
||||
void OnUpdateSelectAll(wxUpdateUIEvent& event);
|
||||
|
||||
virtual void GTKDisableEvents();
|
||||
virtual void GTKEnableEvents();
|
||||
GtkWidget* GetConnectWidget();
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
protected:
|
||||
// From wxWindowGTK:
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
// Widgets that use the style->base colour for the BG colour should
|
||||
// override this and return true.
|
||||
virtual bool UseGTKStyleBase() const { return true; }
|
||||
|
||||
// Override in derived classes to create combo box widgets with
|
||||
// custom list stores.
|
||||
virtual void GTKCreateComboBoxWidget();
|
||||
|
||||
virtual GtkEntry *GetEntry() const
|
||||
{ return m_entry; }
|
||||
|
||||
GtkEntry* m_entry;
|
||||
|
||||
private:
|
||||
// From wxTextEntry:
|
||||
virtual wxWindow *GetEditableWindow() { return this; }
|
||||
virtual GtkEditable *GetEditable() const;
|
||||
virtual void EnableTextChangedEvents(bool enable);
|
||||
|
||||
void Init();
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_COMBOBOX_H_
|
104
Externals/wxWidgets3/include/wx/gtk/control.h
vendored
Normal file
104
Externals/wxWidgets3/include/wx/gtk/control.h
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/control.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: control.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_CONTROL_H_
|
||||
#define _WX_GTK_CONTROL_H_
|
||||
|
||||
typedef struct _GtkLabel GtkLabel;
|
||||
typedef struct _GtkFrame GtkFrame;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxControl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// C-linkage function pointer types for GetDefaultAttributesFromGTKWidget
|
||||
extern "C" {
|
||||
typedef GtkWidget* (*wxGtkWidgetNew_t)(void);
|
||||
typedef GtkWidget* (*wxGtkWidgetNewFromStr_t)(const gchar*);
|
||||
typedef GtkWidget* (*wxGtkWidgetNewFromAdj_t)(GtkAdjustment*);
|
||||
}
|
||||
|
||||
class WXDLLIMPEXP_CORE wxControl : public wxControlBase
|
||||
{
|
||||
public:
|
||||
wxControl();
|
||||
wxControl(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxControlNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxControlNameStr);
|
||||
|
||||
|
||||
virtual wxVisualAttributes GetDefaultAttributes() const;
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
void PostCreation(const wxSize& size);
|
||||
|
||||
// sets the label to the given string and also sets it for the given widget
|
||||
void GTKSetLabelForLabel(GtkLabel *w, const wxString& label);
|
||||
#if wxUSE_MARKUP
|
||||
void GTKSetLabelWithMarkupForLabel(GtkLabel *w, const wxString& label);
|
||||
#endif // wxUSE_MARKUP
|
||||
|
||||
// GtkFrame helpers
|
||||
GtkWidget* GTKCreateFrame(const wxString& label);
|
||||
void GTKSetLabelForFrame(GtkFrame *w, const wxString& label);
|
||||
void GTKFrameApplyWidgetStyle(GtkFrame* w, GtkRcStyle* rc);
|
||||
void GTKFrameSetMnemonicWidget(GtkFrame* w, GtkWidget* widget);
|
||||
|
||||
// remove mnemonics ("&"s) from the label
|
||||
static wxString GTKRemoveMnemonics(const wxString& label);
|
||||
|
||||
// converts wx label to GTK+ label, i.e. basically replace "&"s with "_"s
|
||||
static wxString GTKConvertMnemonics(const wxString &label);
|
||||
|
||||
// converts wx label to GTK+ labels preserving Pango markup
|
||||
static wxString GTKConvertMnemonicsWithMarkup(const wxString& label);
|
||||
|
||||
// These are used by GetDefaultAttributes
|
||||
static wxVisualAttributes
|
||||
GetDefaultAttributesFromGTKWidget(GtkWidget* widget,
|
||||
bool useBase = false,
|
||||
int state = -1);
|
||||
static wxVisualAttributes
|
||||
GetDefaultAttributesFromGTKWidget(wxGtkWidgetNew_t,
|
||||
bool useBase = false,
|
||||
int state = -1);
|
||||
static wxVisualAttributes
|
||||
GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromStr_t,
|
||||
bool useBase = false,
|
||||
int state = -1);
|
||||
|
||||
static wxVisualAttributes
|
||||
GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromAdj_t,
|
||||
bool useBase = false,
|
||||
int state = -1);
|
||||
|
||||
// Widgets that use the style->base colour for the BG colour should
|
||||
// override this and return true.
|
||||
virtual bool UseGTKStyleBase() const { return false; }
|
||||
|
||||
// Fix sensitivity due to bug in GTK+ < 2.14
|
||||
void GTKFixSensitivity(bool onlyIfUnderMouse = true);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxControl)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_CONTROL_H_
|
60
Externals/wxWidgets3/include/wx/gtk/cursor.h
vendored
Normal file
60
Externals/wxWidgets3/include/wx/gtk/cursor.h
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/cursor.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: cursor.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_CURSOR_H_
|
||||
#define _WX_GTK_CURSOR_H_
|
||||
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxColour;
|
||||
class WXDLLIMPEXP_FWD_CORE wxImage;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxCursor
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxCursor();
|
||||
wxCursor(wxStockCursor id) { InitFromStock(id); }
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
wxCursor(int id) { InitFromStock((wxStockCursor)id); }
|
||||
#endif
|
||||
#if wxUSE_IMAGE
|
||||
wxCursor( const wxImage & image );
|
||||
wxCursor(const wxString& name,
|
||||
wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
|
||||
int hotSpotX = 0, int hotSpotY = 0);
|
||||
#endif
|
||||
wxCursor( const char bits[], int width, int height,
|
||||
int hotSpotX = -1, int hotSpotY = -1,
|
||||
const char maskBits[] = NULL,
|
||||
const wxColour* fg = NULL, const wxColour* bg = NULL);
|
||||
virtual ~wxCursor();
|
||||
|
||||
// implementation
|
||||
|
||||
GdkCursor *GetCursor() const;
|
||||
|
||||
protected:
|
||||
void InitFromStock(wxStockCursor);
|
||||
#if wxUSE_IMAGE
|
||||
void InitFromImage(const wxImage& image);
|
||||
#endif
|
||||
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxCursor)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_CURSOR_H_
|
81
Externals/wxWidgets3/include/wx/gtk/dataform.h
vendored
Normal file
81
Externals/wxWidgets3/include/wx/gtk/dataform.h
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/dataform.h
|
||||
// Purpose: declaration of the wxDataFormat class
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 19.10.99 (extracted from gtk/dataobj.h)
|
||||
// RCS-ID: $Id: dataform.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_DATAFORM_H
|
||||
#define _WX_GTK_DATAFORM_H
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDataFormat
|
||||
{
|
||||
public:
|
||||
// the clipboard formats under GDK are GdkAtoms
|
||||
typedef GdkAtom NativeFormat;
|
||||
|
||||
wxDataFormat();
|
||||
wxDataFormat( wxDataFormatId type );
|
||||
wxDataFormat( NativeFormat format );
|
||||
|
||||
// we have to provide all the overloads to allow using strings instead of
|
||||
// data formats (as a lot of existing code does)
|
||||
wxDataFormat( const wxString& id ) { InitFromString(id); }
|
||||
wxDataFormat( const char *id ) { InitFromString(id); }
|
||||
wxDataFormat( const wchar_t *id ) { InitFromString(id); }
|
||||
wxDataFormat( const wxCStrData& id ) { InitFromString(id); }
|
||||
|
||||
wxDataFormat& operator=(const wxDataFormat& format)
|
||||
{
|
||||
if (&format != this)
|
||||
{
|
||||
m_type = format.m_type;
|
||||
m_format = format.m_format;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
wxDataFormat& operator=(NativeFormat format)
|
||||
{ SetId(format); return *this; }
|
||||
|
||||
// comparison (must have both versions)
|
||||
bool operator==(NativeFormat format) const
|
||||
{ return m_format == (NativeFormat)format; }
|
||||
bool operator!=(NativeFormat format) const
|
||||
{ return m_format != (NativeFormat)format; }
|
||||
bool operator==(wxDataFormatId format) const
|
||||
{ return m_type == (wxDataFormatId)format; }
|
||||
bool operator!=(wxDataFormatId format) const
|
||||
{ return m_type != (wxDataFormatId)format; }
|
||||
|
||||
// explicit and implicit conversions to NativeFormat which is one of
|
||||
// standard data types (implicit conversion is useful for preserving the
|
||||
// compatibility with old code)
|
||||
NativeFormat GetFormatId() const { return m_format; }
|
||||
operator NativeFormat() const { return m_format; }
|
||||
|
||||
void SetId( NativeFormat format );
|
||||
|
||||
// string ids are used for custom types - this SetId() must be used for
|
||||
// application-specific formats
|
||||
wxString GetId() const;
|
||||
void SetId( const wxString& id );
|
||||
|
||||
// implementation
|
||||
wxDataFormatId GetType() const;
|
||||
void SetType( wxDataFormatId type );
|
||||
|
||||
private:
|
||||
// common part of ctors from format name
|
||||
void InitFromString(const wxString& id);
|
||||
|
||||
wxDataFormatId m_type;
|
||||
NativeFormat m_format;
|
||||
|
||||
void PrepareFormats();
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_DATAFORM_H
|
27
Externals/wxWidgets3/include/wx/gtk/dataobj.h
vendored
Normal file
27
Externals/wxWidgets3/include/wx/gtk/dataobj.h
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/dataobj.h
|
||||
// Purpose: declaration of the wxDataObject
|
||||
// Author: Robert Roebling
|
||||
// RCS-ID: $Id: dataobj.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_DATAOBJ_H_
|
||||
#define _WX_GTK_DATAOBJ_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxDataObject is the same as wxDataObjectBase under wxGTK
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase
|
||||
{
|
||||
public:
|
||||
wxDataObject();
|
||||
virtual ~wxDataObject();
|
||||
|
||||
virtual bool IsSupportedFormat( const wxDataFormat& format, Direction dir = Get ) const;
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_DATAOBJ_H_
|
||||
|
128
Externals/wxWidgets3/include/wx/gtk/dataobj2.h
vendored
Normal file
128
Externals/wxWidgets3/include/wx/gtk/dataobj2.h
vendored
Normal file
@ -0,0 +1,128 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/dataobj2.h
|
||||
// Purpose: declaration of standard wxDataObjectSimple-derived classes
|
||||
// Author: Robert Roebling
|
||||
// Created: 19.10.99 (extracted from gtk/dataobj.h)
|
||||
// RCS-ID: $Id: dataobj2.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_DATAOBJ2_H_
|
||||
#define _WX_GTK_DATAOBJ2_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBitmapDataObject is a specialization of wxDataObject for bitmaps
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmapDataObject : public wxBitmapDataObjectBase
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
wxBitmapDataObject();
|
||||
wxBitmapDataObject(const wxBitmap& bitmap);
|
||||
|
||||
// destr
|
||||
virtual ~wxBitmapDataObject();
|
||||
|
||||
// override base class virtual to update PNG data too
|
||||
virtual void SetBitmap(const wxBitmap& bitmap);
|
||||
|
||||
// implement base class pure virtuals
|
||||
// ----------------------------------
|
||||
|
||||
virtual size_t GetDataSize() const { return m_pngSize; }
|
||||
virtual bool GetDataHere(void *buf) const;
|
||||
virtual bool SetData(size_t len, const void *buf);
|
||||
// Must provide overloads to avoid hiding them (and warnings about it)
|
||||
virtual size_t GetDataSize(const wxDataFormat&) const
|
||||
{
|
||||
return GetDataSize();
|
||||
}
|
||||
virtual bool GetDataHere(const wxDataFormat&, void *buf) const
|
||||
{
|
||||
return GetDataHere(buf);
|
||||
}
|
||||
virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
|
||||
{
|
||||
return SetData(len, buf);
|
||||
}
|
||||
|
||||
protected:
|
||||
void Init() { m_pngData = NULL; m_pngSize = 0; }
|
||||
void Clear() { free(m_pngData); }
|
||||
void ClearAll() { Clear(); Init(); }
|
||||
|
||||
size_t m_pngSize;
|
||||
void *m_pngData;
|
||||
|
||||
void DoConvertToPng();
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxFileDataObject is a specialization of wxDataObject for file names
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFileDataObject : public wxFileDataObjectBase
|
||||
{
|
||||
public:
|
||||
// implement base class pure virtuals
|
||||
// ----------------------------------
|
||||
|
||||
void AddFile( const wxString &filename );
|
||||
|
||||
virtual size_t GetDataSize() const;
|
||||
virtual bool GetDataHere(void *buf) const;
|
||||
virtual bool SetData(size_t len, const void *buf);
|
||||
// Must provide overloads to avoid hiding them (and warnings about it)
|
||||
virtual size_t GetDataSize(const wxDataFormat&) const
|
||||
{
|
||||
return GetDataSize();
|
||||
}
|
||||
virtual bool GetDataHere(const wxDataFormat&, void *buf) const
|
||||
{
|
||||
return GetDataHere(buf);
|
||||
}
|
||||
virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
|
||||
{
|
||||
return SetData(len, buf);
|
||||
}
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxURLDataObject is a specialization of wxDataObject for URLs
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxURLDataObject : public wxDataObjectSimple
|
||||
{
|
||||
public:
|
||||
wxURLDataObject(const wxString& url = wxEmptyString);
|
||||
|
||||
wxString GetURL() const { return m_url; }
|
||||
void SetURL(const wxString& url) { m_url = url; }
|
||||
|
||||
virtual size_t GetDataSize() const;
|
||||
virtual bool GetDataHere(void *buf) const;
|
||||
virtual bool SetData(size_t len, const void *buf);
|
||||
|
||||
// Must provide overloads to avoid hiding them (and warnings about it)
|
||||
virtual size_t GetDataSize(const wxDataFormat&) const
|
||||
{
|
||||
return GetDataSize();
|
||||
}
|
||||
virtual bool GetDataHere(const wxDataFormat&, void *buf) const
|
||||
{
|
||||
return GetDataHere(buf);
|
||||
}
|
||||
virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
|
||||
{
|
||||
return SetData(len, buf);
|
||||
}
|
||||
|
||||
private:
|
||||
wxString m_url;
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_GTK_DATAOBJ2_H_
|
||||
|
214
Externals/wxWidgets3/include/wx/gtk/dataview.h
vendored
Normal file
214
Externals/wxWidgets3/include/wx/gtk/dataview.h
vendored
Normal file
@ -0,0 +1,214 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/dataview.h
|
||||
// Purpose: wxDataViewCtrl GTK+2 implementation header
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: dataview.h 65562 2010-09-17 19:07:02Z RR $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTKDATAVIEWCTRL_H_
|
||||
#define _WX_GTKDATAVIEWCTRL_H_
|
||||
|
||||
#include "wx/list.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_ADV wxDataViewCtrlInternal;
|
||||
|
||||
struct _GtkTreePath;
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewColumn
|
||||
// ---------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewColumn: public wxDataViewColumnBase
|
||||
{
|
||||
public:
|
||||
wxDataViewColumn( const wxString &title, wxDataViewRenderer *renderer,
|
||||
unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH,
|
||||
wxAlignment align = wxALIGN_CENTER,
|
||||
int flags = wxDATAVIEW_COL_RESIZABLE );
|
||||
wxDataViewColumn( const wxBitmap &bitmap, wxDataViewRenderer *renderer,
|
||||
unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH,
|
||||
wxAlignment align = wxALIGN_CENTER,
|
||||
int flags = wxDATAVIEW_COL_RESIZABLE );
|
||||
|
||||
|
||||
// setters:
|
||||
|
||||
virtual void SetTitle( const wxString &title );
|
||||
virtual void SetBitmap( const wxBitmap &bitmap );
|
||||
|
||||
virtual void SetOwner( wxDataViewCtrl *owner );
|
||||
|
||||
virtual void SetAlignment( wxAlignment align );
|
||||
|
||||
virtual void SetSortable( bool sortable );
|
||||
virtual void SetSortOrder( bool ascending );
|
||||
virtual void SetAsSortKey(bool sort = true);
|
||||
|
||||
virtual void SetResizeable( bool resizeable );
|
||||
virtual void SetHidden( bool hidden );
|
||||
|
||||
virtual void SetMinWidth( int minWidth );
|
||||
virtual void SetWidth( int width );
|
||||
|
||||
virtual void SetReorderable( bool reorderable );
|
||||
|
||||
virtual void SetFlags(int flags) { SetIndividualFlags(flags); }
|
||||
|
||||
// getters:
|
||||
|
||||
virtual wxString GetTitle() const;
|
||||
virtual wxAlignment GetAlignment() const;
|
||||
|
||||
virtual bool IsSortable() const;
|
||||
virtual bool IsSortOrderAscending() const;
|
||||
virtual bool IsSortKey() const;
|
||||
|
||||
virtual bool IsResizeable() const;
|
||||
virtual bool IsHidden() const;
|
||||
|
||||
virtual int GetWidth() const;
|
||||
virtual int GetMinWidth() const;
|
||||
|
||||
virtual bool IsReorderable() const;
|
||||
|
||||
virtual int GetFlags() const { return GetFromIndividualFlags(); }
|
||||
|
||||
// implementation
|
||||
GtkWidget* GetGtkHandle() { return m_column; }
|
||||
GtkWidget* GetConstGtkHandle() const { return m_column; }
|
||||
|
||||
private:
|
||||
// holds the GTK handle
|
||||
GtkWidget *m_column;
|
||||
|
||||
// holds GTK handles for title/bitmap in the header
|
||||
GtkWidget *m_image;
|
||||
GtkWidget *m_label;
|
||||
|
||||
// delayed connection to mouse events
|
||||
friend class wxDataViewCtrl;
|
||||
void OnInternalIdle();
|
||||
bool m_isConnected;
|
||||
|
||||
void Init(wxAlignment align, int flags, int width);
|
||||
};
|
||||
|
||||
WX_DECLARE_LIST_WITH_DECL(wxDataViewColumn, wxDataViewColumnList,
|
||||
class WXDLLIMPEXP_ADV);
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewCtrl
|
||||
// ---------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewCtrl: public wxDataViewCtrlBase
|
||||
{
|
||||
public:
|
||||
wxDataViewCtrl()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
wxDataViewCtrl( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxDataViewCtrlNameStr )
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxDataViewCtrlNameStr);
|
||||
|
||||
virtual ~wxDataViewCtrl();
|
||||
|
||||
virtual bool AssociateModel( wxDataViewModel *model );
|
||||
|
||||
virtual bool PrependColumn( wxDataViewColumn *col );
|
||||
virtual bool AppendColumn( wxDataViewColumn *col );
|
||||
virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col );
|
||||
|
||||
virtual unsigned int GetColumnCount() const;
|
||||
virtual wxDataViewColumn* GetColumn( unsigned int pos ) const;
|
||||
virtual bool DeleteColumn( wxDataViewColumn *column );
|
||||
virtual bool ClearColumns();
|
||||
virtual int GetColumnPosition( const wxDataViewColumn *column ) const;
|
||||
|
||||
virtual wxDataViewColumn *GetSortingColumn() const;
|
||||
|
||||
virtual wxDataViewItem GetSelection() const;
|
||||
virtual int GetSelections( wxDataViewItemArray & sel ) const;
|
||||
virtual void SetSelections( const wxDataViewItemArray & sel );
|
||||
virtual void Select( const wxDataViewItem & item );
|
||||
virtual void Unselect( const wxDataViewItem & item );
|
||||
virtual bool IsSelected( const wxDataViewItem & item ) const;
|
||||
virtual void SelectAll();
|
||||
virtual void UnselectAll();
|
||||
|
||||
virtual void EnsureVisible( const wxDataViewItem& item,
|
||||
const wxDataViewColumn *column = NULL );
|
||||
virtual void HitTest( const wxPoint &point,
|
||||
wxDataViewItem &item,
|
||||
wxDataViewColumn *&column ) const;
|
||||
virtual wxRect GetItemRect( const wxDataViewItem &item,
|
||||
const wxDataViewColumn *column = NULL ) const;
|
||||
|
||||
virtual void Expand( const wxDataViewItem & item );
|
||||
virtual void Collapse( const wxDataViewItem & item );
|
||||
virtual bool IsExpanded( const wxDataViewItem & item ) const;
|
||||
|
||||
virtual bool EnableDragSource( const wxDataFormat &format );
|
||||
virtual bool EnableDropTarget( const wxDataFormat &format );
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
wxWindow *GetMainWindow() { return (wxWindow*) this; }
|
||||
|
||||
GtkWidget *GtkGetTreeView() { return m_treeview; }
|
||||
wxDataViewCtrlInternal* GtkGetInternal() { return m_internal; }
|
||||
|
||||
// Convert GTK path to our item. Returned item may be invalid if get_iter()
|
||||
// failed.
|
||||
wxDataViewItem GTKPathToItem(struct _GtkTreePath *path) const;
|
||||
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
protected:
|
||||
virtual void DoSetExpanderColumn();
|
||||
virtual void DoSetIndent();
|
||||
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
virtual wxDataViewItem DoGetCurrentItem() const;
|
||||
virtual void DoSetCurrentItem(const wxDataViewItem& item);
|
||||
|
||||
friend class wxDataViewCtrlDCImpl;
|
||||
friend class wxDataViewColumn;
|
||||
friend class wxDataViewCtrlInternal;
|
||||
|
||||
GtkWidget *m_treeview;
|
||||
wxDataViewCtrlInternal *m_internal;
|
||||
wxDataViewColumnList m_cols;
|
||||
wxDataViewItem m_ensureVisibleDefered;
|
||||
|
||||
virtual void AddChildGTK(wxWindowGTK* child);
|
||||
void GtkEnableSelectionEvents();
|
||||
void GtkDisableSelectionEvents();
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxDataViewCtrl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxDataViewCtrl);
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_GTKDATAVIEWCTRL_H_
|
53
Externals/wxWidgets3/include/wx/gtk/dc.h
vendored
Normal file
53
Externals/wxWidgets3/include/wx/gtk/dc.h
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/dc.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: dc.h 50547 2007-12-06 16:22:00Z PC $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTKDC_H_
|
||||
#define _WX_GTKDC_H_
|
||||
|
||||
#include "wx/dc.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxDC
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGTKDCImpl : public wxDCImpl
|
||||
{
|
||||
public:
|
||||
wxGTKDCImpl( wxDC *owner );
|
||||
virtual ~wxGTKDCImpl();
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
void SetColourMap( const wxPalette& palette ) { SetPalette(palette); };
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
// Resolution in pixels per logical inch
|
||||
virtual wxSize GetPPI() const;
|
||||
|
||||
virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return true; }
|
||||
virtual void EndDoc() { }
|
||||
virtual void StartPage() { }
|
||||
virtual void EndPage() { }
|
||||
|
||||
virtual GdkWindow* GetGDKWindow() const { return NULL; }
|
||||
|
||||
// base class pure virtuals implemented here
|
||||
virtual void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
virtual void DoGetSizeMM(int* width, int* height) const;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxGTKDCImpl)
|
||||
};
|
||||
|
||||
// this must be defined when wxDC::Blit() honours the DC origin and needed to
|
||||
// allow wxUniv code in univ/winuniv.cpp to work with versions of wxGTK
|
||||
// 2.3.[23]
|
||||
#ifndef wxHAS_WORKING_GTK_DC_BLIT
|
||||
#define wxHAS_WORKING_GTK_DC_BLIT
|
||||
#endif
|
||||
|
||||
#endif // _WX_GTKDC_H_
|
166
Externals/wxWidgets3/include/wx/gtk/dcclient.h
vendored
Normal file
166
Externals/wxWidgets3/include/wx/gtk/dcclient.h
vendored
Normal file
@ -0,0 +1,166 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/dcclient.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: dcclient.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTKDCCLIENT_H_
|
||||
#define _WX_GTKDCCLIENT_H_
|
||||
|
||||
#include "wx/gtk/dc.h"
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/region.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxWindowDCImpl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxGTKDCImpl
|
||||
{
|
||||
public:
|
||||
wxWindowDCImpl( wxDC *owner );
|
||||
wxWindowDCImpl( wxDC *owner, wxWindow *win );
|
||||
|
||||
virtual ~wxWindowDCImpl();
|
||||
|
||||
virtual bool CanDrawBitmap() const { return true; }
|
||||
virtual bool CanGetTextExtent() const { return true; }
|
||||
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
virtual bool DoFloodFill( wxCoord x, wxCoord y, const wxColour& col,
|
||||
wxFloodFillStyle style=wxFLOOD_SURFACE );
|
||||
virtual bool DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) const;
|
||||
|
||||
virtual void DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 );
|
||||
virtual void DoCrossHair( wxCoord x, wxCoord y );
|
||||
virtual void DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
|
||||
wxCoord xc, wxCoord yc );
|
||||
virtual void DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxCoord height,
|
||||
double sa, double ea );
|
||||
virtual void DoDrawPoint( wxCoord x, wxCoord y );
|
||||
|
||||
virtual void DoDrawLines(int n, wxPoint points[],
|
||||
wxCoord xoffset, wxCoord yoffset);
|
||||
virtual void DoDrawPolygon(int n, wxPoint points[],
|
||||
wxCoord xoffset, wxCoord yoffset,
|
||||
wxPolygonFillMode fillStyle = wxODDEVEN_RULE);
|
||||
|
||||
virtual void DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
|
||||
virtual void DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0 );
|
||||
virtual void DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
|
||||
|
||||
virtual void DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y );
|
||||
virtual void DoDrawBitmap( const wxBitmap &bitmap, wxCoord x, wxCoord y,
|
||||
bool useMask = false );
|
||||
|
||||
virtual bool DoBlit( wxCoord xdest, wxCoord ydest,
|
||||
wxCoord width, wxCoord height,
|
||||
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
||||
wxRasterOperationMode logical_func = wxCOPY,
|
||||
bool useMask = false,
|
||||
wxCoord xsrcMask = -1, wxCoord ysrcMask = -1 );
|
||||
|
||||
virtual void DoDrawText( const wxString &text, wxCoord x, wxCoord y );
|
||||
virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
|
||||
double angle);
|
||||
virtual void DoGetTextExtent( const wxString &string,
|
||||
wxCoord *width, wxCoord *height,
|
||||
wxCoord *descent = NULL,
|
||||
wxCoord *externalLeading = NULL,
|
||||
const wxFont *theFont = NULL) const;
|
||||
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
|
||||
virtual void DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
|
||||
virtual void DoSetDeviceClippingRegion( const wxRegion ®ion );
|
||||
|
||||
virtual wxCoord GetCharWidth() const;
|
||||
virtual wxCoord GetCharHeight() const;
|
||||
|
||||
virtual void Clear();
|
||||
|
||||
virtual void SetFont( const wxFont &font );
|
||||
virtual void SetPen( const wxPen &pen );
|
||||
virtual void SetBrush( const wxBrush &brush );
|
||||
virtual void SetBackground( const wxBrush &brush );
|
||||
virtual void SetLogicalFunction( wxRasterOperationMode function );
|
||||
virtual void SetTextForeground( const wxColour &col );
|
||||
virtual void SetTextBackground( const wxColour &col );
|
||||
virtual void SetBackgroundMode( int mode );
|
||||
virtual void SetPalette( const wxPalette& palette );
|
||||
|
||||
virtual void DestroyClippingRegion();
|
||||
|
||||
// Resolution in pixels per logical inch
|
||||
virtual wxSize GetPPI() const;
|
||||
virtual int GetDepth() const;
|
||||
|
||||
// overrriden here for RTL
|
||||
virtual void SetDeviceOrigin( wxCoord x, wxCoord y );
|
||||
virtual void SetAxisOrientation( bool xLeftRight, bool yBottomUp );
|
||||
|
||||
// protected:
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
GdkWindow *m_gdkwindow;
|
||||
GdkGC *m_penGC;
|
||||
GdkGC *m_brushGC;
|
||||
GdkGC *m_textGC;
|
||||
GdkGC *m_bgGC;
|
||||
GdkColormap *m_cmap;
|
||||
bool m_isScreenDC;
|
||||
wxRegion m_currentClippingRegion;
|
||||
wxRegion m_paintClippingRegion;
|
||||
|
||||
// PangoContext stuff for GTK 2.0
|
||||
PangoContext *m_context;
|
||||
PangoLayout *m_layout;
|
||||
PangoFontDescription *m_fontdesc;
|
||||
|
||||
void SetUpDC( bool ismem = false );
|
||||
void Destroy();
|
||||
|
||||
virtual void ComputeScaleAndOrigin();
|
||||
|
||||
virtual GdkWindow *GetGDKWindow() const { return m_gdkwindow; }
|
||||
|
||||
private:
|
||||
void DrawingSetup(GdkGC*& gc, bool& originChanged);
|
||||
GdkPixmap* MonoToColor(GdkPixmap* monoPixmap, int x, int y, int w, int h) const;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxWindowDCImpl)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxClientDCImpl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl
|
||||
{
|
||||
public:
|
||||
wxClientDCImpl( wxDC *owner );
|
||||
wxClientDCImpl( wxDC *owner, wxWindow *win );
|
||||
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxClientDCImpl)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxPaintDCImpl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl
|
||||
{
|
||||
public:
|
||||
wxPaintDCImpl( wxDC *owner );
|
||||
wxPaintDCImpl( wxDC *owner, wxWindow *win );
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxPaintDCImpl)
|
||||
};
|
||||
|
||||
#endif // _WX_GTKDCCLIENT_H_
|
59
Externals/wxWidgets3/include/wx/gtk/dcmemory.h
vendored
Normal file
59
Externals/wxWidgets3/include/wx/gtk/dcmemory.h
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/dcmemory.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// RCS-ID: $Id: dcmemory.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_DCMEMORY_H_
|
||||
#define _WX_GTK_DCMEMORY_H_
|
||||
|
||||
#include "wx/dcmemory.h"
|
||||
#include "wx/gtk/dcclient.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMemoryDCImpl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxWindowDCImpl
|
||||
{
|
||||
public:
|
||||
wxMemoryDCImpl( wxMemoryDC *owner );
|
||||
wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
|
||||
wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc );
|
||||
|
||||
virtual ~wxMemoryDCImpl();
|
||||
|
||||
// these get reimplemented for mono-bitmaps to behave
|
||||
// more like their Win32 couterparts. They now interpret
|
||||
// wxWHITE, wxWHITE_BRUSH and wxWHITE_PEN as drawing 0
|
||||
// and everything else as drawing 1.
|
||||
virtual void SetPen( const wxPen &pen );
|
||||
virtual void SetBrush( const wxBrush &brush );
|
||||
virtual void SetBackground( const wxBrush &brush );
|
||||
virtual void SetTextForeground( const wxColour &col );
|
||||
virtual void SetTextBackground( const wxColour &col );
|
||||
|
||||
// overridden from wxDCImpl
|
||||
virtual void DoGetSize( int *width, int *height ) const;
|
||||
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const;
|
||||
|
||||
// overridden for wxMemoryDC Impl
|
||||
virtual void DoSelect(const wxBitmap& bitmap);
|
||||
|
||||
virtual const wxBitmap& GetSelectedBitmap() const;
|
||||
virtual wxBitmap& GetSelectedBitmap();
|
||||
|
||||
private:
|
||||
wxBitmap m_selected;
|
||||
|
||||
void Init();
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxMemoryDCImpl)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_GTK_DCMEMORY_H_
|
||||
|
34
Externals/wxWidgets3/include/wx/gtk/dcscreen.h
vendored
Normal file
34
Externals/wxWidgets3/include/wx/gtk/dcscreen.h
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/dcscreen.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: dcscreen.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTKDCSCREEN_H_
|
||||
#define _WX_GTKDCSCREEN_H_
|
||||
|
||||
#include "wx/dcscreen.h"
|
||||
#include "wx/gtk/dcclient.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxScreenDCImpl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxScreenDCImpl : public wxWindowDCImpl
|
||||
{
|
||||
public:
|
||||
wxScreenDCImpl( wxScreenDC *owner );
|
||||
~wxScreenDCImpl();
|
||||
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxScreenDCImpl)
|
||||
};
|
||||
|
||||
#endif // _WX_GTKDCSCREEN_H_
|
56
Externals/wxWidgets3/include/wx/gtk/dialog.h
vendored
Normal file
56
Externals/wxWidgets3/include/wx/gtk/dialog.h
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/dialog.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created:
|
||||
// Id: $Id: dialog.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTKDIALOG_H_
|
||||
#define _WX_GTKDIALOG_H_
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxGUIEventLoop;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxDialog
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDialog: public wxDialogBase
|
||||
{
|
||||
public:
|
||||
wxDialog() { Init(); }
|
||||
wxDialog( wxWindow *parent, wxWindowID id,
|
||||
const wxString &title,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString &name = wxDialogNameStr );
|
||||
bool Create( wxWindow *parent, wxWindowID id,
|
||||
const wxString &title,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE,
|
||||
const wxString &name = wxDialogNameStr );
|
||||
virtual ~wxDialog();
|
||||
|
||||
virtual bool Show( bool show = true );
|
||||
virtual int ShowModal();
|
||||
virtual void EndModal( int retCode );
|
||||
virtual bool IsModal() const;
|
||||
void SetModal( bool modal );
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
bool m_modalShowing;
|
||||
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
wxGUIEventLoop *m_modalLoop;
|
||||
DECLARE_DYNAMIC_CLASS(wxDialog)
|
||||
};
|
||||
|
||||
#endif // _WX_GTKDIALOG_H_
|
54
Externals/wxWidgets3/include/wx/gtk/dirdlg.h
vendored
Normal file
54
Externals/wxWidgets3/include/wx/gtk/dirdlg.h
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/dirdlg.h
|
||||
// Purpose: wxDirDialog
|
||||
// Author: Francesco Montorsi
|
||||
// Id: $Id: dirdlg.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 2006 Francesco Montorsi
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKDIRDLGH__
|
||||
#define __GTKDIRDLGH__
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxDirDialog
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDirDialog : public wxDirDialogBase
|
||||
{
|
||||
public:
|
||||
wxDirDialog() { }
|
||||
|
||||
wxDirDialog(wxWindow *parent,
|
||||
const wxString& message = wxDirSelectorPromptStr,
|
||||
const wxString& defaultPath = wxEmptyString,
|
||||
long style = wxDD_DEFAULT_STYLE,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const wxString& name = wxDirDialogNameStr);
|
||||
|
||||
virtual ~wxDirDialog() { }
|
||||
|
||||
|
||||
public: // overrides from wxGenericDirDialog
|
||||
|
||||
wxString GetPath() const;
|
||||
void SetPath(const wxString& path);
|
||||
|
||||
|
||||
protected:
|
||||
// override this from wxTLW since the native
|
||||
// form doesn't have any m_wxwindow
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
|
||||
private:
|
||||
void OnFakeOk( wxCommandEvent &event );
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxDirDialog)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // __GTKDIRDLGH__
|
114
Externals/wxWidgets3/include/wx/gtk/dnd.h
vendored
Normal file
114
Externals/wxWidgets3/include/wx/gtk/dnd.h
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/dnd.h
|
||||
// Purpose: declaration of the wxDropTarget class
|
||||
// Author: Robert Roebling
|
||||
// RCS-ID: $Id: dnd.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Vadim Zeitlin, Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_DND_H_
|
||||
#define _WX_GTK_DND_H_
|
||||
|
||||
#include "wx/icon.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// this macro may be used instead for wxDropSource ctor arguments: it will use
|
||||
// the icon 'name' from an XPM file under GTK, but will expand to something
|
||||
// else under MSW. If you don't use it, you will have to use #ifdef in the
|
||||
// application code.
|
||||
#define wxDROP_ICON(name) wxICON(name)
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxDropTarget
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDropTarget: public wxDropTargetBase
|
||||
{
|
||||
public:
|
||||
wxDropTarget(wxDataObject *dataObject = NULL );
|
||||
|
||||
virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult def);
|
||||
virtual bool OnDrop(wxCoord x, wxCoord y);
|
||||
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
|
||||
virtual bool GetData();
|
||||
|
||||
// Can only be called during OnXXX methods.
|
||||
wxDataFormat GetMatchingPair();
|
||||
|
||||
// implementation
|
||||
|
||||
GdkAtom GTKGetMatchingPair(bool quiet = false);
|
||||
wxDragResult GTKFigureOutSuggestedAction();
|
||||
|
||||
void GtkRegisterWidget( GtkWidget *widget );
|
||||
void GtkUnregisterWidget( GtkWidget *widget );
|
||||
|
||||
GdkDragContext *m_dragContext;
|
||||
GtkWidget *m_dragWidget;
|
||||
GtkSelectionData *m_dragData;
|
||||
guint m_dragTime;
|
||||
bool m_firstMotion; // gdk has no "gdk_drag_enter" event
|
||||
|
||||
void GTKSetDragContext( GdkDragContext *dc ) { m_dragContext = dc; }
|
||||
void GTKSetDragWidget( GtkWidget *w ) { m_dragWidget = w; }
|
||||
void GTKSetDragData( GtkSelectionData *sd ) { m_dragData = sd; }
|
||||
void GTKSetDragTime( guint time ) { m_dragTime = time; }
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxDropSource
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDropSource: public wxDropSourceBase
|
||||
{
|
||||
public:
|
||||
// constructor. set data later with SetData()
|
||||
wxDropSource( wxWindow *win = NULL,
|
||||
const wxIcon © = wxNullIcon,
|
||||
const wxIcon &move = wxNullIcon,
|
||||
const wxIcon &none = wxNullIcon);
|
||||
|
||||
// constructor for setting one data object
|
||||
wxDropSource( wxDataObject& data,
|
||||
wxWindow *win,
|
||||
const wxIcon © = wxNullIcon,
|
||||
const wxIcon &move = wxNullIcon,
|
||||
const wxIcon &none = wxNullIcon);
|
||||
|
||||
virtual ~wxDropSource();
|
||||
|
||||
// start drag action
|
||||
virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly);
|
||||
|
||||
void PrepareIcon( int action, GdkDragContext *context );
|
||||
|
||||
GtkWidget *m_widget;
|
||||
GtkWidget *m_iconWindow;
|
||||
GdkDragContext *m_dragContext;
|
||||
wxWindow *m_window;
|
||||
|
||||
wxDragResult m_retValue;
|
||||
wxIcon m_iconCopy,
|
||||
m_iconMove,
|
||||
m_iconNone;
|
||||
|
||||
bool m_waiting;
|
||||
|
||||
private:
|
||||
// common part of both ctors
|
||||
void SetIcons(const wxIcon& copy,
|
||||
const wxIcon& move,
|
||||
const wxIcon& none);
|
||||
|
||||
// GTK implementation
|
||||
void GTKConnectDragSignals();
|
||||
void GTKDisconnectDragSignals();
|
||||
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_DND_H_
|
||||
|
102
Externals/wxWidgets3/include/wx/gtk/dvrenderer.h
vendored
Normal file
102
Externals/wxWidgets3/include/wx/gtk/dvrenderer.h
vendored
Normal file
@ -0,0 +1,102 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/dvrenderer.h
|
||||
// Purpose: wxDataViewRenderer for GTK wxDataViewCtrl implementation
|
||||
// Author: Robert Roebling, Vadim Zeitlin
|
||||
// Created: 2009-11-07 (extracted from wx/gtk/dataview.h)
|
||||
// RCS-ID: $Id: dvrenderer.h 66404 2010-12-19 19:43:46Z RR $
|
||||
// Copyright: (c) 2006 Robert Roebling
|
||||
// (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_DVRENDERER_H_
|
||||
#define _WX_GTK_DVRENDERER_H_
|
||||
|
||||
typedef struct _GtkCellRendererText GtkCellRendererText;
|
||||
typedef struct _GtkTreeViewColumn GtkTreeViewColumn;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxDataViewRenderer
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewRenderer: public wxDataViewRendererBase
|
||||
{
|
||||
public:
|
||||
wxDataViewRenderer( const wxString &varianttype,
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
||||
int align = wxDVR_DEFAULT_ALIGNMENT );
|
||||
|
||||
virtual void SetMode( wxDataViewCellMode mode );
|
||||
virtual wxDataViewCellMode GetMode() const;
|
||||
|
||||
virtual void SetAlignment( int align );
|
||||
virtual int GetAlignment() const;
|
||||
|
||||
virtual void EnableEllipsize(wxEllipsizeMode mode = wxELLIPSIZE_MIDDLE);
|
||||
virtual wxEllipsizeMode GetEllipsizeMode() const;
|
||||
|
||||
// GTK-specific implementation
|
||||
// ---------------------------
|
||||
|
||||
// pack the GTK cell renderers used by this renderer to the given column
|
||||
//
|
||||
// by default only a single m_renderer is used but some renderers use more
|
||||
// than one GTK cell renderer
|
||||
virtual void GtkPackIntoColumn(GtkTreeViewColumn *column);
|
||||
|
||||
// called when the cell value was edited by user with the new value
|
||||
//
|
||||
// it validates the new value and notifies the model about the change by
|
||||
// calling GtkOnCellChanged() if it was accepted
|
||||
virtual void GtkOnTextEdited(const gchar *itempath, const wxString& value);
|
||||
|
||||
GtkCellRenderer* GetGtkHandle() { return m_renderer; }
|
||||
void GtkInitHandlers();
|
||||
void GtkUpdateAlignment();
|
||||
|
||||
// should be overridden to return true if the renderer supports properties
|
||||
// corresponding to wxDataViewItemAttr field, see wxGtkTreeCellDataFunc()
|
||||
// for details
|
||||
virtual bool GtkSupportsAttrs() const { return false; }
|
||||
|
||||
// if GtkSupportsAttrs() returns true, this function will be called to
|
||||
// effectively set the attribute to use for rendering the next item
|
||||
//
|
||||
// it should return true if the attribute had any non-default properties
|
||||
virtual bool GtkSetAttr(const wxDataViewItemAttr& WXUNUSED(attr))
|
||||
{ return false; }
|
||||
|
||||
|
||||
// these functions are only called if GtkSupportsAttrs() returns true and
|
||||
// are used to remember whether the renderer currently uses the default
|
||||
// attributes or if we changed (and not reset them)
|
||||
bool GtkIsUsingDefaultAttrs() const { return m_usingDefaultAttrs; }
|
||||
void GtkSetUsingDefaultAttrs(bool def) { m_usingDefaultAttrs = def; }
|
||||
|
||||
// return the text renderer used by this renderer for setting text cell
|
||||
// specific attributes: can return NULL if this renderer doesn't render any
|
||||
// text
|
||||
virtual GtkCellRendererText *GtkGetTextRenderer() const { return NULL; }
|
||||
|
||||
wxDataViewCellMode GtkGetMode() { return m_mode; }
|
||||
|
||||
protected:
|
||||
virtual void GtkOnCellChanged(const wxVariant& value,
|
||||
const wxDataViewItem& item,
|
||||
unsigned col);
|
||||
|
||||
|
||||
GtkCellRenderer *m_renderer;
|
||||
int m_alignment;
|
||||
wxDataViewCellMode m_mode;
|
||||
|
||||
// true if we hadn't changed any visual attributes or restored them since
|
||||
// doing this
|
||||
bool m_usingDefaultAttrs;
|
||||
|
||||
protected:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRenderer)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_DVRENDERER_H_
|
||||
|
300
Externals/wxWidgets3/include/wx/gtk/dvrenderers.h
vendored
Normal file
300
Externals/wxWidgets3/include/wx/gtk/dvrenderers.h
vendored
Normal file
@ -0,0 +1,300 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/dvrenderers.h
|
||||
// Purpose: All GTK wxDataViewCtrl renderer classes
|
||||
// Author: Robert Roebling, Vadim Zeitlin
|
||||
// Created: 2009-11-07 (extracted from wx/gtk/dataview.h)
|
||||
// RCS-ID: $Id: dvrenderers.h 67120 2011-03-03 17:51:52Z PC $
|
||||
// Copyright: (c) 2006 Robert Roebling
|
||||
// (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_DVRENDERERS_H_
|
||||
#define _WX_GTK_DVRENDERERS_H_
|
||||
|
||||
typedef struct _GdkRectangle GdkRectangle;
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewTextRenderer
|
||||
// ---------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewTextRenderer: public wxDataViewRenderer
|
||||
{
|
||||
public:
|
||||
wxDataViewTextRenderer( const wxString &varianttype = "string",
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
||||
int align = wxDVR_DEFAULT_ALIGNMENT );
|
||||
|
||||
virtual bool SetValue( const wxVariant &value )
|
||||
{
|
||||
return SetTextValue(value);
|
||||
}
|
||||
|
||||
virtual bool GetValue( wxVariant &value ) const
|
||||
{
|
||||
wxString str;
|
||||
if ( !GetTextValue(str) )
|
||||
return false;
|
||||
|
||||
value = str;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void SetAlignment( int align );
|
||||
|
||||
virtual bool GtkSupportsAttrs() const { return true; }
|
||||
virtual bool GtkSetAttr(const wxDataViewItemAttr& attr);
|
||||
|
||||
virtual GtkCellRendererText *GtkGetTextRenderer() const;
|
||||
|
||||
protected:
|
||||
// implementation of Set/GetValue()
|
||||
bool SetTextValue(const wxString& str);
|
||||
bool GetTextValue(wxString& str) const;
|
||||
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextRenderer)
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewBitmapRenderer
|
||||
// ---------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewBitmapRenderer: public wxDataViewRenderer
|
||||
{
|
||||
public:
|
||||
wxDataViewBitmapRenderer( const wxString &varianttype = "wxBitmap",
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
||||
int align = wxDVR_DEFAULT_ALIGNMENT );
|
||||
|
||||
bool SetValue( const wxVariant &value );
|
||||
bool GetValue( wxVariant &value ) const;
|
||||
|
||||
protected:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewBitmapRenderer)
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewToggleRenderer
|
||||
// ---------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewToggleRenderer: public wxDataViewRenderer
|
||||
{
|
||||
public:
|
||||
wxDataViewToggleRenderer( const wxString &varianttype = "bool",
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
||||
int align = wxDVR_DEFAULT_ALIGNMENT );
|
||||
|
||||
bool SetValue( const wxVariant &value );
|
||||
bool GetValue( wxVariant &value ) const;
|
||||
|
||||
protected:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewToggleRenderer)
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewCustomRenderer
|
||||
// ---------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewCustomRenderer: public wxDataViewCustomRendererBase
|
||||
{
|
||||
public:
|
||||
wxDataViewCustomRenderer( const wxString &varianttype = "string",
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
||||
int align = wxDVR_DEFAULT_ALIGNMENT,
|
||||
bool no_init = false );
|
||||
virtual ~wxDataViewCustomRenderer();
|
||||
|
||||
|
||||
// Create DC on request
|
||||
virtual wxDC *GetDC();
|
||||
|
||||
// override the base class function to use GTK text cell renderer
|
||||
virtual void RenderText(const wxString& text,
|
||||
int xoffset,
|
||||
wxRect cell,
|
||||
wxDC *dc,
|
||||
int state);
|
||||
|
||||
// store GTK render call parameters for possible later use
|
||||
void GTKStashRenderParams(GdkWindow *window,
|
||||
GtkWidget *widget,
|
||||
GdkRectangle *background_area,
|
||||
GdkRectangle *expose_area,
|
||||
int flags)
|
||||
{
|
||||
m_renderParams.window = window;
|
||||
m_renderParams.widget = widget;
|
||||
m_renderParams.background_area = background_area;
|
||||
m_renderParams.expose_area = expose_area;
|
||||
m_renderParams.flags = flags;
|
||||
}
|
||||
|
||||
// we may or not support attributes, as we don't know it, return true to
|
||||
// make it possible to use them
|
||||
virtual bool GtkSupportsAttrs() const { return true; }
|
||||
|
||||
virtual bool GtkSetAttr(const wxDataViewItemAttr& attr)
|
||||
{
|
||||
SetAttr(attr);
|
||||
return !attr.IsDefault();
|
||||
}
|
||||
|
||||
virtual GtkCellRendererText *GtkGetTextRenderer() const;
|
||||
|
||||
protected:
|
||||
bool Init(wxDataViewCellMode mode, int align);
|
||||
|
||||
private:
|
||||
wxDC *m_dc;
|
||||
|
||||
GtkCellRendererText *m_text_renderer;
|
||||
|
||||
// parameters of the original render() call stored so that we could pass
|
||||
// them forward to m_text_renderer if our RenderText() is called
|
||||
struct GTKRenderParams
|
||||
{
|
||||
GdkWindow *window;
|
||||
GtkWidget *widget;
|
||||
GdkRectangle *background_area;
|
||||
GdkRectangle *expose_area;
|
||||
int flags;
|
||||
} m_renderParams;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCustomRenderer)
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewProgressRenderer
|
||||
// ---------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewProgressRenderer: public wxDataViewCustomRenderer
|
||||
{
|
||||
public:
|
||||
wxDataViewProgressRenderer( const wxString &label = wxEmptyString,
|
||||
const wxString &varianttype = "long",
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
||||
int align = wxDVR_DEFAULT_ALIGNMENT );
|
||||
virtual ~wxDataViewProgressRenderer();
|
||||
|
||||
bool SetValue( const wxVariant &value );
|
||||
bool GetValue( wxVariant &value ) const;
|
||||
|
||||
virtual bool Render( wxRect cell, wxDC *dc, int state );
|
||||
virtual wxSize GetSize() const;
|
||||
|
||||
private:
|
||||
wxString m_label;
|
||||
int m_value;
|
||||
|
||||
protected:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressRenderer)
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewIconTextRenderer
|
||||
// ---------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewIconTextRenderer: public wxDataViewTextRenderer
|
||||
{
|
||||
public:
|
||||
wxDataViewIconTextRenderer( const wxString &varianttype = "wxDataViewIconText",
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
|
||||
int align = wxDVR_DEFAULT_ALIGNMENT );
|
||||
virtual ~wxDataViewIconTextRenderer();
|
||||
|
||||
bool SetValue( const wxVariant &value );
|
||||
bool GetValue( wxVariant &value ) const;
|
||||
|
||||
virtual void GtkPackIntoColumn(GtkTreeViewColumn *column);
|
||||
|
||||
protected:
|
||||
virtual void GtkOnCellChanged(const wxVariant& value,
|
||||
const wxDataViewItem& item,
|
||||
unsigned col);
|
||||
|
||||
private:
|
||||
wxDataViewIconText m_value;
|
||||
|
||||
// we use the base class m_renderer for the text and this one for the icon
|
||||
GtkCellRenderer *m_rendererIcon;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewIconTextRenderer)
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// wxDataViewDateRenderer
|
||||
// ---------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewDateRenderer: public wxDataViewCustomRenderer
|
||||
{
|
||||
public:
|
||||
wxDataViewDateRenderer( const wxString &varianttype = "datetime",
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE,
|
||||
int align = wxDVR_DEFAULT_ALIGNMENT );
|
||||
|
||||
bool SetValue( const wxVariant &value );
|
||||
bool GetValue( wxVariant &value ) const;
|
||||
|
||||
virtual bool Render( wxRect cell, wxDC *dc, int state );
|
||||
virtual wxSize GetSize() const;
|
||||
virtual bool Activate( const wxRect& cell,
|
||||
wxDataViewModel *model,
|
||||
const wxDataViewItem &item,
|
||||
unsigned int col );
|
||||
|
||||
private:
|
||||
wxDateTime m_date;
|
||||
|
||||
protected:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewDateRenderer)
|
||||
};
|
||||
|
||||
// -------------------------------------
|
||||
// wxDataViewChoiceRenderer
|
||||
// -------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewChoiceRenderer: public wxDataViewCustomRenderer
|
||||
{
|
||||
public:
|
||||
wxDataViewChoiceRenderer(const wxArrayString &choices,
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
|
||||
int alignment = wxDVR_DEFAULT_ALIGNMENT );
|
||||
virtual bool Render( wxRect rect, wxDC *dc, int state );
|
||||
virtual wxSize GetSize() const;
|
||||
virtual bool SetValue( const wxVariant &value );
|
||||
virtual bool GetValue( wxVariant &value ) const;
|
||||
|
||||
void SetAlignment( int align );
|
||||
|
||||
wxString GetChoice(size_t index) const { return m_choices[index]; }
|
||||
const wxArrayString& GetChoices() const { return m_choices; }
|
||||
|
||||
private:
|
||||
wxArrayString m_choices;
|
||||
wxString m_data;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxDataViewChoiceByIndexRenderer
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxDataViewChoiceByIndexRenderer: public wxDataViewChoiceRenderer
|
||||
{
|
||||
public:
|
||||
wxDataViewChoiceByIndexRenderer( const wxArrayString &choices,
|
||||
wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE,
|
||||
int alignment = wxDVR_DEFAULT_ALIGNMENT );
|
||||
|
||||
virtual bool SetValue( const wxVariant &value );
|
||||
virtual bool GetValue( wxVariant &value ) const;
|
||||
|
||||
private:
|
||||
virtual void GtkOnTextEdited(const gchar *itempath, const wxString& str);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // _WX_GTK_DVRENDERERS_H_
|
||||
|
51
Externals/wxWidgets3/include/wx/gtk/evtloop.h
vendored
Normal file
51
Externals/wxWidgets3/include/wx/gtk/evtloop.h
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/evtloop.h
|
||||
// Purpose: wxGTK event loop implementation
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2008-12-27
|
||||
// RCS-ID: $Id: evtloop.h 62475 2009-10-22 11:36:35Z VZ $
|
||||
// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_EVTLOOP_H_
|
||||
#define _WX_GTK_EVTLOOP_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGUIEventLoop for wxGTK
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
typedef union _GdkEvent GdkEvent;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxEventLoopBase
|
||||
{
|
||||
public:
|
||||
wxGUIEventLoop();
|
||||
|
||||
virtual int Run();
|
||||
virtual void Exit(int rc = 0);
|
||||
virtual bool Pending() const;
|
||||
virtual bool Dispatch();
|
||||
virtual int DispatchTimeout(unsigned long timeout);
|
||||
virtual void WakeUp();
|
||||
virtual bool YieldFor(long eventsToProcess);
|
||||
|
||||
#if wxUSE_EVENTLOOP_SOURCE
|
||||
virtual wxEventLoopSource *
|
||||
AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags);
|
||||
#endif // wxUSE_EVENTLOOP_SOURCE
|
||||
|
||||
void StoreGdkEventForLaterProcessing(GdkEvent* ev)
|
||||
{ m_arrGdkEvents.Add(ev); }
|
||||
|
||||
private:
|
||||
// the exit code of this event loop
|
||||
int m_exitcode;
|
||||
|
||||
// used to temporarily store events in DoYield()
|
||||
wxArrayPtrVoid m_arrGdkEvents;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxGUIEventLoop);
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_EVTLOOP_H_
|
40
Externals/wxWidgets3/include/wx/gtk/evtloopsrc.h
vendored
Normal file
40
Externals/wxWidgets3/include/wx/gtk/evtloopsrc.h
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/evtloopsrc.h
|
||||
// Purpose: wxGTKEventLoopSource class
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2009-10-21
|
||||
// RCS-ID: $Id: evtloopsrc.h 64140 2010-04-25 21:33:16Z FM $
|
||||
// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_EVTLOOPSRC_H_
|
||||
#define _WX_GTK_EVTLOOPSRC_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGTKEventLoopSource: wxEventLoopSource for GTK port
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxGTKEventLoopSource : public wxEventLoopSource
|
||||
{
|
||||
public:
|
||||
// sourceId is the id of the watch in GTK context, not the FD of the file
|
||||
// this source corresponds to
|
||||
wxGTKEventLoopSource(unsigned sourceId,
|
||||
wxEventLoopSourceHandler *handler,
|
||||
int flags)
|
||||
: wxEventLoopSource(handler, flags),
|
||||
m_sourceId(sourceId)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~wxGTKEventLoopSource();
|
||||
|
||||
private:
|
||||
const unsigned m_sourceId;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxGTKEventLoopSource);
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_EVTLOOPSRC_H_
|
||||
|
143
Externals/wxWidgets3/include/wx/gtk/filectrl.h
vendored
Normal file
143
Externals/wxWidgets3/include/wx/gtk/filectrl.h
vendored
Normal file
@ -0,0 +1,143 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/filectrl.h
|
||||
// Purpose: wxGtkFileCtrl Header
|
||||
// Author: Diaa M. Sami
|
||||
// Modified by:
|
||||
// Created: Aug-10-2007
|
||||
// RCS-ID: $Id: filectrl.h 64429 2010-05-29 10:35:47Z VZ $
|
||||
// Copyright: (c) Diaa M. Sami
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef _WX_GTK_FILECTRL_H_
|
||||
#define _WX_GTK_FILECTRL_H_
|
||||
|
||||
#include "wx/control.h"
|
||||
#include "wx/filectrl.h"
|
||||
|
||||
extern WXDLLIMPEXP_DATA_CORE(const char) wxFileSelectorDefaultWildcardStr[];
|
||||
|
||||
typedef struct _GtkFileChooser GtkFileChooser;
|
||||
|
||||
// [GTK] current problems:
|
||||
// All methods(e.g. SetFilename(), SetPath(), etc) which change the state of
|
||||
// the control result in events fired, such events should be suppressed.
|
||||
// ------
|
||||
// Sometimes a selection event(with 0 files) is fired before
|
||||
// wxEVT_FILECTRL_FOLDERCHANGED, unfortunately this can hardly be detected!
|
||||
|
||||
// A wx wrapper for any Gtk object implementing the interface GtkFileChooser
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGtkFileChooser
|
||||
{
|
||||
public:
|
||||
wxGtkFileChooser() { m_ignoreNextFilterEvent = false; }
|
||||
|
||||
void SetWidget(GtkFileChooser *w);
|
||||
|
||||
wxString GetPath() const;
|
||||
void GetPaths( wxArrayString& paths ) const;
|
||||
wxString GetDirectory() const;
|
||||
wxString GetFilename() const;
|
||||
void GetFilenames( wxArrayString& files ) const;
|
||||
int GetFilterIndex() const;
|
||||
|
||||
bool SetPath( const wxString& path );
|
||||
bool SetDirectory( const wxString& dir );
|
||||
void SetWildcard( const wxString& wildCard );
|
||||
void SetFilterIndex( int filterIndex );
|
||||
|
||||
bool HasFilterChoice() const;
|
||||
|
||||
bool ShouldIgnoreNextFilterEvent() const { return m_ignoreNextFilterEvent; }
|
||||
|
||||
wxString GetCurrentWildCard() const
|
||||
{ return m_wildcards[GetFilterIndex()]; }
|
||||
|
||||
private:
|
||||
GtkFileChooser *m_widget;
|
||||
// First wildcard in filter, to be used when the user
|
||||
// saves a file without giving an extension.
|
||||
wxArrayString m_wildcards;
|
||||
|
||||
// If true, ignore the next event because it was generated by us and not
|
||||
// the user.
|
||||
bool m_ignoreNextFilterEvent;
|
||||
};
|
||||
|
||||
#if wxUSE_FILECTRL
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGtkFileCtrl: public wxControl,
|
||||
public wxFileCtrlBase
|
||||
{
|
||||
public:
|
||||
wxGtkFileCtrl () { Init(); }
|
||||
|
||||
wxGtkFileCtrl ( wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& defaultDirectory = wxEmptyString,
|
||||
const wxString& defaultFilename = wxEmptyString,
|
||||
const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
|
||||
long style = wxFC_DEFAULT_STYLE,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const wxString& name = wxFileCtrlNameStr )
|
||||
{
|
||||
Init();
|
||||
Create( parent, id, defaultDirectory, defaultFilename, wildCard, style, pos, size, name );
|
||||
}
|
||||
|
||||
virtual ~wxGtkFileCtrl() {};
|
||||
|
||||
void Init();
|
||||
bool Create( wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& defaultDirectory = wxEmptyString,
|
||||
const wxString& defaultFileName = wxEmptyString,
|
||||
const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
|
||||
long style = wxFC_DEFAULT_STYLE,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const wxString& name = wxFileCtrlNameStr );
|
||||
|
||||
virtual void SetWildcard( const wxString& wildCard );
|
||||
virtual void SetFilterIndex( int filterIndex );
|
||||
virtual bool SetDirectory( const wxString& dir );
|
||||
virtual bool SetFilename( const wxString& name );
|
||||
virtual bool SetPath( const wxString& path );
|
||||
|
||||
virtual wxString GetFilename() const;
|
||||
virtual wxString GetDirectory() const;
|
||||
virtual wxString GetWildcard() const { return this->m_wildCard; }
|
||||
virtual wxString GetPath() const;
|
||||
virtual void GetPaths( wxArrayString& paths ) const;
|
||||
virtual void GetFilenames( wxArrayString& files ) const;
|
||||
virtual int GetFilterIndex() const { return m_fc.GetFilterIndex(); }
|
||||
|
||||
virtual bool HasMultipleFileSelection() const { return HasFlag( wxFC_MULTIPLE ); }
|
||||
virtual void ShowHidden(bool show);
|
||||
|
||||
virtual bool HasFilterChoice() const
|
||||
{ return m_fc.HasFilterChoice(); }
|
||||
|
||||
|
||||
// Implementation only from now on.
|
||||
bool GTKShouldIgnoreNextFilterEvent() const
|
||||
{ return m_fc.ShouldIgnoreNextFilterEvent(); }
|
||||
|
||||
bool m_checkNextSelEvent;
|
||||
bool m_ignoreNextFolderChangeEvent;
|
||||
|
||||
protected:
|
||||
GtkFileChooser *m_fcWidget;
|
||||
wxGtkFileChooser m_fc;
|
||||
wxString m_wildCard;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS( wxGtkFileCtrl )
|
||||
};
|
||||
|
||||
#endif // wxUSE_FILECTRL
|
||||
|
||||
#endif // _WX_GTK_FILECTRL_H_
|
||||
|
73
Externals/wxWidgets3/include/wx/gtk/filedlg.h
vendored
Normal file
73
Externals/wxWidgets3/include/wx/gtk/filedlg.h
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/filedlg.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: filedlg.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTKFILEDLG_H_
|
||||
#define _WX_GTKFILEDLG_H_
|
||||
|
||||
#include "wx/gtk/filectrl.h" // for wxGtkFileChooser
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxFileDialog
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase
|
||||
{
|
||||
public:
|
||||
wxFileDialog() { }
|
||||
|
||||
wxFileDialog(wxWindow *parent,
|
||||
const wxString& message = wxFileSelectorPromptStr,
|
||||
const wxString& defaultDir = wxEmptyString,
|
||||
const wxString& defaultFile = wxEmptyString,
|
||||
const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
|
||||
long style = wxFD_DEFAULT_STYLE,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
const wxString& name = wxFileDialogNameStr);
|
||||
virtual ~wxFileDialog();
|
||||
|
||||
virtual wxString GetPath() const;
|
||||
virtual void GetPaths(wxArrayString& paths) const;
|
||||
virtual wxString GetDirectory() const;
|
||||
virtual wxString GetFilename() const;
|
||||
virtual void GetFilenames(wxArrayString& files) const;
|
||||
virtual int GetFilterIndex() const;
|
||||
|
||||
virtual void SetMessage(const wxString& message);
|
||||
virtual void SetPath(const wxString& path);
|
||||
virtual void SetDirectory(const wxString& dir);
|
||||
virtual void SetFilename(const wxString& name);
|
||||
virtual void SetWildcard(const wxString& wildCard);
|
||||
virtual void SetFilterIndex(int filterIndex);
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
virtual bool SupportsExtraControl() const { return true; }
|
||||
|
||||
|
||||
protected:
|
||||
// override this from wxTLW since the native
|
||||
// form doesn't have any m_wxwindow
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
|
||||
private:
|
||||
void OnFakeOk( wxCommandEvent &event );
|
||||
void OnSize(wxSizeEvent&);
|
||||
virtual void AddChildGTK(wxWindowGTK* child);
|
||||
|
||||
wxGtkFileChooser m_fc;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxFileDialog)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // _WX_GTKFILEDLG_H_
|
25
Externals/wxWidgets3/include/wx/gtk/filehistory.h
vendored
Normal file
25
Externals/wxWidgets3/include/wx/gtk/filehistory.h
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/filehistory.h
|
||||
// Purpose: GTK+ bits for wxFileHistory
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2010-05-06
|
||||
// RCS-ID: $Id: filehistory.h 64240 2010-05-07 06:45:48Z VS $
|
||||
// Copyright: (c) 2010 Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_FILEHISTORY_H_
|
||||
#define _WX_GTK_FILEHISTORY_H_
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFileHistory : public wxFileHistoryBase
|
||||
{
|
||||
public:
|
||||
wxFileHistory(size_t maxFiles = 9, wxWindowID idBase = wxID_FILE1)
|
||||
: wxFileHistoryBase(maxFiles, idBase) {}
|
||||
|
||||
virtual void AddFileToHistory(const wxString& file);
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxFileHistory)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_FILEHISTORY_H_
|
201
Externals/wxWidgets3/include/wx/gtk/filepicker.h
vendored
Normal file
201
Externals/wxWidgets3/include/wx/gtk/filepicker.h
vendored
Normal file
@ -0,0 +1,201 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/filedirpicker.h
|
||||
// Purpose: wxFileButton, wxDirButton header
|
||||
// Author: Francesco Montorsi
|
||||
// Modified by:
|
||||
// Created: 14/4/2006
|
||||
// Copyright: (c) Francesco Montorsi
|
||||
// RCS-ID: $Id: filepicker.h 63690 2010-03-16 00:23:57Z VZ $
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_FILEPICKER_H_
|
||||
#define _WX_GTK_FILEPICKER_H_
|
||||
|
||||
// since GtkColorButton is available only for GTK+ >= 2.4,
|
||||
// we need to use generic versions if we detect (at runtime)
|
||||
// that GTK+ < 2.4
|
||||
#include "wx/generic/filepickerg.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxFileButton and wxDirButton shared code
|
||||
// (cannot be a base class since they need to derive from wxGenericFileButton
|
||||
// and from wxGenericDirButton classes !)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define FILEDIRBTN_OVERRIDES \
|
||||
/* NULL is because of a problem with destruction order which happens */ \
|
||||
/* if we pass GetParent(): in fact, this GTK native implementation */ \
|
||||
/* needs to create the dialog in ::Create() and not for each user */ \
|
||||
/* request in response to the user click as the generic implementation */ \
|
||||
/* does. */ \
|
||||
virtual wxWindow *GetDialogParent() \
|
||||
{ \
|
||||
return NULL; \
|
||||
} \
|
||||
\
|
||||
virtual bool Destroy() \
|
||||
{ \
|
||||
if (m_dialog) \
|
||||
m_dialog->Destroy(); \
|
||||
return wxButton::Destroy(); \
|
||||
} \
|
||||
\
|
||||
/* even if wx derive from wxGenericFileButton, i.e. from wxButton, our */ \
|
||||
/* native GTK+ widget does not derive from GtkButton thus *all* uses */ \
|
||||
/* GTK_BUTTON(m_widget) macro done by wxButton must be bypassed to */ \
|
||||
/* avoid bunch of GTK+ warnings like: */ \
|
||||
/* invalid cast from `GtkFileChooserButton' to `GtkButton' */ \
|
||||
/* so, override wxButton::GTKGetWindow and return NULL as GTK+ doesn't */ \
|
||||
/* give us access to the internal GdkWindow of a GtkFileChooserButton */ \
|
||||
protected: \
|
||||
virtual GdkWindow * \
|
||||
GTKGetWindow(wxArrayGdkWindows& WXUNUSED(windows)) const \
|
||||
{ return NULL; }
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxFileButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFileButton : public wxGenericFileButton
|
||||
{
|
||||
public:
|
||||
wxFileButton() { Init(); }
|
||||
wxFileButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& label = wxFilePickerWidgetLabel,
|
||||
const wxString &path = wxEmptyString,
|
||||
const wxString &message = wxFileSelectorPromptStr,
|
||||
const wxString &wildcard = wxFileSelectorDefaultWildcardStr,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxFILEBTN_DEFAULT_STYLE,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxFilePickerWidgetNameStr)
|
||||
{
|
||||
Init();
|
||||
m_pickerStyle = style;
|
||||
Create(parent, id, label, path, message, wildcard,
|
||||
pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
virtual ~wxFileButton();
|
||||
|
||||
|
||||
public: // overrides
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& label = wxFilePickerWidgetLabel,
|
||||
const wxString &path = wxEmptyString,
|
||||
const wxString &message = wxFileSelectorPromptStr,
|
||||
const wxString &wildcard = wxFileSelectorDefaultWildcardStr,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxFilePickerWidgetNameStr);
|
||||
|
||||
// event handler for the click
|
||||
void OnDialogOK(wxCommandEvent &);
|
||||
|
||||
virtual void SetPath(const wxString &str);
|
||||
|
||||
// see macro defined above
|
||||
FILEDIRBTN_OVERRIDES
|
||||
|
||||
protected:
|
||||
virtual bool GTKShouldConnectSizeRequest() const { return false; }
|
||||
|
||||
wxDialog *m_dialog;
|
||||
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init() { m_dialog = NULL; }
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxFileButton)
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxDirButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDirButton : public wxGenericDirButton
|
||||
{
|
||||
public:
|
||||
wxDirButton() { Init(); }
|
||||
wxDirButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& label = wxFilePickerWidgetLabel,
|
||||
const wxString &path = wxEmptyString,
|
||||
const wxString &message = wxFileSelectorPromptStr,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDIRBTN_DEFAULT_STYLE,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxFilePickerWidgetNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
m_pickerStyle = style;
|
||||
|
||||
Create(parent, id, label, path, message, wxEmptyString,
|
||||
pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
virtual ~wxDirButton();
|
||||
|
||||
|
||||
public: // overrides
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& label = wxFilePickerWidgetLabel,
|
||||
const wxString &path = wxEmptyString,
|
||||
const wxString &message = wxFileSelectorPromptStr,
|
||||
const wxString &wildcard = wxFileSelectorDefaultWildcardStr,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxFilePickerWidgetNameStr);
|
||||
|
||||
|
||||
// GtkFileChooserButton does not support GTK_FILE_CHOOSER_CREATE_FOLDER
|
||||
// thus we must ensure that the wxDD_DIR_MUST_EXIST style was given
|
||||
long GetDialogStyle() const
|
||||
{
|
||||
return (wxGenericDirButton::GetDialogStyle() | wxDD_DIR_MUST_EXIST);
|
||||
}
|
||||
|
||||
virtual void SetPath(const wxString &str);
|
||||
|
||||
// see macro defined above
|
||||
FILEDIRBTN_OVERRIDES
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init()
|
||||
{
|
||||
m_dialog = NULL;
|
||||
m_bIgnoreNextChange = false;
|
||||
}
|
||||
|
||||
wxDialog *m_dialog;
|
||||
|
||||
public: // used by the GTK callback only
|
||||
|
||||
bool m_bIgnoreNextChange;
|
||||
|
||||
void GTKUpdatePath(const char *gtkpath);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxDirButton)
|
||||
};
|
||||
|
||||
#undef FILEDIRBTN_OVERRIDES
|
||||
|
||||
#endif // _WX_GTK_FILEPICKER_H_
|
||||
|
119
Externals/wxWidgets3/include/wx/gtk/font.h
vendored
Normal file
119
Externals/wxWidgets3/include/wx/gtk/font.h
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/font.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: font.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_FONT_H_
|
||||
#define _WX_GTK_FONT_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxFont
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFont : public wxFontBase
|
||||
{
|
||||
public:
|
||||
wxFont() { }
|
||||
|
||||
// wxGTK-specific
|
||||
wxFont(const wxString& nativeFontInfoString)
|
||||
{
|
||||
Create(nativeFontInfoString);
|
||||
}
|
||||
|
||||
wxFont(const wxNativeFontInfo& info);
|
||||
|
||||
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
||||
wxFont(int size,
|
||||
int family,
|
||||
int style,
|
||||
int weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||
{
|
||||
(void)Create(size, (wxFontFamily)family, (wxFontStyle)style, (wxFontWeight)weight, underlined, face, encoding);
|
||||
}
|
||||
#endif
|
||||
|
||||
wxFont(int size,
|
||||
wxFontFamily family,
|
||||
wxFontStyle style,
|
||||
wxFontWeight weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||
{
|
||||
Create(size, family, style, weight, underlined, face, encoding);
|
||||
}
|
||||
|
||||
wxFont(const wxSize& pixelSize,
|
||||
wxFontFamily family,
|
||||
wxFontStyle style,
|
||||
wxFontWeight weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||
{
|
||||
Create(10, family, style, weight, underlined, face, encoding);
|
||||
SetPixelSize(pixelSize);
|
||||
}
|
||||
|
||||
bool Create(int size,
|
||||
wxFontFamily family,
|
||||
wxFontStyle style,
|
||||
wxFontWeight weight,
|
||||
bool underlined = false,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
||||
|
||||
// wxGTK-specific
|
||||
bool Create(const wxString& fontname);
|
||||
|
||||
virtual ~wxFont();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual int GetPointSize() const;
|
||||
virtual wxFontStyle GetStyle() const;
|
||||
virtual wxFontWeight GetWeight() const;
|
||||
virtual wxString GetFaceName() const;
|
||||
virtual bool GetUnderlined() const;
|
||||
virtual wxFontEncoding GetEncoding() const;
|
||||
virtual const wxNativeFontInfo *GetNativeFontInfo() const;
|
||||
virtual bool IsFixedWidth() const;
|
||||
|
||||
virtual void SetPointSize( int pointSize );
|
||||
virtual void SetFamily(wxFontFamily family);
|
||||
virtual void SetStyle(wxFontStyle style);
|
||||
virtual void SetWeight(wxFontWeight weight);
|
||||
virtual bool SetFaceName( const wxString& faceName );
|
||||
virtual void SetUnderlined( bool underlined );
|
||||
virtual void SetEncoding(wxFontEncoding encoding);
|
||||
|
||||
wxDECLARE_COMMON_FONT_METHODS();
|
||||
|
||||
// implementation from now on
|
||||
void Unshare();
|
||||
|
||||
// no data :-)
|
||||
|
||||
protected:
|
||||
virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info );
|
||||
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
virtual wxGDIRefData* CreateGDIRefData() const;
|
||||
virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const;
|
||||
|
||||
virtual wxFontFamily DoGetFamily() const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxFont)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_FONT_H_
|
51
Externals/wxWidgets3/include/wx/gtk/fontdlg.h
vendored
Normal file
51
Externals/wxWidgets3/include/wx/gtk/fontdlg.h
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/fontdlg.h
|
||||
// Purpose: wxFontDialog
|
||||
// Author: Robert Roebling
|
||||
// Created:
|
||||
// RCS-ID: $Id: fontdlg.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTK_FONTDLGH__
|
||||
#define __GTK_FONTDLGH__
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxFontDialog
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFontDialog : public wxFontDialogBase
|
||||
{
|
||||
public:
|
||||
wxFontDialog() : wxFontDialogBase() { /* must be Create()d later */ }
|
||||
wxFontDialog(wxWindow *parent)
|
||||
: wxFontDialogBase(parent) { Create(parent); }
|
||||
wxFontDialog(wxWindow *parent, const wxFontData& data)
|
||||
: wxFontDialogBase(parent, data) { Create(parent, data); }
|
||||
|
||||
virtual ~wxFontDialog();
|
||||
|
||||
// implementation only
|
||||
void SetChosenFont(const char *name);
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
// deprecated interface, don't use
|
||||
wxDEPRECATED( wxFontDialog(wxWindow *parent, const wxFontData *data) );
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
protected:
|
||||
// create the GTK dialog
|
||||
virtual bool DoCreate(wxWindow *parent);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxFontDialog)
|
||||
};
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_6
|
||||
// deprecated interface, don't use
|
||||
inline wxFontDialog::wxFontDialog(wxWindow *parent, const wxFontData *data)
|
||||
: wxFontDialogBase(parent) { InitFontData(data); Create(parent); }
|
||||
#endif // WXWIN_COMPATIBILITY_2_6
|
||||
|
||||
#endif
|
63
Externals/wxWidgets3/include/wx/gtk/fontpicker.h
vendored
Normal file
63
Externals/wxWidgets3/include/wx/gtk/fontpicker.h
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/fontpicker.h
|
||||
// Purpose: wxFontButton header
|
||||
// Author: Francesco Montorsi
|
||||
// Modified by:
|
||||
// Created: 14/4/2006
|
||||
// Copyright: (c) Francesco Montorsi
|
||||
// RCS-ID: $Id: fontpicker.h 49668 2007-11-06 00:32:34Z MR $
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_FONTPICKER_H_
|
||||
#define _WX_GTK_FONTPICKER_H_
|
||||
|
||||
#include "wx/button.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxFontButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFontButton : public wxButton,
|
||||
public wxFontPickerWidgetBase
|
||||
{
|
||||
public:
|
||||
wxFontButton() {}
|
||||
wxFontButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxFont& initial = wxNullFont,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxFONTBTN_DEFAULT_STYLE,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxFontPickerWidgetNameStr)
|
||||
{
|
||||
Create(parent, id, initial, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxFont& initial = wxNullFont,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxFONTBTN_DEFAULT_STYLE,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxFontPickerWidgetNameStr);
|
||||
|
||||
virtual ~wxFontButton();
|
||||
|
||||
protected:
|
||||
void UpdateFont();
|
||||
|
||||
|
||||
public: // used by the GTK callback only
|
||||
|
||||
void SetNativeFontInfo(const gchar *gtkdescription)
|
||||
{ m_selectedFont.SetNativeFontInfo(wxString::FromAscii(gtkdescription)); }
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxFontButton)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_FONTPICKER_H_
|
||||
|
84
Externals/wxWidgets3/include/wx/gtk/frame.h
vendored
Normal file
84
Externals/wxWidgets3/include/wx/gtk/frame.h
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/frame.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: frame.h 66648 2011-01-08 06:42:41Z PC $
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_FRAME_H_
|
||||
#define _WX_GTK_FRAME_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFrame : public wxFrameBase
|
||||
{
|
||||
public:
|
||||
// construction
|
||||
wxFrame() { Init(); }
|
||||
wxFrame(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual ~wxFrame();
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
void SetStatusBar(wxStatusBar *statbar);
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
void SetToolBar(wxToolBar *toolbar);
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
||||
wxPoint GetClientAreaOrigin() const { return wxPoint(0, 0); }
|
||||
|
||||
#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2
|
||||
// in Hildon environment all frames are always shown maximized
|
||||
virtual bool IsMaximized() const { return true; }
|
||||
#endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
virtual bool SendIdleEvents(wxIdleEvent& event);
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// override wxWindow methods to take into account tool/menu/statusbars
|
||||
virtual void DoGetClientSize( int *width, int *height ) const;
|
||||
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
virtual void DetachMenuBar();
|
||||
virtual void AttachMenuBar(wxMenuBar *menubar);
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
private:
|
||||
long m_fsSaveFlag;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_FRAME_H_
|
87
Externals/wxWidgets3/include/wx/gtk/gauge.h
vendored
Normal file
87
Externals/wxWidgets3/include/wx/gtk/gauge.h
vendored
Normal file
@ -0,0 +1,87 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/gauge.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: gauge.h 42077 2006-10-17 14:44:52Z ABX $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_GAUGE_H_
|
||||
#define _WX_GTK_GAUGE_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxGauge
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGauge: public wxControl
|
||||
{
|
||||
public:
|
||||
wxGauge() { Init(); }
|
||||
|
||||
wxGauge( wxWindow *parent,
|
||||
wxWindowID id,
|
||||
int range,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxGA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxGaugeNameStr )
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, range, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create( wxWindow *parent,
|
||||
wxWindowID id, int range,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxGA_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxGaugeNameStr );
|
||||
|
||||
void SetShadowWidth( int WXUNUSED(w) ) { }
|
||||
void SetBezelFace( int WXUNUSED(w) ) { }
|
||||
int GetShadowWidth() const { return 0; };
|
||||
int GetBezelFace() const { return 0; };
|
||||
|
||||
// determinate mode API
|
||||
void SetRange( int r );
|
||||
void SetValue( int pos );
|
||||
|
||||
int GetRange() const;
|
||||
int GetValue() const;
|
||||
|
||||
// indeterminate mode API
|
||||
virtual void Pulse();
|
||||
|
||||
bool IsVertical() const { return HasFlag(wxGA_VERTICAL); }
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
virtual wxVisualAttributes GetDefaultAttributes() const;
|
||||
|
||||
// implementation
|
||||
// -------------
|
||||
|
||||
// the max and current gauge values
|
||||
int m_rangeMax,
|
||||
m_gaugePos;
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init() { m_rangeMax = m_gaugePos = 0; }
|
||||
|
||||
// set the gauge value to the value of m_gaugePos
|
||||
void DoSetGauge();
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxGauge)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_GTK_GAUGE_H_
|
108
Externals/wxWidgets3/include/wx/gtk/glcanvas.h
vendored
Normal file
108
Externals/wxWidgets3/include/wx/gtk/glcanvas.h
vendored
Normal file
@ -0,0 +1,108 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/glcanvas.h
|
||||
// Purpose: wxGLCanvas, for using OpenGL/Mesa with wxWidgets and GTK
|
||||
// Author: Robert Roebling
|
||||
// Modified by:
|
||||
// Created: 17/8/98
|
||||
// RCS-ID: $Id: glcanvas.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GLCANVAS_H_
|
||||
#define _WX_GLCANVAS_H_
|
||||
|
||||
#include "wx/unix/glx11.h"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxGLCanvas
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasX11
|
||||
{
|
||||
public:
|
||||
wxGLCanvas(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const int *attribList = NULL,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxGLCanvasName,
|
||||
const wxPalette& palette = wxNullPalette);
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxGLCanvasName,
|
||||
const int *attribList = NULL,
|
||||
const wxPalette& palette = wxNullPalette);
|
||||
|
||||
|
||||
// implement wxGLCanvasX11 methods
|
||||
// --------------------------------
|
||||
|
||||
virtual Window GetXWindow() const;
|
||||
|
||||
|
||||
// deprecated methods
|
||||
// ------------------
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
wxDEPRECATED(
|
||||
wxGLCanvas(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxGLCanvasName,
|
||||
const int *attribList = NULL,
|
||||
const wxPalette& palette = wxNullPalette)
|
||||
);
|
||||
|
||||
wxDEPRECATED(
|
||||
wxGLCanvas(wxWindow *parent,
|
||||
const wxGLContext *shared,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxGLCanvasName,
|
||||
const int *attribList = NULL,
|
||||
const wxPalette& palette = wxNullPalette)
|
||||
);
|
||||
|
||||
wxDEPRECATED(
|
||||
wxGLCanvas(wxWindow *parent,
|
||||
const wxGLCanvas *shared,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxGLCanvasName,
|
||||
const int *attribList = NULL,
|
||||
const wxPalette& palette = wxNullPalette)
|
||||
);
|
||||
|
||||
// called from "realized" callback to create the implicit context if needed
|
||||
void GTKInitImplicitContext();
|
||||
#endif // WXWIN_COMPATIBILITY_2_8
|
||||
|
||||
// implementation from now on
|
||||
void OnInternalIdle();
|
||||
|
||||
bool m_exposed;
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
wxGLContext *m_sharedContext;
|
||||
wxGLCanvas *m_sharedContextOf;
|
||||
const bool m_createImplicitContext;
|
||||
#endif // WXWIN_COMPATIBILITY_2_8
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxGLCanvas)
|
||||
};
|
||||
|
||||
#endif // _WX_GLCANVAS_H_
|
||||
|
350
Externals/wxWidgets3/include/wx/gtk/gnome/gprint.h
vendored
Normal file
350
Externals/wxWidgets3/include/wx/gtk/gnome/gprint.h
vendored
Normal file
@ -0,0 +1,350 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/gnome/gprint.h
|
||||
// Author: Robert Roebling
|
||||
// Purpose: GNOME printing support
|
||||
// Created: 09/20/04
|
||||
// RCS-ID: $Id: gprint.h 61724 2009-08-21 10:41:26Z VZ $
|
||||
// Copyright: Robert Roebling
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_GPRINT_H_
|
||||
#define _WX_GTK_GPRINT_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_LIBGNOMEPRINT
|
||||
|
||||
#include "wx/print.h"
|
||||
#include "wx/printdlg.h"
|
||||
#include "wx/dc.h"
|
||||
#include "wx/module.h"
|
||||
|
||||
typedef struct _GnomePrintJob GnomePrintJob;
|
||||
typedef struct _GnomePrintContext GnomePrintContext;
|
||||
typedef struct _GnomePrintConfig GnomePrintConfig;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGnomePrintModule
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxGnomePrintModule: public wxModule
|
||||
{
|
||||
public:
|
||||
wxGnomePrintModule() {}
|
||||
bool OnInit();
|
||||
void OnExit();
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxGnomePrintModule)
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxGnomePrintNativeData
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxGnomePrintNativeData: public wxPrintNativeDataBase
|
||||
{
|
||||
public:
|
||||
wxGnomePrintNativeData();
|
||||
virtual ~wxGnomePrintNativeData();
|
||||
|
||||
virtual bool TransferTo( wxPrintData &data );
|
||||
virtual bool TransferFrom( const wxPrintData &data );
|
||||
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const { return true; }
|
||||
|
||||
GnomePrintConfig* GetPrintConfig() { return m_config; }
|
||||
void SetPrintJob( GnomePrintJob *job ) { m_job = job; }
|
||||
GnomePrintJob* GetPrintJob() { return m_job; }
|
||||
|
||||
|
||||
private:
|
||||
GnomePrintConfig *m_config;
|
||||
GnomePrintJob *m_job;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxGnomePrintNativeData)
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxGnomePrintFactory
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxGnomePrintFactory: public wxPrintFactory
|
||||
{
|
||||
public:
|
||||
virtual wxPrinterBase *CreatePrinter( wxPrintDialogData *data );
|
||||
|
||||
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
|
||||
wxPrintout *printout = NULL,
|
||||
wxPrintDialogData *data = NULL );
|
||||
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
|
||||
wxPrintout *printout,
|
||||
wxPrintData *data );
|
||||
|
||||
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
|
||||
wxPrintDialogData *data = NULL );
|
||||
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
|
||||
wxPrintData *data );
|
||||
|
||||
virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
|
||||
wxPageSetupDialogData * data = NULL );
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
virtual wxDCImpl* CreatePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data );
|
||||
#else
|
||||
virtual wxDC* CreatePrinterDC( const wxPrintData& data );
|
||||
#endif
|
||||
|
||||
virtual bool HasPrintSetupDialog();
|
||||
virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data );
|
||||
virtual bool HasOwnPrintToFile();
|
||||
virtual bool HasPrinterLine();
|
||||
virtual wxString CreatePrinterLine();
|
||||
virtual bool HasStatusLine();
|
||||
virtual wxString CreateStatusLine();
|
||||
|
||||
virtual wxPrintNativeDataBase *CreatePrintNativeData();
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxGnomePrintDialog
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxGnomePrintDialog: public wxPrintDialogBase
|
||||
{
|
||||
public:
|
||||
wxGnomePrintDialog( wxWindow *parent,
|
||||
wxPrintDialogData* data = NULL );
|
||||
wxGnomePrintDialog( wxWindow *parent, wxPrintData* data);
|
||||
virtual ~wxGnomePrintDialog();
|
||||
|
||||
wxPrintData& GetPrintData()
|
||||
{ return m_printDialogData.GetPrintData(); }
|
||||
wxPrintDialogData& GetPrintDialogData()
|
||||
{ return m_printDialogData; }
|
||||
|
||||
wxDC *GetPrintDC();
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
virtual bool Validate();
|
||||
virtual bool TransferDataToWindow();
|
||||
virtual bool TransferDataFromWindow();
|
||||
|
||||
protected:
|
||||
// Implement some base class methods to do nothing to avoid asserts and
|
||||
// GTK warnings, since this is not a real wxDialog.
|
||||
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(width), int WXUNUSED(height),
|
||||
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
||||
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(width), int WXUNUSED(height)) {}
|
||||
|
||||
private:
|
||||
void Init();
|
||||
wxPrintDialogData m_printDialogData;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxGnomePrintDialog)
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxGnomePageSetupDialog
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxGnomePageSetupDialog: public wxPageSetupDialogBase
|
||||
{
|
||||
public:
|
||||
wxGnomePageSetupDialog( wxWindow *parent,
|
||||
wxPageSetupDialogData* data = NULL );
|
||||
virtual ~wxGnomePageSetupDialog();
|
||||
|
||||
virtual wxPageSetupDialogData& GetPageSetupDialogData();
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
virtual bool Validate();
|
||||
virtual bool TransferDataToWindow();
|
||||
virtual bool TransferDataFromWindow();
|
||||
|
||||
protected:
|
||||
// Implement some base class methods to do nothing to avoid asserts and
|
||||
// GTK warnings, since this is not a real wxDialog.
|
||||
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(width), int WXUNUSED(height),
|
||||
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
||||
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(width), int WXUNUSED(height)) {}
|
||||
|
||||
private:
|
||||
wxPageSetupDialogData m_pageDialogData;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxGnomePageSetupDialog)
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxGnomePrinter
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxGnomePrinter: public wxPrinterBase
|
||||
{
|
||||
public:
|
||||
wxGnomePrinter(wxPrintDialogData *data = NULL);
|
||||
virtual ~wxGnomePrinter();
|
||||
|
||||
virtual bool Print(wxWindow *parent,
|
||||
wxPrintout *printout,
|
||||
bool prompt = true);
|
||||
virtual wxDC* PrintDialog(wxWindow *parent);
|
||||
virtual bool Setup(wxWindow *parent);
|
||||
|
||||
private:
|
||||
bool m_native_preview;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxGnomePrinter)
|
||||
wxDECLARE_NO_COPY_CLASS(wxGnomePrinter);
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxGnomePrinterDC
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
class wxGnomePrinterDCImpl : public wxDCImpl
|
||||
#else
|
||||
#define wxGnomePrinterDCImpl wxGnomePrinterDC
|
||||
class wxGnomePrinterDC : public wxDC
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
#if wxUSE_NEW_DC
|
||||
wxGnomePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data );
|
||||
#else
|
||||
wxGnomePrinterDC( const wxPrintData& data );
|
||||
#endif
|
||||
virtual ~wxGnomePrinterDCImpl();
|
||||
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const;
|
||||
|
||||
bool CanDrawBitmap() const { return true; }
|
||||
void Clear();
|
||||
void SetFont( const wxFont& font );
|
||||
void SetPen( const wxPen& pen );
|
||||
void SetBrush( const wxBrush& brush );
|
||||
void SetLogicalFunction( wxRasterOperationMode function );
|
||||
void SetBackground( const wxBrush& brush );
|
||||
void DestroyClippingRegion();
|
||||
bool StartDoc(const wxString& message);
|
||||
void EndDoc();
|
||||
void StartPage();
|
||||
void EndPage();
|
||||
wxCoord GetCharHeight() const;
|
||||
wxCoord GetCharWidth() const;
|
||||
bool CanGetTextExtent() const { return true; }
|
||||
wxSize GetPPI() const;
|
||||
virtual int GetDepth() const { return 24; }
|
||||
void SetBackgroundMode(int WXUNUSED(mode)) { }
|
||||
void SetPalette(const wxPalette& WXUNUSED(palette)) { }
|
||||
|
||||
protected:
|
||||
bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col,
|
||||
wxFloodFillStyle style=wxFLOOD_SURFACE );
|
||||
bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const;
|
||||
void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
|
||||
void DoCrossHair(wxCoord x, wxCoord y);
|
||||
void DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc);
|
||||
void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea);
|
||||
void DoDrawPoint(wxCoord x, wxCoord y);
|
||||
void DoDrawLines(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0);
|
||||
void DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE);
|
||||
void DoDrawPolyPolygon(int n, int count[], wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE);
|
||||
void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0);
|
||||
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
#if wxUSE_SPLINES
|
||||
void DoDrawSpline(const wxPointList *points);
|
||||
#endif
|
||||
bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
||||
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
||||
wxRasterOperationMode = wxCOPY, bool useMask = false,
|
||||
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
|
||||
void DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y );
|
||||
void DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false );
|
||||
void DoDrawText(const wxString& text, wxCoord x, wxCoord y );
|
||||
void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
|
||||
void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
void DoSetDeviceClippingRegion( const wxRegion &WXUNUSED(clip) )
|
||||
{
|
||||
wxFAIL_MSG( "not implemented" );
|
||||
}
|
||||
void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
|
||||
wxCoord *descent = NULL,
|
||||
wxCoord *externalLeading = NULL,
|
||||
const wxFont *theFont = NULL ) const;
|
||||
void DoGetSize(int* width, int* height) const;
|
||||
void DoGetSizeMM(int *width, int *height) const;
|
||||
|
||||
void SetPrintData(const wxPrintData& data);
|
||||
wxPrintData& GetPrintData() { return m_printData; }
|
||||
|
||||
// overriden for wxPrinterDC Impl
|
||||
virtual wxRect GetPaperRect() const;
|
||||
virtual int GetResolution() const;
|
||||
|
||||
private:
|
||||
wxPrintData m_printData;
|
||||
PangoContext *m_context;
|
||||
PangoLayout *m_layout;
|
||||
PangoFontDescription *m_fontdesc;
|
||||
|
||||
unsigned char m_currentRed;
|
||||
unsigned char m_currentGreen;
|
||||
unsigned char m_currentBlue;
|
||||
|
||||
double m_pageHeight;
|
||||
|
||||
GnomePrintContext *m_gpc;
|
||||
GnomePrintJob* m_job;
|
||||
|
||||
void makeEllipticalPath(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxGnomePrinterDCImpl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxGnomePrinterDCImpl);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGnomePrintPreview: programmer creates an object of this class to preview a
|
||||
// wxPrintout.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxGnomePrintPreview : public wxPrintPreviewBase
|
||||
{
|
||||
public:
|
||||
wxGnomePrintPreview(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting = NULL,
|
||||
wxPrintDialogData *data = NULL);
|
||||
wxGnomePrintPreview(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting,
|
||||
wxPrintData *data);
|
||||
|
||||
virtual ~wxGnomePrintPreview();
|
||||
|
||||
virtual bool Print(bool interactive);
|
||||
virtual void DetermineScaling();
|
||||
|
||||
private:
|
||||
void Init(wxPrintout *printout, wxPrintout *printoutForPrinting);
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxGnomePrintPreview)
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
// wxUSE_LIBGNOMEPRINT
|
||||
|
||||
#endif
|
53
Externals/wxWidgets3/include/wx/gtk/gnome/gvfs.h
vendored
Normal file
53
Externals/wxWidgets3/include/wx/gtk/gnome/gvfs.h
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/gnome/gvfs.h
|
||||
// Author: Robert Roebling
|
||||
// Purpose: GNOME VFS support
|
||||
// Created: 17/03/06
|
||||
// RCS-ID: $Id: gvfs.h 61724 2009-08-21 10:41:26Z VZ $
|
||||
// Copyright: Robert Roebling
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_GVFS_H_
|
||||
#define _WX_GTK_GVFS_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_MIMETYPE && wxUSE_LIBGNOMEVFS
|
||||
|
||||
#include "wx/string.h"
|
||||
#include "wx/unix/mimetype.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxGnomeVFSMimeTypesManagerImpl
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxGnomeVFSMimeTypesManagerImpl: public wxMimeTypesManagerImpl
|
||||
{
|
||||
public:
|
||||
wxGnomeVFSMimeTypesManagerImpl() { }
|
||||
|
||||
protected:
|
||||
virtual bool DoAssociation(const wxString& strType,
|
||||
const wxString& strIcon,
|
||||
wxMimeTypeCommands *entry,
|
||||
const wxArrayString& strExtensions,
|
||||
const wxString& strDesc);
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxGnomeVFSMimeTypesManagerFactory
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxGnomeVFSMimeTypesManagerFactory: public wxMimeTypesManagerFactory
|
||||
{
|
||||
public:
|
||||
wxGnomeVFSMimeTypesManagerFactory() {}
|
||||
|
||||
virtual wxMimeTypesManagerImpl *CreateMimeTypesManagerImpl();
|
||||
};
|
||||
|
||||
#endif
|
||||
// wxUSE_MIMETYPE
|
||||
|
||||
#endif
|
59
Externals/wxWidgets3/include/wx/gtk/hildon/notifmsg.h
vendored
Normal file
59
Externals/wxWidgets3/include/wx/gtk/hildon/notifmsg.h
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/hildon/notifmsg.h
|
||||
// Purpose: Hildon implementation of wxNotificationMessage
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2007-11-21
|
||||
// RCS-ID: $Id: notifmsg.h 58757 2009-02-08 11:45:59Z VZ $
|
||||
// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_HILDON_NOTIFMSG_H_
|
||||
#define _WX_GTK_HILDON_NOTIFMSG_H_
|
||||
|
||||
typedef struct _HildonBanner HildonBanner;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxNotificationMessage
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxNotificationMessage : public wxNotificationMessageBase
|
||||
{
|
||||
public:
|
||||
wxNotificationMessage() { Init(); }
|
||||
wxNotificationMessage(const wxString& title,
|
||||
const wxString& message = wxString(),
|
||||
wxWindow *parent = NULL)
|
||||
: wxNotificationMessageBase(title, message, parent)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
virtual ~wxNotificationMessage();
|
||||
|
||||
|
||||
virtual bool Show(int timeout = Timeout_Auto);
|
||||
virtual bool Close();
|
||||
|
||||
private:
|
||||
void Init() { m_banner = NULL; }
|
||||
|
||||
// return the string containing markup for both the title and, if
|
||||
// specified, the message
|
||||
wxString HildonGetMarkup() const;
|
||||
|
||||
// returns the widget of the parent GtkWindow to use or NULL
|
||||
GtkWidget *HildonGetWindow() const;
|
||||
|
||||
|
||||
// the banner we're showing, only non-NULL if it's an animation or progress
|
||||
// banner as the informational dialog times out on its own and we don't
|
||||
// need to store it (nor do we have any way to get its widget anyhow)
|
||||
GtkWidget *m_banner;
|
||||
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxNotificationMessage);
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_HILDON_NOTIFMSG_H_
|
||||
|
77
Externals/wxWidgets3/include/wx/gtk/hyperlink.h
vendored
Normal file
77
Externals/wxWidgets3/include/wx/gtk/hyperlink.h
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/hyperlink.h
|
||||
// Purpose: Hyperlink control
|
||||
// Author: Francesco Montorsi
|
||||
// Modified by:
|
||||
// Created: 14/2/2007
|
||||
// RCS-ID: $Id: hyperlink.h 44647 2007-03-07 22:12:47Z VZ $
|
||||
// Copyright: (c) 2007 Francesco Montorsi
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKHYPERLINKCTRLH__
|
||||
#define __GTKHYPERLINKCTRLH__
|
||||
|
||||
#include "wx/generic/hyperlink.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxHyperlinkCtrl
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_ADV wxHyperlinkCtrl : public wxGenericHyperlinkCtrl
|
||||
{
|
||||
public:
|
||||
// Default constructor (for two-step construction).
|
||||
wxHyperlinkCtrl() { }
|
||||
|
||||
// Constructor.
|
||||
wxHyperlinkCtrl(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& label, const wxString& url,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxHL_DEFAULT_STYLE,
|
||||
const wxString& name = wxHyperlinkCtrlNameStr)
|
||||
{
|
||||
(void)Create(parent, id, label, url, pos, size, style, name);
|
||||
}
|
||||
|
||||
// Creation function (for two-step construction).
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& label, const wxString& url,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxHL_DEFAULT_STYLE,
|
||||
const wxString& name = wxHyperlinkCtrlNameStr);
|
||||
|
||||
|
||||
// get/set
|
||||
virtual wxColour GetHoverColour() const;
|
||||
virtual void SetHoverColour(const wxColour &colour);
|
||||
|
||||
virtual wxColour GetNormalColour() const;
|
||||
virtual void SetNormalColour(const wxColour &colour);
|
||||
|
||||
virtual wxColour GetVisitedColour() const;
|
||||
virtual void SetVisitedColour(const wxColour &colour);
|
||||
|
||||
virtual wxString GetURL() const;
|
||||
virtual void SetURL(const wxString &url);
|
||||
|
||||
virtual void SetLabel(const wxString &label);
|
||||
|
||||
protected:
|
||||
// overridden base class virtuals
|
||||
|
||||
// Returns the best size for the window, which is the size needed
|
||||
// to display the text label.
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxHyperlinkCtrl)
|
||||
};
|
||||
|
||||
#endif // __GTKHYPERLINKCTRLH__
|
75
Externals/wxWidgets3/include/wx/gtk/infobar.h
vendored
Normal file
75
Externals/wxWidgets3/include/wx/gtk/infobar.h
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/infobar.h
|
||||
// Purpose: native implementation of wxInfoBar for GTK+ 2.18 and later
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2009-09-26
|
||||
// RCS-ID: $Id: infobar.h 64213 2010-05-05 12:20:08Z VZ $
|
||||
// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_INFOBAR_H_
|
||||
#define _WX_GTK_INFOBAR_H_
|
||||
|
||||
#include "wx/generic/infobar.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxInfoBar for GTK+
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// notice that the native GTK+ implementation is only available since
|
||||
// (relatively recent) 2.18 so we inherit from the generic one to be able to
|
||||
// fall back to it if GTK+ version is determined to be too old during run-time
|
||||
class WXDLLIMPEXP_CORE wxInfoBar : public wxInfoBarGeneric
|
||||
{
|
||||
public:
|
||||
wxInfoBar() { Init(); }
|
||||
|
||||
wxInfoBar(wxWindow *parent, wxWindowID winid = wxID_ANY)
|
||||
{
|
||||
Init();
|
||||
Create(parent, winid);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY);
|
||||
|
||||
virtual ~wxInfoBar();
|
||||
|
||||
// implement base class methods
|
||||
// ----------------------------
|
||||
|
||||
virtual void ShowMessage(const wxString& msg,
|
||||
int flags = wxICON_INFORMATION);
|
||||
|
||||
virtual void Dismiss();
|
||||
|
||||
virtual void AddButton(wxWindowID btnid,
|
||||
const wxString& label = wxString());
|
||||
|
||||
virtual void RemoveButton(wxWindowID btnid);
|
||||
|
||||
// implementation only
|
||||
// -------------------
|
||||
|
||||
void GTKResponse(int btnid);
|
||||
|
||||
protected:
|
||||
virtual bool GTKShouldConnectSizeRequest() const { return false; }
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
|
||||
private:
|
||||
void Init() { m_impl = NULL; }
|
||||
|
||||
// add a button with the given id/label and return its widget
|
||||
GtkWidget *GTKAddButton(wxWindowID btnid,
|
||||
const wxString& label = wxString());
|
||||
|
||||
|
||||
// only used when the native implementation is really being used
|
||||
class wxInfoBarGTKImpl *m_impl;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxInfoBar);
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_INFOBAR_H_
|
||||
|
142
Externals/wxWidgets3/include/wx/gtk/listbox.h
vendored
Normal file
142
Externals/wxWidgets3/include/wx/gtk/listbox.h
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/listbox.h
|
||||
// Purpose: wxListBox class declaration
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: listbox.h 65936 2010-10-27 23:22:00Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_LISTBOX_H_
|
||||
#define _WX_GTK_LISTBOX_H_
|
||||
|
||||
struct _GtkTreeEntry;
|
||||
struct _GtkTreeIter;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxListBox
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxListBox : public wxListBoxBase
|
||||
{
|
||||
public:
|
||||
// ctors and such
|
||||
wxListBox()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
wxListBox( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = (const wxString *) NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr )
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
wxListBox( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr )
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, pos, size, choices, style, validator, name);
|
||||
}
|
||||
virtual ~wxListBox();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = (const wxString *) NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
virtual unsigned int GetCount() const;
|
||||
virtual wxString GetString(unsigned int n) const;
|
||||
virtual void SetString(unsigned int n, const wxString& s);
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
|
||||
virtual bool IsSelected(int n) const;
|
||||
virtual int GetSelection() const;
|
||||
virtual int GetSelections(wxArrayInt& aSelections) const;
|
||||
|
||||
virtual void EnsureVisible(int n);
|
||||
|
||||
virtual void Update();
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
// implementation from now on
|
||||
|
||||
GtkWidget *GetConnectWidget();
|
||||
|
||||
#if wxUSE_TOOLTIPS
|
||||
void GTKApplyToolTip( GtkTooltips *tips, const gchar *tip );
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
|
||||
struct _GtkTreeView *m_treeview;
|
||||
struct _GtkListStore *m_liststore;
|
||||
|
||||
#if wxUSE_CHECKLISTBOX
|
||||
bool m_hasCheckBoxes;
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
||||
struct _GtkTreeEntry* GTKGetEntry(unsigned pos) const;
|
||||
|
||||
void GTKDisableEvents();
|
||||
void GTKEnableEvents();
|
||||
|
||||
void GTKOnSelectionChanged();
|
||||
void GTKOnActivated(int item);
|
||||
|
||||
protected:
|
||||
virtual void DoClear();
|
||||
virtual void DoDeleteOneItem(unsigned int n);
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
virtual void DoSetSelection(int n, bool select);
|
||||
|
||||
virtual int DoInsertItems(const wxArrayStringsAdapter& items,
|
||||
unsigned int pos,
|
||||
void **clientData, wxClientDataType type);
|
||||
|
||||
virtual void DoSetFirstItem(int n);
|
||||
virtual void DoSetItemClientData(unsigned int n, void* clientData);
|
||||
virtual void* DoGetItemClientData(unsigned int n) const;
|
||||
virtual int DoListHitTest(const wxPoint& point) const;
|
||||
|
||||
// get the iterator for the given index, returns false if invalid
|
||||
bool GTKGetIteratorFor(unsigned pos, _GtkTreeIter *iter) const;
|
||||
|
||||
// get the index for the given iterator, return wxNOT_FOUND on failure
|
||||
int GTKGetIndexFor(_GtkTreeIter& iter) const;
|
||||
|
||||
// set the specified item
|
||||
void GTKSetItem(_GtkTreeIter& iter, const _GtkTreeEntry *entry);
|
||||
|
||||
// common part of DoSetFirstItem() and EnsureVisible()
|
||||
void DoScrollToCell(int n, float alignY, float alignX);
|
||||
|
||||
private:
|
||||
void Init(); //common construction
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxListBox)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_LISTBOX_H_
|
154
Externals/wxWidgets3/include/wx/gtk/mdi.h
vendored
Normal file
154
Externals/wxWidgets3/include/wx/gtk/mdi.h
vendored
Normal file
@ -0,0 +1,154 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/mdi.h
|
||||
// Purpose: TDI-based MDI implementation for wxGTK
|
||||
// Author: Robert Roebling
|
||||
// Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes
|
||||
// Id: $Id: mdi.h 59523 2009-03-14 01:24:45Z FM $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// (c) 2008 Vadim Zeitlin
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_MDI_H_
|
||||
#define _WX_GTK_MDI_H_
|
||||
|
||||
#include "wx/frame.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame;
|
||||
class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow;
|
||||
|
||||
typedef struct _GtkNotebook GtkNotebook;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMDIParentFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMDIParentFrame : public wxMDIParentFrameBase
|
||||
{
|
||||
public:
|
||||
wxMDIParentFrame() { Init(); }
|
||||
wxMDIParentFrame(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
(void)Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
// we don't store the active child in m_currentChild unlike the base class
|
||||
// version so override this method to find it dynamically
|
||||
virtual wxMDIChildFrame *GetActiveChild() const;
|
||||
|
||||
// implement base class pure virtuals
|
||||
// ----------------------------------
|
||||
|
||||
virtual void ActivateNext();
|
||||
virtual void ActivatePrevious();
|
||||
|
||||
static bool IsTDI() { return true; }
|
||||
|
||||
// implementation
|
||||
|
||||
bool m_justInserted;
|
||||
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
virtual void DoGetClientSize(int* width, int* height) const;
|
||||
|
||||
private:
|
||||
friend class wxMDIChildFrame;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMDIChildFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMDIChildFrame : public wxTDIChildFrame
|
||||
{
|
||||
public:
|
||||
wxMDIChildFrame() { Init(); }
|
||||
wxMDIChildFrame(wxMDIParentFrame *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxMDIParentFrame *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual ~wxMDIChildFrame();
|
||||
|
||||
virtual void SetMenuBar( wxMenuBar *menu_bar );
|
||||
virtual wxMenuBar *GetMenuBar() const;
|
||||
|
||||
virtual void Activate();
|
||||
|
||||
virtual void SetTitle(const wxString& title);
|
||||
|
||||
// implementation
|
||||
|
||||
void OnActivate( wxActivateEvent& event );
|
||||
void OnMenuHighlight( wxMenuEvent& event );
|
||||
|
||||
wxMenuBar *m_menuBar;
|
||||
GtkNotebookPage *m_page;
|
||||
bool m_justInserted;
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
GtkNotebook *GTKGetNotebook() const;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMDIClientWindow
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMDIClientWindow : public wxMDIClientWindowBase
|
||||
{
|
||||
public:
|
||||
wxMDIClientWindow() { }
|
||||
~wxMDIClientWindow();
|
||||
|
||||
virtual bool CreateClient(wxMDIParentFrame *parent,
|
||||
long style = wxVSCROLL | wxHSCROLL);
|
||||
|
||||
private:
|
||||
virtual void AddChildGTK(wxWindowGTK* child);
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_MDI_H_
|
110
Externals/wxWidgets3/include/wx/gtk/menu.h
vendored
Normal file
110
Externals/wxWidgets3/include/wx/gtk/menu.h
vendored
Normal file
@ -0,0 +1,110 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/menu.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: menu.h 66180 2010-11-17 05:57:21Z PC $
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTKMENU_H_
|
||||
#define _WX_GTKMENU_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMenuBar
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMenuBar : public wxMenuBarBase
|
||||
{
|
||||
public:
|
||||
// ctors
|
||||
wxMenuBar();
|
||||
wxMenuBar(long style);
|
||||
wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0);
|
||||
|
||||
// implement base class (pure) virtuals
|
||||
virtual bool Append( wxMenu *menu, const wxString &title );
|
||||
virtual bool Insert(size_t pos, wxMenu *menu, const wxString& title);
|
||||
virtual wxMenu *Replace(size_t pos, wxMenu *menu, const wxString& title);
|
||||
virtual wxMenu *Remove(size_t pos);
|
||||
|
||||
virtual int FindMenuItem(const wxString& menuString,
|
||||
const wxString& itemString) const;
|
||||
virtual wxMenuItem* FindItem( int id, wxMenu **menu = NULL ) const;
|
||||
|
||||
virtual void EnableTop( size_t pos, bool flag );
|
||||
virtual void SetMenuLabel( size_t pos, const wxString& label );
|
||||
virtual wxString GetMenuLabel( size_t pos ) const;
|
||||
|
||||
void SetLayoutDirection(wxLayoutDirection dir);
|
||||
wxLayoutDirection GetLayoutDirection() const;
|
||||
|
||||
// wxMenuBar is not a top level window but it still doesn't need a parent
|
||||
// window
|
||||
virtual bool GTKNeedsParent() const { return false; }
|
||||
|
||||
virtual void Attach(wxFrame *frame);
|
||||
virtual void Detach();
|
||||
|
||||
// implementation only from now on
|
||||
GtkWidget *m_menubar; // Public for hildon support
|
||||
|
||||
private:
|
||||
// common part of Append and Insert
|
||||
bool GtkAppend(wxMenu *menu, const wxString& title, int pos=-1);
|
||||
|
||||
void Init(size_t n, wxMenu *menus[], const wxString titles[], long style);
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMenuBar)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMenu
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMenu : public wxMenuBase
|
||||
{
|
||||
public:
|
||||
// ctors & dtor
|
||||
wxMenu(const wxString& title, long style = 0)
|
||||
: wxMenuBase(title, style) { Init(); }
|
||||
|
||||
wxMenu(long style = 0) : wxMenuBase(style) { Init(); }
|
||||
|
||||
virtual ~wxMenu();
|
||||
|
||||
void Attach(wxMenuBarBase *menubar);
|
||||
|
||||
void SetLayoutDirection(const wxLayoutDirection dir);
|
||||
wxLayoutDirection GetLayoutDirection() const;
|
||||
|
||||
// Returns the title, with mnemonics translated to wx format
|
||||
wxString GetTitle() const;
|
||||
|
||||
// TODO: virtual void SetTitle(const wxString& title);
|
||||
|
||||
// implementation GTK only
|
||||
GtkWidget *m_menu; // GtkMenu
|
||||
GtkWidget *m_owner;
|
||||
GtkAccelGroup *m_accel;
|
||||
bool m_popupShown;
|
||||
|
||||
protected:
|
||||
virtual wxMenuItem* DoAppend(wxMenuItem *item);
|
||||
virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
|
||||
virtual wxMenuItem* DoRemove(wxMenuItem *item);
|
||||
|
||||
private:
|
||||
// common code for all constructors:
|
||||
void Init();
|
||||
|
||||
// common part of Append (if pos == -1) and Insert
|
||||
bool GtkAppend(wxMenuItem *item, int pos=-1);
|
||||
|
||||
GtkWidget *m_prevRadio;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMenu)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_GTKMENU_H_
|
63
Externals/wxWidgets3/include/wx/gtk/menuitem.h
vendored
Normal file
63
Externals/wxWidgets3/include/wx/gtk/menuitem.h
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/menuitem.h
|
||||
// Purpose: wxMenuItem class
|
||||
// Author: Robert Roebling
|
||||
// RCS-ID: $Id: menuitem.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTKMENUITEM_H_
|
||||
#define _WX_GTKMENUITEM_H_
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMenuItem
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMenuItem : public wxMenuItemBase
|
||||
{
|
||||
public:
|
||||
wxMenuItem(wxMenu *parentMenu = NULL,
|
||||
int id = wxID_SEPARATOR,
|
||||
const wxString& text = wxEmptyString,
|
||||
const wxString& help = wxEmptyString,
|
||||
wxItemKind kind = wxITEM_NORMAL,
|
||||
wxMenu *subMenu = NULL);
|
||||
virtual ~wxMenuItem();
|
||||
|
||||
// implement base class virtuals
|
||||
virtual void SetItemLabel( const wxString& str );
|
||||
virtual void Enable( bool enable = true );
|
||||
virtual void Check( bool check = true );
|
||||
virtual bool IsChecked() const;
|
||||
virtual void SetBitmap(const wxBitmap& bitmap);
|
||||
virtual const wxBitmap& GetBitmap() const { return m_bitmap; }
|
||||
|
||||
// implementation
|
||||
void SetMenuItem(GtkWidget *menuItem) { m_menuItem = menuItem; }
|
||||
GtkWidget *GetMenuItem() const { return m_menuItem; }
|
||||
void SetGtkLabel();
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
// compatibility only, don't use in new code
|
||||
wxDEPRECATED(
|
||||
inline
|
||||
wxMenuItem(wxMenu *parentMenu,
|
||||
int id,
|
||||
const wxString& text,
|
||||
const wxString& help,
|
||||
bool isCheckable,
|
||||
wxMenu *subMenu = NULL)
|
||||
);
|
||||
#endif
|
||||
|
||||
private:
|
||||
wxBitmap m_bitmap; // Bitmap for menuitem, if any
|
||||
GtkWidget *m_menuItem; // GtkMenuItem
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMenuItem)
|
||||
};
|
||||
|
||||
#endif // _WX_GTKMENUITEM_H_
|
63
Externals/wxWidgets3/include/wx/gtk/minifram.h
vendored
Normal file
63
Externals/wxWidgets3/include/wx/gtk/minifram.h
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/minifram.h
|
||||
// Purpose: wxMiniFrame class
|
||||
// Author: Robert Roebling
|
||||
// RCS-ID: $Id: minifram.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_MINIFRAME_H_
|
||||
#define _WX_GTK_MINIFRAME_H_
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/frame.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMiniFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMiniFrame: public wxFrame
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMiniFrame)
|
||||
|
||||
public:
|
||||
wxMiniFrame() {}
|
||||
wxMiniFrame(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxCAPTION | wxRESIZE_BORDER,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxCAPTION | wxRESIZE_BORDER,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual void SetTitle( const wxString &title );
|
||||
|
||||
protected:
|
||||
virtual void DoSetSizeHints( int minW, int minH,
|
||||
int maxW, int maxH,
|
||||
int incW, int incH );
|
||||
virtual void DoGetClientSize(int* width, int* height) const;
|
||||
|
||||
// implementation
|
||||
public:
|
||||
bool m_isDragging;
|
||||
int m_oldX,m_oldY;
|
||||
int m_diffX,m_diffY;
|
||||
wxBitmap m_closeButton;
|
||||
int m_miniEdge;
|
||||
int m_miniTitle;
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_MINIFRAME_H_
|
51
Externals/wxWidgets3/include/wx/gtk/msgdlg.h
vendored
Normal file
51
Externals/wxWidgets3/include/wx/gtk/msgdlg.h
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/msgdlg.h
|
||||
// Purpose: wxMessageDialog for GTK+2
|
||||
// Author: Vaclav Slavik
|
||||
// Modified by:
|
||||
// Created: 2003/02/28
|
||||
// RCS-ID: $Id: msgdlg.h 65348 2010-08-18 22:48:28Z VZ $
|
||||
// Copyright: (c) Vaclav Slavik, 2003
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_MSGDLG_H_
|
||||
#define _WX_GTK_MSGDLG_H_
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase
|
||||
{
|
||||
public:
|
||||
wxMessageDialog(wxWindow *parent, const wxString& message,
|
||||
const wxString& caption = wxMessageBoxCaptionStr,
|
||||
long style = wxOK|wxCENTRE,
|
||||
const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
virtual int ShowModal();
|
||||
virtual bool Show(bool WXUNUSED(show) = true) { return false; }
|
||||
|
||||
protected:
|
||||
// implement some base class methods to do nothing to avoid asserts and
|
||||
// GTK warnings, since this is not a real wxDialog.
|
||||
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(width), int WXUNUSED(height),
|
||||
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
||||
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(width), int WXUNUSED(height)) {}
|
||||
// override to convert wx mnemonics to GTK+ ones and handle stock ids
|
||||
virtual void DoSetCustomLabel(wxString& var, const ButtonLabel& label);
|
||||
|
||||
private:
|
||||
// override to use stock GTK+ defaults instead of just string ones
|
||||
virtual wxString GetDefaultYesLabel() const;
|
||||
virtual wxString GetDefaultNoLabel() const;
|
||||
virtual wxString GetDefaultOKLabel() const;
|
||||
virtual wxString GetDefaultCancelLabel() const;
|
||||
|
||||
// create the real GTK+ dialog: this is done from ShowModal() to allow
|
||||
// changing the message between constructing the dialog and showing it
|
||||
void GTKCreateMsgDialog();
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMessageDialog)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_MSGDLG_H_
|
147
Externals/wxWidgets3/include/wx/gtk/notebook.h
vendored
Normal file
147
Externals/wxWidgets3/include/wx/gtk/notebook.h
vendored
Normal file
@ -0,0 +1,147 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/notebook.h
|
||||
// Purpose: wxNotebook class
|
||||
// Author: Robert Roebling
|
||||
// Modified by:
|
||||
// RCS-ID: $Id: notebook.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Julian Smart and Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTKNOTEBOOK_H_
|
||||
#define _WX_GTKNOTEBOOK_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// internal class
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxGtkNotebookPage;
|
||||
|
||||
#include "wx/list.h"
|
||||
WX_DECLARE_LIST(wxGtkNotebookPage, wxGtkNotebookPagesList);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxNotebook
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxNotebook : public wxNotebookBase
|
||||
{
|
||||
public:
|
||||
// default for dynamic class
|
||||
wxNotebook();
|
||||
// the same arguments as for wxControl
|
||||
wxNotebook(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxNotebookNameStr);
|
||||
// Create() function
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxNotebookNameStr);
|
||||
// dtor
|
||||
virtual ~wxNotebook();
|
||||
|
||||
// accessors
|
||||
// ---------
|
||||
|
||||
// set the currently selected page, return the index of the previously
|
||||
// selected one (or wxNOT_FOUND on error)
|
||||
// NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events
|
||||
int SetSelection(size_t nPage) { return DoSetSelection(nPage, SetSelection_SendEvent); }
|
||||
// get the currently selected page
|
||||
int GetSelection() const;
|
||||
|
||||
// changes selected page without sending events
|
||||
int ChangeSelection(size_t nPage) { return DoSetSelection(nPage); }
|
||||
|
||||
// set/get the title of a page
|
||||
bool SetPageText(size_t nPage, const wxString& strText);
|
||||
wxString GetPageText(size_t nPage) const;
|
||||
|
||||
// sets/returns item's image index in the current image list
|
||||
int GetPageImage(size_t nPage) const;
|
||||
bool SetPageImage(size_t nPage, int nImage);
|
||||
|
||||
// control the appearance of the notebook pages
|
||||
// set the size (the same for all pages)
|
||||
void SetPageSize(const wxSize& size);
|
||||
// set the padding between tabs (in pixels)
|
||||
void SetPadding(const wxSize& padding);
|
||||
// sets the size of the tabs (assumes all tabs are the same size)
|
||||
void SetTabSize(const wxSize& sz);
|
||||
|
||||
virtual int HitTest(const wxPoint& pt, long *flags = NULL) const;
|
||||
|
||||
// operations
|
||||
// ----------
|
||||
// remove all pages
|
||||
bool DeleteAllPages();
|
||||
|
||||
// adds a new page to the notebook (it will be deleted by the notebook,
|
||||
// don't delete it yourself). If bSelect, this page becomes active.
|
||||
// the same as AddPage(), but adds it at the specified position
|
||||
bool InsertPage( size_t position,
|
||||
wxNotebookPage *win,
|
||||
const wxString& strText,
|
||||
bool bSelect = false,
|
||||
int imageId = -1 );
|
||||
|
||||
// handler for tab navigation
|
||||
// --------------------------
|
||||
void OnNavigationKey(wxNavigationKeyEvent& event);
|
||||
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
#if wxUSE_CONSTRAINTS
|
||||
void SetConstraintSizes(bool recurse);
|
||||
bool DoPhase(int phase);
|
||||
#endif
|
||||
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// Called by GTK event handler when the current page is definitely changed.
|
||||
void GTKOnPageChanged();
|
||||
|
||||
// helper function
|
||||
wxGtkNotebookPage* GetNotebookPage(int page) const;
|
||||
|
||||
// the additional page data (the pages themselves are in m_pages array)
|
||||
wxGtkNotebookPagesList m_pagesData;
|
||||
|
||||
// we need to store the old selection since there
|
||||
// is no other way to know about it at the time
|
||||
// of the change selection event
|
||||
int m_oldSelection;
|
||||
|
||||
protected:
|
||||
// set all page's attributes
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
// remove one page from the notebook but do not destroy it
|
||||
virtual wxNotebookPage *DoRemovePage(size_t nPage);
|
||||
|
||||
int DoSetSelection(size_t nPage, int flags = 0);
|
||||
|
||||
private:
|
||||
// the padding set by SetPadding()
|
||||
int m_padding;
|
||||
|
||||
virtual void AddChildGTK(wxWindowGTK* child);
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxNotebook)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // _WX_GTKNOTEBOOK_H_
|
65
Externals/wxWidgets3/include/wx/gtk/pen.h
vendored
Normal file
65
Externals/wxWidgets3/include/wx/gtk/pen.h
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/pen.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: pen.h 54273 2008-06-17 17:28:26Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_PEN_H_
|
||||
#define _WX_GTK_PEN_H_
|
||||
|
||||
typedef gint8 wxGTKDash;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxPen
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPen: public wxPenBase
|
||||
{
|
||||
public:
|
||||
wxPen() { }
|
||||
|
||||
wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID );
|
||||
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
||||
wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) );
|
||||
#endif
|
||||
|
||||
virtual ~wxPen();
|
||||
|
||||
bool operator==(const wxPen& pen) const;
|
||||
bool operator!=(const wxPen& pen) const { return !(*this == pen); }
|
||||
|
||||
void SetColour( const wxColour &colour );
|
||||
void SetColour( unsigned char red, unsigned char green, unsigned char blue );
|
||||
void SetCap( wxPenCap capStyle );
|
||||
void SetJoin( wxPenJoin joinStyle );
|
||||
void SetStyle( wxPenStyle style );
|
||||
void SetWidth( int width );
|
||||
void SetDashes( int number_of_dashes, const wxDash *dash );
|
||||
void SetStipple(const wxBitmap& stipple);
|
||||
|
||||
wxColour GetColour() const;
|
||||
wxPenCap GetCap() const;
|
||||
wxPenJoin GetJoin() const;
|
||||
wxPenStyle GetStyle() const;
|
||||
int GetWidth() const;
|
||||
int GetDashes(wxDash **ptr) const;
|
||||
int GetDashCount() const;
|
||||
wxDash* GetDash() const;
|
||||
wxBitmap *GetStipple() const;
|
||||
|
||||
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
||||
wxDEPRECATED_FUTURE( void SetStyle(int style) )
|
||||
{ SetStyle((wxPenStyle)style); }
|
||||
#endif
|
||||
|
||||
protected:
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxPen)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_PEN_H_
|
54
Externals/wxWidgets3/include/wx/gtk/popupwin.h
vendored
Normal file
54
Externals/wxWidgets3/include/wx/gtk/popupwin.h
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/popupwin.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created:
|
||||
// Id: $Id: popupwin.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 2001 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_POPUPWIN_H_
|
||||
#define _WX_GTK_POPUPWIN_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxPopUpWindow
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPopupWindow: public wxPopupWindowBase
|
||||
{
|
||||
public:
|
||||
wxPopupWindow() { }
|
||||
virtual ~wxPopupWindow();
|
||||
|
||||
wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE)
|
||||
{ (void)Create(parent, flags); }
|
||||
bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
|
||||
|
||||
virtual bool Show(bool show = true);
|
||||
|
||||
virtual void SetFocus();
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
// GTK time when connecting to button_press signal
|
||||
wxUint32 m_time;
|
||||
|
||||
protected:
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
|
||||
private:
|
||||
virtual void AddChildGTK(wxWindowGTK* child);
|
||||
|
||||
#ifdef __WXUNIVERSAL__
|
||||
DECLARE_EVENT_TABLE()
|
||||
#endif
|
||||
DECLARE_DYNAMIC_CLASS(wxPopupWindow)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_POPUPWIN_H_
|
353
Externals/wxWidgets3/include/wx/gtk/print.h
vendored
Normal file
353
Externals/wxWidgets3/include/wx/gtk/print.h
vendored
Normal file
@ -0,0 +1,353 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/print.h
|
||||
// Author: Anthony Bretaudeau
|
||||
// Purpose: GTK printing support
|
||||
// Created: 2007-08-25
|
||||
// RCS-ID: $Id: print.h 67232 2011-03-18 15:10:15Z DS $
|
||||
// Copyright: (c) Anthony Bretaudeau
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_PRINT_H_
|
||||
#define _WX_GTK_PRINT_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_GTKPRINT
|
||||
|
||||
#include "wx/print.h"
|
||||
#include "wx/printdlg.h"
|
||||
#include "wx/prntbase.h"
|
||||
#include "wx/dc.h"
|
||||
#include "wx/cairo.h"
|
||||
|
||||
|
||||
typedef struct _GtkPrintOperation GtkPrintOperation;
|
||||
typedef struct _GtkPrintContext GtkPrintContext;
|
||||
typedef struct _GtkPrintSettings GtkPrintSettings;
|
||||
typedef struct _GtkPageSetup GtkPageSetup;
|
||||
|
||||
typedef struct _cairo cairo_t;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxGtkPrintFactory
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class wxGtkPrintFactory: public wxPrintFactory
|
||||
{
|
||||
public:
|
||||
virtual wxPrinterBase *CreatePrinter( wxPrintDialogData *data );
|
||||
|
||||
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
|
||||
wxPrintout *printout = NULL,
|
||||
wxPrintDialogData *data = NULL );
|
||||
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
|
||||
wxPrintout *printout,
|
||||
wxPrintData *data );
|
||||
|
||||
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
|
||||
wxPrintDialogData *data = NULL );
|
||||
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
|
||||
wxPrintData *data );
|
||||
|
||||
virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
|
||||
wxPageSetupDialogData * data = NULL );
|
||||
|
||||
virtual wxDCImpl* CreatePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data );
|
||||
|
||||
virtual bool HasPrintSetupDialog();
|
||||
virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data );
|
||||
virtual bool HasOwnPrintToFile();
|
||||
virtual bool HasPrinterLine();
|
||||
virtual wxString CreatePrinterLine();
|
||||
virtual bool HasStatusLine();
|
||||
virtual wxString CreateStatusLine();
|
||||
|
||||
virtual wxPrintNativeDataBase *CreatePrintNativeData();
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxGtkPrintDialog
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGtkPrintDialog: public wxPrintDialogBase
|
||||
{
|
||||
public:
|
||||
wxGtkPrintDialog( wxWindow *parent,
|
||||
wxPrintDialogData* data = NULL );
|
||||
wxGtkPrintDialog( wxWindow *parent, wxPrintData* data);
|
||||
virtual ~wxGtkPrintDialog();
|
||||
|
||||
wxPrintData& GetPrintData()
|
||||
{ return m_printDialogData.GetPrintData(); }
|
||||
wxPrintDialogData& GetPrintDialogData()
|
||||
{ return m_printDialogData; }
|
||||
|
||||
wxDC *GetPrintDC() { return m_dc; }
|
||||
void SetPrintDC(wxDC * printDC) { m_dc = printDC; }
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
virtual bool Validate() { return true; }
|
||||
virtual bool TransferDataToWindow() { return true; }
|
||||
virtual bool TransferDataFromWindow() { return true; }
|
||||
|
||||
void SetShowDialog(bool show) { m_showDialog = show; }
|
||||
bool GetShowDialog() { return m_showDialog; }
|
||||
|
||||
protected:
|
||||
// Implement some base class methods to do nothing to avoid asserts and
|
||||
// GTK warnings, since this is not a real wxDialog.
|
||||
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(width), int WXUNUSED(height),
|
||||
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
||||
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(width), int WXUNUSED(height)) {}
|
||||
|
||||
private:
|
||||
wxPrintDialogData m_printDialogData;
|
||||
wxWindow *m_parent;
|
||||
bool m_showDialog;
|
||||
wxDC *m_dc;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxGtkPrintDialog)
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxGtkPageSetupDialog
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGtkPageSetupDialog: public wxPageSetupDialogBase
|
||||
{
|
||||
public:
|
||||
wxGtkPageSetupDialog( wxWindow *parent,
|
||||
wxPageSetupDialogData* data = NULL );
|
||||
virtual ~wxGtkPageSetupDialog();
|
||||
|
||||
virtual wxPageSetupDialogData& GetPageSetupDialogData() { return m_pageDialogData; }
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
virtual bool Validate() { return true; }
|
||||
virtual bool TransferDataToWindow() { return true; }
|
||||
virtual bool TransferDataFromWindow() { return true; }
|
||||
|
||||
protected:
|
||||
// Implement some base class methods to do nothing to avoid asserts and
|
||||
// GTK warnings, since this is not a real wxDialog.
|
||||
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(width), int WXUNUSED(height),
|
||||
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
|
||||
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
|
||||
int WXUNUSED(width), int WXUNUSED(height)) {}
|
||||
|
||||
private:
|
||||
wxPageSetupDialogData m_pageDialogData;
|
||||
wxWindow *m_parent;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxGtkPageSetupDialog)
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxGtkPrinter
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGtkPrinter : public wxPrinterBase
|
||||
{
|
||||
public:
|
||||
wxGtkPrinter(wxPrintDialogData *data = NULL);
|
||||
virtual ~wxGtkPrinter();
|
||||
|
||||
virtual bool Print(wxWindow *parent,
|
||||
wxPrintout *printout,
|
||||
bool prompt = true);
|
||||
virtual wxDC* PrintDialog(wxWindow *parent);
|
||||
virtual bool Setup(wxWindow *parent);
|
||||
|
||||
GtkPrintContext *GetPrintContext() { return m_gpc; }
|
||||
void SetPrintContext(GtkPrintContext *context) {m_gpc = context;}
|
||||
void BeginPrint(wxPrintout *printout, GtkPrintOperation *operation, GtkPrintContext *context);
|
||||
void DrawPage(wxPrintout *printout, GtkPrintOperation *operation, GtkPrintContext *context, int page_nr);
|
||||
|
||||
private:
|
||||
GtkPrintContext *m_gpc;
|
||||
wxDC *m_dc;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxGtkPrinter)
|
||||
wxDECLARE_NO_COPY_CLASS(wxGtkPrinter);
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// wxGtkPrintNativeData
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGtkPrintNativeData : public wxPrintNativeDataBase
|
||||
{
|
||||
public:
|
||||
wxGtkPrintNativeData();
|
||||
virtual ~wxGtkPrintNativeData();
|
||||
|
||||
virtual bool TransferTo( wxPrintData &data );
|
||||
virtual bool TransferFrom( const wxPrintData &data );
|
||||
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const { return true; }
|
||||
|
||||
GtkPrintSettings* GetPrintConfig() { return m_config; }
|
||||
void SetPrintConfig( GtkPrintSettings * config );
|
||||
|
||||
GtkPrintOperation* GetPrintJob() { return m_job; }
|
||||
|
||||
GtkPrintContext *GetPrintContext() { return m_context; }
|
||||
void SetPrintContext(GtkPrintContext *context) {m_context = context; }
|
||||
|
||||
|
||||
GtkPageSetup* GetPageSetupFromSettings(GtkPrintSettings* settings);
|
||||
void SetPageSetupToSettings(GtkPrintSettings* settings, GtkPageSetup* page_setup);
|
||||
|
||||
private:
|
||||
GtkPrintSettings *m_config;
|
||||
GtkPrintOperation *m_job;
|
||||
GtkPrintContext *m_context;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxGtkPrintNativeData)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxGtkPrinterDC
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGtkPrinterDCImpl : public wxDCImpl
|
||||
{
|
||||
public:
|
||||
wxGtkPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data );
|
||||
virtual ~wxGtkPrinterDCImpl();
|
||||
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const;
|
||||
|
||||
virtual void* GetCairoContext() const;
|
||||
|
||||
bool CanDrawBitmap() const { return true; }
|
||||
void Clear();
|
||||
void SetFont( const wxFont& font );
|
||||
void SetPen( const wxPen& pen );
|
||||
void SetBrush( const wxBrush& brush );
|
||||
void SetLogicalFunction( wxRasterOperationMode function );
|
||||
void SetBackground( const wxBrush& brush );
|
||||
void DestroyClippingRegion();
|
||||
bool StartDoc(const wxString& message);
|
||||
void EndDoc();
|
||||
void StartPage();
|
||||
void EndPage();
|
||||
wxCoord GetCharHeight() const;
|
||||
wxCoord GetCharWidth() const;
|
||||
bool CanGetTextExtent() const { return true; }
|
||||
wxSize GetPPI() const;
|
||||
virtual int GetDepth() const { return 24; }
|
||||
void SetBackgroundMode(int mode);
|
||||
void SetPalette(const wxPalette& WXUNUSED(palette)) { }
|
||||
void SetResolution(int ppi);
|
||||
|
||||
// overriden for wxPrinterDC Impl
|
||||
virtual int GetResolution() const;
|
||||
virtual wxRect GetPaperRect() const;
|
||||
|
||||
protected:
|
||||
bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col,
|
||||
wxFloodFillStyle style=wxFLOOD_SURFACE );
|
||||
void DoGradientFillConcentric(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour, const wxPoint& circleCenter);
|
||||
void DoGradientFillLinear(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour, wxDirection nDirection = wxEAST);
|
||||
bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const;
|
||||
void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
|
||||
void DoCrossHair(wxCoord x, wxCoord y);
|
||||
void DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc);
|
||||
void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea);
|
||||
void DoDrawPoint(wxCoord x, wxCoord y);
|
||||
void DoDrawLines(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0);
|
||||
void DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE);
|
||||
void DoDrawPolyPolygon(int n, int count[], wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE);
|
||||
void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0);
|
||||
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
#if wxUSE_SPLINES
|
||||
void DoDrawSpline(const wxPointList *points);
|
||||
#endif
|
||||
bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
||||
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
||||
wxRasterOperationMode rop = wxCOPY, bool useMask = false,
|
||||
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
|
||||
void DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y );
|
||||
void DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false );
|
||||
void DoDrawText(const wxString& text, wxCoord x, wxCoord y );
|
||||
void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
|
||||
void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
void DoSetDeviceClippingRegion( const wxRegion &WXUNUSED(clip) )
|
||||
{
|
||||
wxFAIL_MSG( "not implemented" );
|
||||
}
|
||||
void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
|
||||
wxCoord *descent = NULL,
|
||||
wxCoord *externalLeading = NULL,
|
||||
const wxFont *theFont = NULL ) const;
|
||||
void DoGetSize(int* width, int* height) const;
|
||||
void DoGetSizeMM(int *width, int *height) const;
|
||||
|
||||
wxPrintData& GetPrintData() { return m_printData; }
|
||||
void SetPrintData(const wxPrintData& data);
|
||||
|
||||
private:
|
||||
wxPrintData m_printData;
|
||||
PangoContext *m_context;
|
||||
PangoLayout *m_layout;
|
||||
PangoFontDescription *m_fontdesc;
|
||||
cairo_t *m_cairo;
|
||||
|
||||
unsigned char m_currentRed;
|
||||
unsigned char m_currentGreen;
|
||||
unsigned char m_currentBlue;
|
||||
unsigned char m_currentAlpha;
|
||||
|
||||
GtkPrintContext *m_gpc;
|
||||
int m_resolution;
|
||||
double m_PS2DEV;
|
||||
double m_DEV2PS;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxGtkPrinterDCImpl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxGtkPrinterDCImpl);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGtkPrintPreview: programmer creates an object of this class to preview a
|
||||
// wxPrintout.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGtkPrintPreview : public wxPrintPreviewBase
|
||||
{
|
||||
public:
|
||||
wxGtkPrintPreview(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting = NULL,
|
||||
wxPrintDialogData *data = NULL);
|
||||
wxGtkPrintPreview(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting,
|
||||
wxPrintData *data);
|
||||
|
||||
virtual ~wxGtkPrintPreview();
|
||||
|
||||
virtual bool Print(bool interactive);
|
||||
virtual void DetermineScaling();
|
||||
|
||||
private:
|
||||
void Init(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting,
|
||||
wxPrintData *data);
|
||||
|
||||
// resolution to use in DPI
|
||||
int m_resolution;
|
||||
|
||||
DECLARE_CLASS(wxGtkPrintPreview)
|
||||
};
|
||||
|
||||
#endif // wxUSE_GTKPRINT
|
||||
|
||||
#endif // _WX_GTK_PRINT_H_
|
116
Externals/wxWidgets3/include/wx/gtk/private.h
vendored
Normal file
116
Externals/wxWidgets3/include/wx/gtk/private.h
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/private.h
|
||||
// Purpose: wxGTK private macros, functions &c
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 12.03.02
|
||||
// RCS-ID: $Id: private.h 63805 2010-03-30 16:14:11Z PC $
|
||||
// Copyright: (c) 2002 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_PRIVATE_H_
|
||||
#define _WX_GTK_PRIVATE_H_
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "wx/gtk/private/string.h"
|
||||
|
||||
// pango_version_check symbol is quite recent ATM (4/2007)... so we
|
||||
// use our own wrapper which implements a smart trick.
|
||||
// Use this function as you'd use pango_version_check:
|
||||
//
|
||||
// if (!wx_pango_version_check(1,18,0))
|
||||
// ... call to a function available only in pango >= 1.18 ...
|
||||
//
|
||||
// and use it only to test for pango versions >= 1.16.0
|
||||
extern const gchar *wx_pango_version_check(int major, int minor, int micro);
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
#define wxGTK_CONV(s) s.utf8_str()
|
||||
#define wxGTK_CONV_ENC(s, enc) wxGTK_CONV((s))
|
||||
#define wxGTK_CONV_FONT(s, font) wxGTK_CONV((s))
|
||||
#define wxGTK_CONV_SYS(s) wxGTK_CONV((s))
|
||||
|
||||
#define wxGTK_CONV_BACK(s) wxString::FromUTF8Unchecked(s)
|
||||
#define wxGTK_CONV_BACK_ENC(s, enc) wxGTK_CONV_BACK(s)
|
||||
#define wxGTK_CONV_BACK_FONT(s, font) wxGTK_CONV_BACK(s)
|
||||
#define wxGTK_CONV_BACK_SYS(s) wxGTK_CONV_BACK(s)
|
||||
#else
|
||||
#include "wx/font.h"
|
||||
|
||||
// convert the text between the given encoding and UTF-8 used by wxGTK
|
||||
extern WXDLLIMPEXP_CORE wxCharBuffer
|
||||
wxConvertToGTK(const wxString& s,
|
||||
wxFontEncoding enc = wxFONTENCODING_SYSTEM);
|
||||
|
||||
extern WXDLLIMPEXP_CORE wxCharBuffer
|
||||
wxConvertFromGTK(const wxString& s,
|
||||
wxFontEncoding enc = wxFONTENCODING_SYSTEM);
|
||||
|
||||
// helper: use the encoding of the given font if it's valid
|
||||
inline wxCharBuffer wxConvertToGTK(const wxString& s, const wxFont& font)
|
||||
{
|
||||
return wxConvertToGTK(s, font.Ok() ? font.GetEncoding()
|
||||
: wxFONTENCODING_SYSTEM);
|
||||
}
|
||||
|
||||
inline wxCharBuffer wxConvertFromGTK(const wxString& s, const wxFont& font)
|
||||
{
|
||||
return wxConvertFromGTK(s, font.Ok() ? font.GetEncoding()
|
||||
: wxFONTENCODING_SYSTEM);
|
||||
}
|
||||
|
||||
// more helpers: allow passing GTK+ strings directly
|
||||
inline wxCharBuffer
|
||||
wxConvertFromGTK(const wxGtkString& gs,
|
||||
wxFontEncoding enc = wxFONTENCODING_SYSTEM)
|
||||
{
|
||||
return wxConvertFromGTK(gs.c_str(), enc);
|
||||
}
|
||||
|
||||
inline wxCharBuffer
|
||||
wxConvertFromGTK(const wxGtkString& gs, const wxFont& font)
|
||||
{
|
||||
return wxConvertFromGTK(gs.c_str(), font);
|
||||
}
|
||||
|
||||
#define wxGTK_CONV(s) wxGTK_CONV_FONT((s), m_font)
|
||||
#define wxGTK_CONV_ENC(s, enc) wxConvertToGTK((s), (enc))
|
||||
#define wxGTK_CONV_FONT(s, font) wxConvertToGTK((s), (font))
|
||||
#define wxGTK_CONV_SYS(s) wxConvertToGTK((s))
|
||||
|
||||
#define wxGTK_CONV_BACK(s) wxConvertFromGTK((s), m_font)
|
||||
#define wxGTK_CONV_BACK_ENC(s, enc) wxConvertFromGTK((s), (enc))
|
||||
#define wxGTK_CONV_BACK_FONT(s, font) wxConvertFromGTK((s), (font))
|
||||
#define wxGTK_CONV_BACK_SYS(s) wxConvertFromGTK((s))
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// various private helper functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
namespace wxGTKPrivate
|
||||
{
|
||||
|
||||
// these functions create the GTK widgets of the specified types which can then
|
||||
// used to retrieve their styles, pass them to drawing functions &c
|
||||
//
|
||||
// the returned widgets shouldn't be destroyed, this is done automatically on
|
||||
// shutdown
|
||||
GtkWidget *GetButtonWidget();
|
||||
GtkWidget *GetCheckButtonWidget();
|
||||
GtkWidget *GetComboBoxWidget();
|
||||
GtkWidget *GetEntryWidget();
|
||||
GtkWidget *GetHeaderButtonWidgetFirst();
|
||||
GtkWidget *GetHeaderButtonWidgetLast();
|
||||
GtkWidget *GetHeaderButtonWidget();
|
||||
GtkWidget *GetRadioButtonWidget();
|
||||
GtkWidget *GetSplitterWidget();
|
||||
GtkWidget *GetTextEntryWidget();
|
||||
GtkWidget *GetTreeWidget();
|
||||
|
||||
} // wxGTKPrivate
|
||||
|
||||
#endif // _WX_GTK_PRIVATE_H_
|
||||
|
33
Externals/wxWidgets3/include/wx/gtk/private/gdkconv.h
vendored
Normal file
33
Externals/wxWidgets3/include/wx/gtk/private/gdkconv.h
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/private/gdkconv.h
|
||||
// Purpose: Helper functions for converting between GDK and wx types
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2009-11-10
|
||||
// RCS-ID: $Id: gdkconv.h 64140 2010-04-25 21:33:16Z FM $
|
||||
// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _GTK_PRIVATE_GDKCONV_H_
|
||||
#define _GTK_PRIVATE_GDKCONV_H_
|
||||
|
||||
namespace wxGTKImpl
|
||||
{
|
||||
|
||||
inline wxRect wxRectFromGDKRect(const GdkRectangle *r)
|
||||
{
|
||||
return wxRect(r->x, r->y, r->width, r->height);
|
||||
}
|
||||
|
||||
inline void wxRectToGDKRect(const wxRect& rect, GdkRectangle& r)
|
||||
{
|
||||
r.x = rect.x;
|
||||
r.y = rect.y;
|
||||
r.width = rect.width;
|
||||
r.height = rect.height;
|
||||
}
|
||||
|
||||
} // namespace wxGTKImpl
|
||||
|
||||
#endif // _GTK_PRIVATE_GDKCONV_H_
|
||||
|
45
Externals/wxWidgets3/include/wx/gtk/private/messagetype.h
vendored
Normal file
45
Externals/wxWidgets3/include/wx/gtk/private/messagetype.h
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/private/messagetype.h
|
||||
// Purpose: translate between wx and GtkMessageType
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2009-09-27
|
||||
// RCS-ID: $Id: messagetype.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _GTK_PRIVATE_MSGTYPE_H_
|
||||
#define _GTK_PRIVATE_MSGTYPE_H_
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
namespace wxGTKImpl
|
||||
{
|
||||
|
||||
// Convert the given wx style to GtkMessageType, return true if succeeded or
|
||||
// false if failed.
|
||||
inline bool ConvertMessageTypeFromWX(int style, GtkMessageType *type)
|
||||
{
|
||||
#ifdef __WXGTK210__
|
||||
if ( gtk_check_version(2, 10, 0) == NULL && (style & wxICON_NONE))
|
||||
*type = GTK_MESSAGE_OTHER;
|
||||
else
|
||||
#endif // __WXGTK210__
|
||||
if (style & wxICON_EXCLAMATION)
|
||||
*type = GTK_MESSAGE_WARNING;
|
||||
else if (style & wxICON_ERROR)
|
||||
*type = GTK_MESSAGE_ERROR;
|
||||
else if (style & wxICON_INFORMATION)
|
||||
*type = GTK_MESSAGE_INFO;
|
||||
else if (style & wxICON_QUESTION)
|
||||
*type = GTK_MESSAGE_QUESTION;
|
||||
else
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace wxGTKImpl
|
||||
|
||||
#endif // _GTK_PRIVATE_MSGTYPE_H_
|
||||
|
39
Externals/wxWidgets3/include/wx/gtk/private/mnemonics.h
vendored
Normal file
39
Externals/wxWidgets3/include/wx/gtk/private/mnemonics.h
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/private/mnemonics.h
|
||||
// Purpose: helper functions for dealing with GTK+ mnemonics
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2007-11-12
|
||||
// RCS-ID: $Id: mnemonics.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _GTK_PRIVATE_MNEMONICS_H_
|
||||
#define _GTK_PRIVATE_MNEMONICS_H_
|
||||
|
||||
#if wxUSE_CONTROLS || wxUSE_MENUS
|
||||
|
||||
#include "wx/string.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// functions to convert between wxWidgets and GTK+ string containing mnemonics
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// remove all mnemonics from a string
|
||||
wxString wxGTKRemoveMnemonics(const wxString& label);
|
||||
|
||||
// convert a wx string with '&' to GTK+ string with '_'s
|
||||
wxString wxConvertMnemonicsToGTK(const wxString& label);
|
||||
|
||||
// convert a wx string with '&' to indicate mnemonics as well as HTML entities
|
||||
// to a GTK+ string with "&" used instead of '&', i.e. suitable for use
|
||||
// with GTK+ functions using markup strings
|
||||
wxString wxConvertMnemonicsToGTKMarkup(const wxString& label);
|
||||
|
||||
// convert GTK+ string with '_'s to wx string with '&'s
|
||||
wxString wxConvertMnemonicsFromGTK(const wxString& label);
|
||||
|
||||
#endif // wxUSE_CONTROLS || wxUSE_MENUS
|
||||
|
||||
#endif // _GTK_PRIVATE_MNEMONICS_H_
|
||||
|
36
Externals/wxWidgets3/include/wx/gtk/private/object.h
vendored
Normal file
36
Externals/wxWidgets3/include/wx/gtk/private/object.h
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/private/object.h
|
||||
// Purpose: wxGtkObject class declaration
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2008-08-27
|
||||
// RCS-ID: $Id: object.h 58757 2009-02-08 11:45:59Z VZ $
|
||||
// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_PRIVATE_OBJECT_H_
|
||||
#define _WX_GTK_PRIVATE_OBJECT_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Convenience class for calling g_object_unref() automatically
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
template <typename T>
|
||||
class wxGtkObject
|
||||
{
|
||||
public:
|
||||
explicit wxGtkObject(T *p) : m_ptr(p) { }
|
||||
~wxGtkObject() { g_object_unref(m_ptr); }
|
||||
|
||||
operator T *() const { return m_ptr; }
|
||||
|
||||
private:
|
||||
T * const m_ptr;
|
||||
|
||||
// copying could be implemented by using g_object_ref() but for now there
|
||||
// is no need for it so don't implement it
|
||||
wxDECLARE_NO_COPY_CLASS(wxGtkObject);
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_PRIVATE_OBJECT_H_
|
||||
|
121
Externals/wxWidgets3/include/wx/gtk/private/string.h
vendored
Normal file
121
Externals/wxWidgets3/include/wx/gtk/private/string.h
vendored
Normal file
@ -0,0 +1,121 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/private/string.h
|
||||
// Purpose: wxGtkString class declaration
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2006-10-19
|
||||
// RCS-ID: $Id: string.h 65680 2010-09-30 11:44:45Z VZ $
|
||||
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_PRIVATE_STRING_H_
|
||||
#define _WX_GTK_PRIVATE_STRING_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Convenience class for g_freeing a gchar* on scope exit automatically
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxGtkString
|
||||
{
|
||||
public:
|
||||
explicit wxGtkString(gchar *s) : m_str(s) { }
|
||||
~wxGtkString() { g_free(m_str); }
|
||||
|
||||
const gchar *c_str() const { return m_str; }
|
||||
|
||||
operator gchar *() const { return m_str; }
|
||||
|
||||
private:
|
||||
gchar *m_str;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxGtkString);
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// list for sorting collated strings
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/string.h"
|
||||
#include "wx/vector.h"
|
||||
#include "wx/sharedptr.h"
|
||||
|
||||
class wxGtkCollatableString
|
||||
{
|
||||
public:
|
||||
wxGtkCollatableString( const wxString &label, gchar *key )
|
||||
{
|
||||
m_label = label;
|
||||
m_key = key;
|
||||
}
|
||||
|
||||
~wxGtkCollatableString()
|
||||
{
|
||||
if (m_key)
|
||||
g_free( m_key );
|
||||
}
|
||||
|
||||
wxString m_label;
|
||||
gchar *m_key;
|
||||
};
|
||||
|
||||
class wxGtkCollatedArrayString
|
||||
{
|
||||
public:
|
||||
wxGtkCollatedArrayString() { }
|
||||
|
||||
int Add( const wxString &new_label )
|
||||
{
|
||||
int index = 0;
|
||||
|
||||
gchar *new_key_lower = g_utf8_casefold( new_label.utf8_str(), -1);
|
||||
gchar *new_key = g_utf8_collate_key( new_key_lower, -1);
|
||||
g_free( new_key_lower );
|
||||
|
||||
wxSharedPtr<wxGtkCollatableString> new_ptr( new wxGtkCollatableString( new_label, new_key ) );
|
||||
|
||||
wxVector< wxSharedPtr<wxGtkCollatableString> >::iterator iter;
|
||||
for (iter = m_list.begin(); iter != m_list.end(); ++iter)
|
||||
{
|
||||
wxSharedPtr<wxGtkCollatableString> ptr = *iter;
|
||||
|
||||
gchar *key = ptr->m_key;
|
||||
if (strcmp(key,new_key) >= 0)
|
||||
{
|
||||
m_list.insert( iter, new_ptr );
|
||||
return index;
|
||||
}
|
||||
index ++;
|
||||
}
|
||||
|
||||
m_list.push_back( new_ptr );
|
||||
return index;
|
||||
}
|
||||
|
||||
size_t GetCount()
|
||||
{
|
||||
return m_list.size();
|
||||
}
|
||||
|
||||
wxString At( size_t index )
|
||||
{
|
||||
return m_list[index]->m_label;
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
m_list.clear();
|
||||
}
|
||||
|
||||
void RemoveAt( size_t index )
|
||||
{
|
||||
m_list.erase( m_list.begin() + index );
|
||||
}
|
||||
|
||||
private:
|
||||
wxVector< wxSharedPtr<wxGtkCollatableString> > m_list;
|
||||
};
|
||||
|
||||
|
||||
#endif // _WX_GTK_PRIVATE_STRING_H_
|
||||
|
36
Externals/wxWidgets3/include/wx/gtk/private/timer.h
vendored
Normal file
36
Externals/wxWidgets3/include/wx/gtk/private/timer.h
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/private/timer.h
|
||||
// Purpose: wxTimerImpl for wxGTK
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: timer.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_PRIVATE_TIMER_H_
|
||||
#define _WX_GTK_PRIVATE_TIMER_H_
|
||||
|
||||
#if wxUSE_TIMER
|
||||
|
||||
#include "wx/private/timer.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxTimer
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGTKTimerImpl : public wxTimerImpl
|
||||
{
|
||||
public:
|
||||
wxGTKTimerImpl(wxTimer* timer) : wxTimerImpl(timer) { m_sourceId = 0; };
|
||||
|
||||
virtual bool Start( int millisecs = -1, bool oneShot = false );
|
||||
virtual void Stop();
|
||||
virtual bool IsRunning() const { return m_sourceId != 0; }
|
||||
|
||||
protected:
|
||||
int m_sourceId;
|
||||
};
|
||||
|
||||
#endif // wxUSE_TIMER
|
||||
|
||||
#endif // _WX_GTK_PRIVATE_TIMER_H_
|
38
Externals/wxWidgets3/include/wx/gtk/private/win_gtk.h
vendored
Normal file
38
Externals/wxWidgets3/include/wx/gtk/private/win_gtk.h
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
/* ///////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/private/win_gtk.h
|
||||
// Purpose: native GTK+ widget for wxWindow
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: win_gtk.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
#ifndef _WX_GTK_PIZZA_H_
|
||||
#define _WX_GTK_PIZZA_H_
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define WX_PIZZA(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, wxPizza::type(), wxPizza)
|
||||
#define WX_IS_PIZZA(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, wxPizza::type())
|
||||
|
||||
struct WXDLLIMPEXP_CORE wxPizza
|
||||
{
|
||||
// borders styles which can be used with wxPizza
|
||||
enum { BORDER_STYLES =
|
||||
wxBORDER_SIMPLE | wxBORDER_RAISED | wxBORDER_SUNKEN | wxBORDER_THEME };
|
||||
|
||||
static GtkWidget* New(long windowStyle = 0);
|
||||
static GType type();
|
||||
void move(GtkWidget* widget, int x, int y);
|
||||
void put(GtkWidget* widget, int x, int y);
|
||||
void scroll(int dx, int dy);
|
||||
void get_border_widths(int& x, int& y);
|
||||
|
||||
GtkFixed m_fixed;
|
||||
int m_scroll_x;
|
||||
int m_scroll_y;
|
||||
int m_border_style;
|
||||
bool m_is_scrollable;
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_PIZZA_H_
|
158
Externals/wxWidgets3/include/wx/gtk/radiobox.h
vendored
Normal file
158
Externals/wxWidgets3/include/wx/gtk/radiobox.h
vendored
Normal file
@ -0,0 +1,158 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/radiobox.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: radiobox.h 60885 2009-06-03 22:33:32Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_RADIOBOX_H_
|
||||
#define _WX_GTK_RADIOBOX_H_
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxGTKRadioButtonInfo;
|
||||
|
||||
#include "wx/list.h"
|
||||
|
||||
WX_DECLARE_EXPORTED_LIST(wxGTKRadioButtonInfo, wxRadioBoxButtonsInfoList);
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxRadioBox
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxRadioBox : public wxControl,
|
||||
public wxRadioBoxBase
|
||||
{
|
||||
public:
|
||||
// ctors and dtor
|
||||
wxRadioBox() { Init(); }
|
||||
wxRadioBox(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0,
|
||||
const wxString choices[] = (const wxString *) NULL,
|
||||
int majorDim = 0,
|
||||
long style = wxRA_SPECIFY_COLS,
|
||||
const wxValidator& val = wxDefaultValidator,
|
||||
const wxString& name = wxRadioBoxNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name );
|
||||
}
|
||||
|
||||
wxRadioBox(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
int majorDim = 0,
|
||||
long style = wxRA_SPECIFY_COLS,
|
||||
const wxValidator& val = wxDefaultValidator,
|
||||
const wxString& name = wxRadioBoxNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create( parent, id, title, pos, size, choices, majorDim, style, val, name );
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0,
|
||||
const wxString choices[] = (const wxString *) NULL,
|
||||
int majorDim = 0,
|
||||
long style = wxRA_SPECIFY_COLS,
|
||||
const wxValidator& val = wxDefaultValidator,
|
||||
const wxString& name = wxRadioBoxNameStr);
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
int majorDim = 0,
|
||||
long style = wxRA_SPECIFY_COLS,
|
||||
const wxValidator& val = wxDefaultValidator,
|
||||
const wxString& name = wxRadioBoxNameStr);
|
||||
|
||||
virtual ~wxRadioBox();
|
||||
|
||||
|
||||
// implement wxItemContainerImmutable methods
|
||||
virtual unsigned int GetCount() const;
|
||||
|
||||
virtual wxString GetString(unsigned int n) const;
|
||||
virtual void SetString(unsigned int n, const wxString& s);
|
||||
|
||||
virtual void SetSelection(int n);
|
||||
virtual int GetSelection() const;
|
||||
|
||||
|
||||
// implement wxRadioBoxBase methods
|
||||
virtual bool Show(unsigned int n, bool show = true);
|
||||
virtual bool Enable(unsigned int n, bool enable = true);
|
||||
|
||||
virtual bool IsItemEnabled(unsigned int n) const;
|
||||
virtual bool IsItemShown(unsigned int n) const;
|
||||
|
||||
|
||||
// override some base class methods to operate on radiobox itself too
|
||||
virtual bool Show( bool show = true );
|
||||
virtual bool Enable( bool enable = true );
|
||||
|
||||
virtual void SetLabel( const wxString& label );
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
virtual int GetItemFromPoint( const wxPoint& pt ) const;
|
||||
#if wxUSE_HELP
|
||||
// override virtual wxWindow::GetHelpTextAtPoint to use common platform independent
|
||||
// wxRadioBoxBase::DoGetHelpTextAtPoint from the platform independent
|
||||
// base class-interface wxRadioBoxBase.
|
||||
virtual wxString GetHelpTextAtPoint(const wxPoint & pt, wxHelpEvent::Origin origin) const
|
||||
{
|
||||
return wxRadioBoxBase::DoGetHelpTextAtPoint( this, pt, origin );
|
||||
}
|
||||
#endif // wxUSE_HELP
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
void GtkDisableEvents();
|
||||
void GtkEnableEvents();
|
||||
#if wxUSE_TOOLTIPS
|
||||
void GTKApplyToolTip( GtkTooltips *tips, const gchar *tip );
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
|
||||
wxRadioBoxButtonsInfoList m_buttonsInfo;
|
||||
|
||||
protected:
|
||||
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
|
||||
|
||||
#if wxUSE_TOOLTIPS
|
||||
virtual void DoSetItemToolTip(unsigned int n, wxToolTip *tooltip);
|
||||
#endif
|
||||
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
virtual bool GTKNeedsToFilterSameWindowFocus() const { return true; }
|
||||
|
||||
virtual bool GTKWidgetNeedsMnemonic() const;
|
||||
virtual void GTKWidgetDoSetMnemonic(GtkWidget* w);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_RADIOBOX_H_
|
62
Externals/wxWidgets3/include/wx/gtk/radiobut.h
vendored
Normal file
62
Externals/wxWidgets3/include/wx/gtk/radiobut.h
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/radiobut.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: radiobut.h 62785 2009-12-05 19:25:04Z PC $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_RADIOBUT_H_
|
||||
#define _WX_GTK_RADIOBUT_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxRadioButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxRadioButton: public wxControl
|
||||
{
|
||||
public:
|
||||
wxRadioButton() { }
|
||||
wxRadioButton( 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 = wxRadioButtonNameStr )
|
||||
{
|
||||
Create( parent, id, label, pos, size, style, validator, name );
|
||||
}
|
||||
|
||||
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 = wxRadioButtonNameStr );
|
||||
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual void SetValue(bool val);
|
||||
virtual bool GetValue() const;
|
||||
virtual bool Enable( bool enable = true );
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
protected:
|
||||
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
|
||||
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
private:
|
||||
typedef wxControl base_type;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxRadioButton)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_RADIOBUT_H_
|
137
Externals/wxWidgets3/include/wx/gtk/region.h
vendored
Normal file
137
Externals/wxWidgets3/include/wx/gtk/region.h
vendored
Normal file
@ -0,0 +1,137 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/region.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: region.h 61724 2009-08-21 10:41:26Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_REGION_H_
|
||||
#define _WX_GTK_REGION_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxRegion
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxRegion : public wxRegionBase
|
||||
{
|
||||
public:
|
||||
wxRegion() { }
|
||||
|
||||
wxRegion( wxCoord x, wxCoord y, wxCoord w, wxCoord h )
|
||||
{
|
||||
InitRect(x, y, w, h);
|
||||
}
|
||||
|
||||
wxRegion( const wxPoint& topLeft, const wxPoint& bottomRight )
|
||||
{
|
||||
InitRect(topLeft.x, topLeft.y,
|
||||
bottomRight.x - topLeft.x, bottomRight.y - topLeft.y);
|
||||
}
|
||||
|
||||
wxRegion( const wxRect& rect )
|
||||
{
|
||||
InitRect(rect.x, rect.y, rect.width, rect.height);
|
||||
}
|
||||
|
||||
wxRegion( size_t n, const wxPoint *points,
|
||||
wxPolygonFillMode fillStyle = wxODDEVEN_RULE );
|
||||
|
||||
#if wxUSE_IMAGE
|
||||
wxRegion( const wxBitmap& bmp)
|
||||
{
|
||||
Union(bmp);
|
||||
}
|
||||
wxRegion( const wxBitmap& bmp,
|
||||
const wxColour& transColour, int tolerance = 0)
|
||||
{
|
||||
Union(bmp, transColour, tolerance);
|
||||
}
|
||||
#endif // wxUSE_IMAGE
|
||||
|
||||
virtual ~wxRegion();
|
||||
|
||||
// wxRegionBase methods
|
||||
virtual void Clear();
|
||||
virtual bool IsEmpty() const;
|
||||
|
||||
public:
|
||||
// Init with GdkRegion, set ref count to 2 so that
|
||||
// the C++ class will not destroy the region!
|
||||
wxRegion( GdkRegion *region );
|
||||
|
||||
GdkRegion *GetRegion() const;
|
||||
|
||||
protected:
|
||||
virtual wxGDIRefData *CreateGDIRefData() const;
|
||||
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
||||
|
||||
// wxRegionBase pure virtuals
|
||||
virtual bool DoIsEqual(const wxRegion& region) const;
|
||||
virtual bool DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const;
|
||||
virtual wxRegionContain DoContainsPoint(wxCoord x, wxCoord y) const;
|
||||
virtual wxRegionContain DoContainsRect(const wxRect& rect) const;
|
||||
|
||||
virtual bool DoOffset(wxCoord x, wxCoord y);
|
||||
virtual bool DoUnionWithRect(const wxRect& rect);
|
||||
virtual bool DoUnionWithRegion(const wxRegion& region);
|
||||
virtual bool DoIntersect(const wxRegion& region);
|
||||
virtual bool DoSubtract(const wxRegion& region);
|
||||
virtual bool DoXor(const wxRegion& region);
|
||||
|
||||
// common part of ctors for a rectangle region
|
||||
void InitRect(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxRegion)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxRegionIterator: decomposes a region into rectangles
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxRegionIterator: public wxObject
|
||||
{
|
||||
public:
|
||||
wxRegionIterator();
|
||||
wxRegionIterator(const wxRegion& region);
|
||||
wxRegionIterator(const wxRegionIterator& ri) : wxObject(ri) { Init(); *this = ri; }
|
||||
~wxRegionIterator();
|
||||
|
||||
wxRegionIterator& operator=(const wxRegionIterator& ri);
|
||||
|
||||
void Reset() { m_current = 0u; }
|
||||
void Reset(const wxRegion& region);
|
||||
|
||||
bool HaveRects() const;
|
||||
operator bool () const { return HaveRects(); }
|
||||
|
||||
wxRegionIterator& operator ++ ();
|
||||
wxRegionIterator operator ++ (int);
|
||||
|
||||
wxCoord GetX() const;
|
||||
wxCoord GetY() const;
|
||||
wxCoord GetW() const;
|
||||
wxCoord GetWidth() const { return GetW(); }
|
||||
wxCoord GetH() const;
|
||||
wxCoord GetHeight() const { return GetH(); }
|
||||
wxRect GetRect() const;
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void CreateRects( const wxRegion& r );
|
||||
|
||||
size_t m_current;
|
||||
wxRegion m_region;
|
||||
|
||||
wxRect *m_rects;
|
||||
size_t m_numRects;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxRegionIterator)
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
// _WX_GTK_REGION_H_
|
67
Externals/wxWidgets3/include/wx/gtk/scrolbar.h
vendored
Normal file
67
Externals/wxWidgets3/include/wx/gtk/scrolbar.h
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/scrolbar.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: scrolbar.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_SCROLLBAR_H_
|
||||
#define _WX_GTK_SCROLLBAR_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxScrollBar;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxScrollBar
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxScrollBar: public wxScrollBarBase
|
||||
{
|
||||
public:
|
||||
wxScrollBar();
|
||||
inline wxScrollBar( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSB_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxScrollBarNameStr )
|
||||
{
|
||||
Create( parent, id, pos, size, style, validator, name );
|
||||
}
|
||||
bool Create( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSB_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxScrollBarNameStr );
|
||||
virtual ~wxScrollBar();
|
||||
int GetThumbPosition() const;
|
||||
int GetThumbSize() const;
|
||||
int GetPageSize() const;
|
||||
int GetRange() const;
|
||||
virtual void SetThumbPosition( int viewStart );
|
||||
virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
|
||||
bool refresh = true );
|
||||
|
||||
void SetThumbSize(int thumbSize);
|
||||
void SetPageSize( int pageLength );
|
||||
void SetRange(int range);
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
protected:
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxScrollBar)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_SCROLLBAR_H_
|
78
Externals/wxWidgets3/include/wx/gtk/scrolwin.h
vendored
Normal file
78
Externals/wxWidgets3/include/wx/gtk/scrolwin.h
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/scrolwin.h
|
||||
// Purpose: wxScrolledWindow class
|
||||
// Author: Robert Roebling
|
||||
// Modified by: Vadim Zeitlin (2005-10-10): wxScrolledWindow is now common
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id: scrolwin.h 58773 2009-02-08 20:51:44Z PC $
|
||||
// Copyright: (c) Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_SCROLLWIN_H_
|
||||
#define _WX_GTK_SCROLLWIN_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxScrolledWindow
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxScrollHelper : public wxScrollHelperBase
|
||||
{
|
||||
typedef wxScrollHelperBase base_type;
|
||||
public:
|
||||
// default ctor doesn't do anything
|
||||
wxScrollHelper(wxWindow *win) : wxScrollHelperBase(win) { }
|
||||
|
||||
// implement the base class methods
|
||||
virtual void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY,
|
||||
int noUnitsX, int noUnitsY,
|
||||
int xPos = 0, int yPos = 0,
|
||||
bool noRefresh = false);
|
||||
virtual void AdjustScrollbars();
|
||||
|
||||
protected:
|
||||
virtual void DoScroll(int x, int y);
|
||||
virtual void DoShowScrollbars(wxScrollbarVisibility horz,
|
||||
wxScrollbarVisibility vert);
|
||||
|
||||
private:
|
||||
// this does (each) half of AdjustScrollbars() work
|
||||
void DoAdjustScrollbar(GtkRange* range,
|
||||
int pixelsPerLine,
|
||||
int winSize,
|
||||
int virtSize,
|
||||
int *pos,
|
||||
int *lines,
|
||||
int *linesPerPage);
|
||||
|
||||
void DoAdjustHScrollbar(int winSize, int virtSize)
|
||||
{
|
||||
DoAdjustScrollbar
|
||||
(
|
||||
m_win->m_scrollBar[wxWindow::ScrollDir_Horz],
|
||||
m_xScrollPixelsPerLine, winSize, virtSize,
|
||||
&m_xScrollPosition, &m_xScrollLines, &m_xScrollLinesPerPage
|
||||
);
|
||||
}
|
||||
|
||||
void DoAdjustVScrollbar(int winSize, int virtSize)
|
||||
{
|
||||
DoAdjustScrollbar
|
||||
(
|
||||
m_win->m_scrollBar[wxWindow::ScrollDir_Vert],
|
||||
m_yScrollPixelsPerLine, winSize, virtSize,
|
||||
&m_yScrollPosition, &m_yScrollLines, &m_yScrollLinesPerPage
|
||||
);
|
||||
}
|
||||
|
||||
// and this does the same for Scroll()
|
||||
void DoScrollOneDir(int orient,
|
||||
int pos,
|
||||
int pixelsPerLine,
|
||||
int *posOld);
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxScrollHelper);
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_SCROLLWIN_H_
|
||||
|
84
Externals/wxWidgets3/include/wx/gtk/slider.h
vendored
Normal file
84
Externals/wxWidgets3/include/wx/gtk/slider.h
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/slider.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: slider.h 65680 2010-09-30 11:44:45Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_SLIDER_H_
|
||||
#define _WX_GTK_SLIDER_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxSlider
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxSlider : public wxSliderBase
|
||||
{
|
||||
public:
|
||||
wxSlider();
|
||||
wxSlider(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
int value, int minValue, int maxValue,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSL_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSliderNameStr)
|
||||
{
|
||||
Create( parent, id, value, minValue, maxValue,
|
||||
pos, size, style, validator, name );
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
int value, int minValue, int maxValue,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSL_HORIZONTAL,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxSliderNameStr);
|
||||
|
||||
// implement the base class pure virtuals
|
||||
virtual int GetValue() const;
|
||||
virtual void SetValue(int value);
|
||||
|
||||
virtual void SetRange(int minValue, int maxValue);
|
||||
virtual int GetMin() const;
|
||||
virtual int GetMax() const;
|
||||
|
||||
virtual void SetLineSize(int lineSize);
|
||||
virtual void SetPageSize(int pageSize);
|
||||
virtual int GetLineSize() const;
|
||||
virtual int GetPageSize() const;
|
||||
|
||||
virtual void SetThumbLength(int lenPixels);
|
||||
virtual int GetThumbLength() const;
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
// implementation
|
||||
void GTKDisableEvents();
|
||||
void GTKEnableEvents();
|
||||
bool GTKEventsDisabled() const;
|
||||
|
||||
double m_pos;
|
||||
int m_scrollEventType;
|
||||
bool m_needThumbRelease;
|
||||
GtkWidget *m_scale;
|
||||
|
||||
protected:
|
||||
GtkWidget *m_minLabel,*m_maxLabel;
|
||||
bool m_blockScrollEvent;
|
||||
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
// set the slider value unconditionally
|
||||
void GTKSetValue(int value);
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxSlider)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_SLIDER_H_
|
70
Externals/wxWidgets3/include/wx/gtk/spinbutt.h
vendored
Normal file
70
Externals/wxWidgets3/include/wx/gtk/spinbutt.h
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/spinbutt.h
|
||||
// Purpose: wxSpinButton class
|
||||
// Author: Robert Roebling
|
||||
// Modified by:
|
||||
// RCS-ID: $Id: spinbutt.h 62785 2009-12-05 19:25:04Z PC $
|
||||
// Copyright: (c) Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_SPINBUTT_H_
|
||||
#define _WX_GTK_SPINBUTT_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxSpinButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase
|
||||
{
|
||||
public:
|
||||
wxSpinButton();
|
||||
wxSpinButton(wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_VERTICAL,
|
||||
const wxString& name = wxSPIN_BUTTON_NAME)
|
||||
{
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_VERTICAL,
|
||||
const wxString& name = wxSPIN_BUTTON_NAME);
|
||||
|
||||
virtual int GetValue() const;
|
||||
virtual void SetValue( int value );
|
||||
virtual void SetRange( int minVal, int maxVal );
|
||||
virtual int GetMin() const;
|
||||
virtual int GetMax() const;
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
virtual bool Enable( bool enable = true );
|
||||
|
||||
// implementation
|
||||
void OnSize( wxSizeEvent &event );
|
||||
|
||||
int m_pos;
|
||||
|
||||
protected:
|
||||
void GtkDisableEvents() const;
|
||||
void GtkEnableEvents() const;
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
private:
|
||||
typedef wxSpinButtonBase base_type;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxSpinButton)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_GTK_SPINBUTT_H_
|
187
Externals/wxWidgets3/include/wx/gtk/spinctrl.h
vendored
Normal file
187
Externals/wxWidgets3/include/wx/gtk/spinctrl.h
vendored
Normal file
@ -0,0 +1,187 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/spinctrl.h
|
||||
// Purpose: wxSpinCtrl class
|
||||
// Author: Robert Roebling
|
||||
// Modified by:
|
||||
// RCS-ID: $Id: spinctrl.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_SPINCTRL_H_
|
||||
#define _WX_GTK_SPINCTRL_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxSpinCtrlGTKBase - Base class for GTK versions of the wxSpinCtrl[Double]
|
||||
//
|
||||
// This class manages a double valued GTK spinctrl through the DoGet/SetXXX
|
||||
// functions that are made public as Get/SetXXX functions for int or double
|
||||
// for the wxSpinCtrl and wxSpinCtrlDouble classes respectively to avoid
|
||||
// function ambiguity.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxSpinCtrlGTKBase : public wxSpinCtrlBase
|
||||
{
|
||||
public:
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& value,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
double min, double max, double initial,
|
||||
double inc,
|
||||
const wxString& name);
|
||||
|
||||
// wxSpinCtrl(Double) methods call DoXXX functions of the same name
|
||||
|
||||
// accessors
|
||||
// T GetValue() const
|
||||
// T GetMin() const
|
||||
// T GetMax() const
|
||||
// T GetIncrement() const
|
||||
virtual bool GetSnapToTicks() const;
|
||||
|
||||
// operations
|
||||
virtual void SetValue(const wxString& value);
|
||||
// void SetValue(T val)
|
||||
// void SetRange(T minVal, T maxVal)
|
||||
// void SetIncrement(T inc)
|
||||
void SetSnapToTicks( bool snap_to_ticks );
|
||||
|
||||
// Select text in the textctrl
|
||||
void SetSelection(long from, long to);
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
// implementation
|
||||
void OnChar( wxKeyEvent &event );
|
||||
|
||||
protected:
|
||||
double DoGetValue() const;
|
||||
double DoGetMin() const;
|
||||
double DoGetMax() const;
|
||||
double DoGetIncrement() const;
|
||||
|
||||
void DoSetValue(double val);
|
||||
void DoSetValue(const wxString& strValue);
|
||||
void DoSetRange(double min_val, double max_val);
|
||||
void DoSetIncrement(double inc);
|
||||
|
||||
void GtkDisableEvents() const;
|
||||
void GtkEnableEvents() const;
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
// Widgets that use the style->base colour for the BG colour should
|
||||
// override this and return true.
|
||||
virtual bool UseGTKStyleBase() const { return true; }
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxSpinCtrlGTKBase)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxSpinCtrl - An integer valued spin control
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxSpinCtrl : public wxSpinCtrlGTKBase
|
||||
{
|
||||
public:
|
||||
wxSpinCtrl() {}
|
||||
wxSpinCtrl(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
int min = 0, int max = 100, int initial = 0,
|
||||
const wxString& name = wxS("wxSpinCtrl"))
|
||||
{
|
||||
Create(parent, id, value, pos, size, style, min, max, initial, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
int min = 0, int max = 100, int initial = 0,
|
||||
const wxString& name = wxS("wxSpinCtrl"))
|
||||
{
|
||||
return wxSpinCtrlGTKBase::Create(parent, id, value, pos, size,
|
||||
style, min, max, initial, 1, name);
|
||||
}
|
||||
|
||||
// accessors
|
||||
int GetValue() const { return int(DoGetValue()); }
|
||||
int GetMin() const { return int(DoGetMin()); }
|
||||
int GetMax() const { return int(DoGetMax()); }
|
||||
int GetIncrement() const { return int(DoGetIncrement()); }
|
||||
|
||||
// operations
|
||||
void SetValue(const wxString& value) { wxSpinCtrlGTKBase::SetValue(value); } // visibility problem w/ gcc
|
||||
void SetValue( int value ) { DoSetValue(value); }
|
||||
void SetRange( int minVal, int maxVal ) { DoSetRange(minVal, maxVal); }
|
||||
void SetIncrement(int inc) { DoSetIncrement(inc); }
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxSpinCtrl)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxSpinCtrlDouble - a double valued spin control
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxSpinCtrlDouble : public wxSpinCtrlGTKBase
|
||||
{
|
||||
public:
|
||||
wxSpinCtrlDouble() {}
|
||||
wxSpinCtrlDouble(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
double min = 0, double max = 100, double initial = 0,
|
||||
double inc = 1,
|
||||
const wxString& name = wxS("wxSpinCtrlDouble"))
|
||||
{
|
||||
Create(parent, id, value, pos, size, style,
|
||||
min, max, initial, inc, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
|
||||
double min = 0, double max = 100, double initial = 0,
|
||||
double inc = 1,
|
||||
const wxString& name = wxS("wxSpinCtrlDouble"))
|
||||
{
|
||||
return wxSpinCtrlGTKBase::Create(parent, id, value, pos, size,
|
||||
style, min, max, initial, inc, name);
|
||||
}
|
||||
|
||||
// accessors
|
||||
double GetValue() const { return DoGetValue(); }
|
||||
double GetMin() const { return DoGetMin(); }
|
||||
double GetMax() const { return DoGetMax(); }
|
||||
double GetIncrement() const { return DoGetIncrement(); }
|
||||
unsigned GetDigits() const;
|
||||
|
||||
// operations
|
||||
void SetValue(const wxString& value) { wxSpinCtrlGTKBase::SetValue(value); } // visibility problem w/ gcc
|
||||
void SetValue(double value) { DoSetValue(value); }
|
||||
void SetRange(double minVal, double maxVal) { DoSetRange(minVal, maxVal); }
|
||||
void SetIncrement(double inc) { DoSetIncrement(inc); }
|
||||
void SetDigits(unsigned digits);
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxSpinCtrlDouble)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_SPINCTRL_H_
|
59
Externals/wxWidgets3/include/wx/gtk/statbmp.h
vendored
Normal file
59
Externals/wxWidgets3/include/wx/gtk/statbmp.h
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/statbmp.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: statbmp.h 61724 2009-08-21 10:41:26Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKSTATICBITMAPH__
|
||||
#define __GTKSTATICBITMAPH__
|
||||
|
||||
#include "wx/icon.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxStaticBitmap
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxStaticBitmap : public wxStaticBitmapBase
|
||||
{
|
||||
public:
|
||||
wxStaticBitmap();
|
||||
wxStaticBitmap( wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxStaticBitmapNameStr );
|
||||
bool Create( wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxStaticBitmapNameStr);
|
||||
|
||||
virtual void SetIcon(const wxIcon& icon) { SetBitmap( icon ); }
|
||||
virtual void SetBitmap( const wxBitmap& bitmap );
|
||||
virtual wxBitmap GetBitmap() const { return m_bitmap; }
|
||||
|
||||
// for compatibility with wxMSW
|
||||
wxIcon GetIcon() const
|
||||
{
|
||||
// don't use wxDynamicCast, icons and bitmaps are really the same thing
|
||||
// in wxGTK
|
||||
return (const wxIcon &)m_bitmap;
|
||||
}
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
private:
|
||||
wxBitmap m_bitmap;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
|
||||
};
|
||||
|
||||
#endif // __GTKSTATICBITMAPH__
|
58
Externals/wxWidgets3/include/wx/gtk/statbox.h
vendored
Normal file
58
Externals/wxWidgets3/include/wx/gtk/statbox.h
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/statbox.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: statbox.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTKSTATICBOX_H_
|
||||
#define _WX_GTKSTATICBOX_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxStaticBox
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxStaticBox : public wxStaticBoxBase
|
||||
{
|
||||
public:
|
||||
wxStaticBox();
|
||||
wxStaticBox( wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString &label,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString &name = wxStaticBoxNameStr );
|
||||
bool Create( wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString &label,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString &name = wxStaticBoxNameStr );
|
||||
|
||||
virtual void SetLabel( const wxString &label );
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
// implementation
|
||||
|
||||
virtual bool IsTransparentForMouse() const { return true; }
|
||||
|
||||
virtual void GetBordersForSizer(int *borderTop, int *borderOther) const;
|
||||
|
||||
virtual void AddChild( wxWindowBase *child );
|
||||
|
||||
protected:
|
||||
virtual bool GTKWidgetNeedsMnemonic() const;
|
||||
virtual void GTKWidgetDoSetMnemonic(GtkWidget* w);
|
||||
|
||||
void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticBox)
|
||||
};
|
||||
|
||||
#endif // _WX_GTKSTATICBOX_H_
|
49
Externals/wxWidgets3/include/wx/gtk/statline.h
vendored
Normal file
49
Externals/wxWidgets3/include/wx/gtk/statline.h
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/statline.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: statline.h 43874 2006-12-09 14:52:59Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKSTATICLINEH__
|
||||
#define __GTKSTATICLINEH__
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_STATLINE
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxStaticLine
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxStaticLine : public wxStaticLineBase
|
||||
{
|
||||
public:
|
||||
wxStaticLine();
|
||||
wxStaticLine(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxLI_HORIZONTAL,
|
||||
const wxString &name = wxStaticLineNameStr);
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxLI_HORIZONTAL,
|
||||
const wxString &name = wxStaticLineNameStr);
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticLine)
|
||||
};
|
||||
|
||||
#endif // wxUSE_STATLINE
|
||||
|
||||
#endif // __GTKSTATICLINEH__
|
||||
|
74
Externals/wxWidgets3/include/wx/gtk/stattext.h
vendored
Normal file
74
Externals/wxWidgets3/include/wx/gtk/stattext.h
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/stattext.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: stattext.h 67062 2011-02-27 12:48:07Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_STATTEXT_H_
|
||||
#define _WX_GTK_STATTEXT_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxStaticText
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxStaticText : public wxStaticTextBase
|
||||
{
|
||||
public:
|
||||
wxStaticText();
|
||||
wxStaticText(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 );
|
||||
|
||||
void SetLabel( const wxString &label );
|
||||
|
||||
bool SetFont( const wxFont &font );
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
protected:
|
||||
virtual bool GTKWidgetNeedsMnemonic() const;
|
||||
virtual void GTKWidgetDoSetMnemonic(GtkWidget* w);
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
virtual wxString DoGetLabel() const;
|
||||
virtual void DoSetLabel(const wxString& str);
|
||||
#if wxUSE_MARKUP
|
||||
virtual bool DoSetLabelMarkup(const wxString& markup);
|
||||
#endif // wxUSE_MARKUP
|
||||
|
||||
private:
|
||||
// Common part of SetLabel() and DoSetLabelMarkup().
|
||||
typedef void (wxStaticText::*GTKLabelSetter)(GtkLabel *, const wxString&);
|
||||
|
||||
void GTKDoSetLabel(GTKLabelSetter setter, const wxString& label);
|
||||
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticText)
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_GTK_STATTEXT_H_
|
34
Externals/wxWidgets3/include/wx/gtk/taskbar.h
vendored
Normal file
34
Externals/wxWidgets3/include/wx/gtk/taskbar.h
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/taskbar.h
|
||||
// Purpose: wxTaskBarIcon class for GTK2
|
||||
// Author: Paul Cornett
|
||||
// Created: 2009-02-08
|
||||
// RCS-ID: $Id: taskbar.h 67232 2011-03-18 15:10:15Z DS $
|
||||
// Copyright: (c) 2009 Paul Cornett
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_TASKBARICON_H_
|
||||
#define _WX_GTK_TASKBARICON_H_
|
||||
|
||||
class WXDLLIMPEXP_ADV wxTaskBarIcon: public wxTaskBarIconBase
|
||||
{
|
||||
public:
|
||||
wxTaskBarIcon();
|
||||
~wxTaskBarIcon();
|
||||
virtual bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxString());
|
||||
virtual bool RemoveIcon();
|
||||
virtual bool PopupMenu(wxMenu* menu);
|
||||
bool IsOk() const { return true; }
|
||||
bool IsIconInstalled() const;
|
||||
|
||||
class Private;
|
||||
|
||||
private:
|
||||
Private* m_priv;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxTaskBarIcon)
|
||||
DECLARE_NO_COPY_CLASS(wxTaskBarIcon)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_TASKBARICON_H_
|
225
Externals/wxWidgets3/include/wx/gtk/textctrl.h
vendored
Normal file
225
Externals/wxWidgets3/include/wx/gtk/textctrl.h
vendored
Normal file
@ -0,0 +1,225 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/textctrl.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id: $Id: textctrl.h 64404 2010-05-26 17:37:55Z RR $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_TEXTCTRL_H_
|
||||
#define _WX_GTK_TEXTCTRL_H_
|
||||
|
||||
typedef struct _GtkTextMark GtkTextMark;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxTextCtrl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxTextCtrl: public wxTextCtrlBase
|
||||
{
|
||||
public:
|
||||
wxTextCtrl() { Init(); }
|
||||
wxTextCtrl(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString &value = wxEmptyString,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString &name = wxTextCtrlNameStr);
|
||||
|
||||
virtual ~wxTextCtrl();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString &value = wxEmptyString,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString &name = wxTextCtrlNameStr);
|
||||
|
||||
// implement base class pure virtuals
|
||||
// ----------------------------------
|
||||
|
||||
virtual void WriteText(const wxString& text);
|
||||
virtual wxString GetValue() const;
|
||||
virtual bool IsEmpty() const;
|
||||
|
||||
virtual int GetLineLength(long lineNo) const;
|
||||
virtual wxString GetLineText(long lineNo) const;
|
||||
virtual int GetNumberOfLines() const;
|
||||
|
||||
virtual bool IsModified() const;
|
||||
virtual bool IsEditable() const;
|
||||
|
||||
virtual void GetSelection(long* from, long* to) const;
|
||||
|
||||
virtual void Remove(long from, long to);
|
||||
|
||||
virtual void MarkDirty();
|
||||
virtual void DiscardEdits();
|
||||
|
||||
virtual bool SetStyle(long start, long end, const wxTextAttr& style);
|
||||
virtual bool GetStyle(long position, wxTextAttr& style);
|
||||
|
||||
// translate between the position (which is just an index in the text ctrl
|
||||
// considering all its contents as a single strings) and (x, y) coordinates
|
||||
// which represent column and line.
|
||||
virtual long XYToPosition(long x, long y) const;
|
||||
virtual bool PositionToXY(long pos, long *x, long *y) const;
|
||||
|
||||
virtual void ShowPosition(long pos);
|
||||
|
||||
virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const;
|
||||
virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt,
|
||||
wxTextCoord *col,
|
||||
wxTextCoord *row) const
|
||||
{
|
||||
return wxTextCtrlBase::HitTest(pt, col, row);
|
||||
}
|
||||
|
||||
// Clipboard operations
|
||||
virtual void Copy();
|
||||
virtual void Cut();
|
||||
virtual void Paste();
|
||||
|
||||
// Insertion point
|
||||
virtual void SetInsertionPoint(long pos);
|
||||
virtual long GetInsertionPoint() const;
|
||||
virtual wxTextPos GetLastPosition() const;
|
||||
|
||||
virtual void SetSelection(long from, long to);
|
||||
virtual void SetEditable(bool editable);
|
||||
|
||||
// Overridden wxWindow methods
|
||||
virtual void SetWindowStyleFlag( long style );
|
||||
virtual bool Enable( bool enable = true );
|
||||
|
||||
// Implementation from now on
|
||||
void OnDropFiles( wxDropFilesEvent &event );
|
||||
void OnChar( wxKeyEvent &event );
|
||||
|
||||
void OnCut(wxCommandEvent& event);
|
||||
void OnCopy(wxCommandEvent& event);
|
||||
void OnPaste(wxCommandEvent& event);
|
||||
void OnUndo(wxCommandEvent& event);
|
||||
void OnRedo(wxCommandEvent& event);
|
||||
|
||||
void OnUpdateCut(wxUpdateUIEvent& event);
|
||||
void OnUpdateCopy(wxUpdateUIEvent& event);
|
||||
void OnUpdatePaste(wxUpdateUIEvent& event);
|
||||
void OnUpdateUndo(wxUpdateUIEvent& event);
|
||||
void OnUpdateRedo(wxUpdateUIEvent& event);
|
||||
|
||||
bool SetFont(const wxFont& font);
|
||||
bool SetForegroundColour(const wxColour& colour);
|
||||
bool SetBackgroundColour(const wxColour& colour);
|
||||
|
||||
GtkWidget* GetConnectWidget();
|
||||
|
||||
void SetUpdateFont(bool WXUNUSED(update)) { }
|
||||
|
||||
// implementation only from now on
|
||||
|
||||
// tell the control to ignore next text changed signal
|
||||
void IgnoreNextTextUpdate(int n = 1) { m_countUpdatesToIgnore = n; }
|
||||
|
||||
// should we ignore the changed signal? always resets the flag
|
||||
bool IgnoreTextUpdate();
|
||||
|
||||
// call this to indicate that the control is about to be changed
|
||||
// programmatically and so m_modified flag shouldn't be set
|
||||
void DontMarkDirtyOnNextChange() { m_dontMarkDirty = true; }
|
||||
|
||||
// should we mark the control as dirty? always resets the flag
|
||||
bool MarkDirtyOnChange();
|
||||
|
||||
// always let GTK have mouse release events for multiline controls
|
||||
virtual bool GTKProcessEvent(wxEvent& event) const;
|
||||
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
protected:
|
||||
// wxGTK-specific: called recursively by Enable,
|
||||
// to give widgets an oppprtunity to correct their colours after they
|
||||
// have been changed by Enable
|
||||
virtual void OnEnabled(bool enable);
|
||||
|
||||
// overridden wxWindow virtual methods
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
virtual void DoFreeze();
|
||||
virtual void DoThaw();
|
||||
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// Widgets that use the style->base colour for the BG colour should
|
||||
// override this and return true.
|
||||
virtual bool UseGTKStyleBase() const { return true; }
|
||||
|
||||
virtual void DoSetValue(const wxString &value, int flags = 0);
|
||||
|
||||
// wrappers hiding the differences between functions doing the same thing
|
||||
// for GtkTextView and GtkEntry (all of them use current window style to
|
||||
// set the given characteristic)
|
||||
void GTKSetEditable();
|
||||
void GTKSetVisibility();
|
||||
void GTKSetActivatesDefault();
|
||||
void GTKSetWrapMode();
|
||||
void GTKSetJustification();
|
||||
|
||||
private:
|
||||
// overridden wxTextEntry virtual methods
|
||||
virtual GtkEditable *GetEditable() const;
|
||||
virtual GtkEntry *GetEntry() const;
|
||||
virtual void EnableTextChangedEvents(bool enable);
|
||||
|
||||
// change the font for everything in this control
|
||||
void ChangeFontGlobally();
|
||||
|
||||
// get the encoding which is used in this control: this looks at our font
|
||||
// and default style but not the current style (i.e. the style for the
|
||||
// current position); returns wxFONTENCODING_SYSTEM if we have no specific
|
||||
// encoding
|
||||
wxFontEncoding GetTextEncoding() const;
|
||||
|
||||
// returns either m_text or m_buffer depending on whether the control is
|
||||
// single- or multi-line; convenient for the GTK+ functions which work with
|
||||
// both
|
||||
void *GetTextObject() const
|
||||
{
|
||||
return IsMultiLine() ? static_cast<void *>(m_buffer)
|
||||
: static_cast<void *>(m_text);
|
||||
}
|
||||
|
||||
|
||||
// the widget used for single line controls
|
||||
GtkWidget *m_text;
|
||||
|
||||
bool m_modified:1;
|
||||
bool m_dontMarkDirty:1;
|
||||
|
||||
int m_countUpdatesToIgnore;
|
||||
|
||||
// Our text buffer. Convenient, and holds the buffer while using
|
||||
// a dummy one when frozen
|
||||
GtkTextBuffer *m_buffer;
|
||||
|
||||
GtkTextMark* m_showPositionOnThaw;
|
||||
|
||||
// For wxTE_AUTO_URL
|
||||
void OnUrlMouseEvent(wxMouseEvent&);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxTextCtrl)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_TEXTCTRL_H_
|
73
Externals/wxWidgets3/include/wx/gtk/textentry.h
vendored
Normal file
73
Externals/wxWidgets3/include/wx/gtk/textentry.h
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/textentry.h
|
||||
// Purpose: wxGTK-specific wxTextEntry implementation
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2007-09-24
|
||||
// RCS-ID: $Id: textentry.h 61834 2009-09-05 12:39:12Z JMS $
|
||||
// Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_TEXTENTRY_H_
|
||||
#define _WX_GTK_TEXTENTRY_H_
|
||||
|
||||
typedef struct _GtkEditable GtkEditable;
|
||||
typedef struct _GtkEntry GtkEntry;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTextEntry: roughly corresponds to GtkEditable
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxTextEntry : public wxTextEntryBase
|
||||
{
|
||||
public:
|
||||
wxTextEntry() { }
|
||||
|
||||
// implement wxTextEntryBase pure virtual methods
|
||||
virtual void WriteText(const wxString& text);
|
||||
virtual void Remove(long from, long to);
|
||||
|
||||
virtual void Copy();
|
||||
virtual void Cut();
|
||||
virtual void Paste();
|
||||
|
||||
virtual void Undo();
|
||||
virtual void Redo();
|
||||
virtual bool CanUndo() const;
|
||||
virtual bool CanRedo() const;
|
||||
|
||||
virtual void SetInsertionPoint(long pos);
|
||||
virtual long GetInsertionPoint() const;
|
||||
virtual long GetLastPosition() const;
|
||||
|
||||
virtual void SetSelection(long from, long to);
|
||||
virtual void GetSelection(long *from, long *to) const;
|
||||
|
||||
virtual bool AutoComplete(const wxArrayString& choices);
|
||||
|
||||
virtual bool IsEditable() const;
|
||||
virtual void SetEditable(bool editable);
|
||||
|
||||
virtual void SetMaxLength(unsigned long len);
|
||||
|
||||
// implementation only from now on
|
||||
void SendMaxLenEvent();
|
||||
|
||||
protected:
|
||||
virtual wxString DoGetValue() const;
|
||||
|
||||
// margins functions
|
||||
virtual bool DoSetMargins(const wxPoint& pt);
|
||||
virtual wxPoint DoGetMargins() const;
|
||||
|
||||
private:
|
||||
// implement this to return the associated GtkEntry or another widget
|
||||
// implementing GtkEditable
|
||||
virtual GtkEditable *GetEditable() const = 0;
|
||||
|
||||
// implement this to return the associated GtkEntry
|
||||
virtual GtkEntry *GetEntry() const = 0;
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_TEXTENTRY_H_
|
||||
|
142
Externals/wxWidgets3/include/wx/gtk/tglbtn.h
vendored
Normal file
142
Externals/wxWidgets3/include/wx/gtk/tglbtn.h
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/tglbtn.h
|
||||
// Purpose: Declaration of the wxToggleButton class, which implements a
|
||||
// toggle button under wxGTK.
|
||||
// Author: John Norris, minor changes by Axel Schlueter
|
||||
// Modified by:
|
||||
// Created: 08.02.01
|
||||
// RCS-ID: $Id: tglbtn.h 66992 2011-02-22 13:25:30Z VZ $
|
||||
// Copyright: (c) 2000 Johnny C. Norris II
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_TOGGLEBUTTON_H_
|
||||
#define _WX_GTK_TOGGLEBUTTON_H_
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxToggleButton;
|
||||
class WXDLLIMPEXP_FWD_CORE wxToggleBitmapButton;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxBitmapToggleButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmapToggleButton: public wxToggleButtonBase
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
wxBitmapToggleButton() {}
|
||||
wxBitmapToggleButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
// Create the control
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
|
||||
// Get/set the value
|
||||
void SetValue(bool state);
|
||||
bool GetValue() const;
|
||||
|
||||
// Set the label
|
||||
virtual void SetLabel(const wxString& label) { wxControl::SetLabel(label); }
|
||||
virtual void SetLabel(const wxBitmap& label);
|
||||
bool Enable(bool enable = true);
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
// implementation
|
||||
wxBitmap m_bitmap;
|
||||
|
||||
void OnSetBitmap();
|
||||
|
||||
protected:
|
||||
void GTKDisableEvents();
|
||||
void GTKEnableEvents();
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
private:
|
||||
typedef wxToggleButtonBase base_type;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapToggleButton)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxToggleButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxToggleButton: public wxToggleButtonBase
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
wxToggleButton() {}
|
||||
wxToggleButton(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 = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
// Create the control
|
||||
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 = wxCheckBoxNameStr);
|
||||
|
||||
// Get/set the value
|
||||
void SetValue(bool state);
|
||||
bool GetValue() const;
|
||||
|
||||
// Set the label
|
||||
void SetLabel(const wxString& label);
|
||||
bool Enable(bool enable = true);
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
protected:
|
||||
void GTKDisableEvents();
|
||||
void GTKEnableEvents();
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
private:
|
||||
typedef wxToggleButtonBase base_type;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxToggleButton)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_TOGGLEBUTTON_H_
|
||||
|
100
Externals/wxWidgets3/include/wx/gtk/toolbar.h
vendored
Normal file
100
Externals/wxWidgets3/include/wx/gtk/toolbar.h
vendored
Normal file
@ -0,0 +1,100 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/toolbar.h
|
||||
// Purpose: GTK toolbar
|
||||
// Author: Robert Roebling
|
||||
// RCS-ID: $Id: toolbar.h 66633 2011-01-07 18:15:21Z PC $
|
||||
// Copyright: (c) Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_TOOLBAR_H_
|
||||
#define _WX_GTK_TOOLBAR_H_
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxToolBar
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
wxToolBar() { Init(); }
|
||||
wxToolBar( wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTB_HORIZONTAL,
|
||||
const wxString& name = wxToolBarNameStr )
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create( wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTB_HORIZONTAL,
|
||||
const wxString& name = wxToolBarNameStr );
|
||||
|
||||
virtual ~wxToolBar();
|
||||
|
||||
virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
|
||||
|
||||
virtual void SetToolShortHelp(int id, const wxString& helpString);
|
||||
|
||||
virtual void SetWindowStyleFlag( long style );
|
||||
|
||||
virtual void SetToolNormalBitmap(int id, const wxBitmap& bitmap);
|
||||
virtual void SetToolDisabledBitmap(int id, const wxBitmap& bitmap);
|
||||
|
||||
virtual bool Realize();
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
|
||||
virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
|
||||
|
||||
virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
|
||||
virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
|
||||
virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
|
||||
|
||||
virtual wxToolBarToolBase *CreateTool(int id,
|
||||
const wxString& label,
|
||||
const wxBitmap& bitmap1,
|
||||
const wxBitmap& bitmap2,
|
||||
wxItemKind kind,
|
||||
wxObject *clientData,
|
||||
const wxString& shortHelpString,
|
||||
const wxString& longHelpString);
|
||||
virtual wxToolBarToolBase *CreateTool(wxControl *control,
|
||||
const wxString& label);
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void GtkSetStyle();
|
||||
GSList* GetRadioGroup(size_t pos);
|
||||
virtual void AddChildGTK(wxWindowGTK* child);
|
||||
|
||||
GtkToolbar* m_toolbar;
|
||||
GtkTooltips* m_tooltips;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxToolBar)
|
||||
};
|
||||
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
#endif
|
||||
// _WX_GTK_TOOLBAR_H_
|
63
Externals/wxWidgets3/include/wx/gtk/tooltip.h
vendored
Normal file
63
Externals/wxWidgets3/include/wx/gtk/tooltip.h
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/tooltip.h
|
||||
// Purpose: wxToolTip class
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: tooltip.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKTOOLTIPH__
|
||||
#define __GTKTOOLTIPH__
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/object.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// forward declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxToolTip;
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxToolTip
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxToolTip : public wxObject
|
||||
{
|
||||
public:
|
||||
wxToolTip( const wxString &tip );
|
||||
|
||||
// globally change the tooltip parameters
|
||||
static void Enable( bool flag );
|
||||
static void SetDelay( long msecs );
|
||||
// set the delay after which the tooltip disappears or how long the tooltip remains visible
|
||||
static void SetAutoPop(long msecs);
|
||||
// set the delay between subsequent tooltips to appear
|
||||
static void SetReshow(long msecs);
|
||||
|
||||
// get/set the tooltip text
|
||||
void SetTip( const wxString &tip );
|
||||
wxString GetTip() const { return m_text; }
|
||||
|
||||
wxWindow *GetWindow() const { return m_window; }
|
||||
bool IsOk() const { return m_window != NULL; }
|
||||
|
||||
|
||||
// this forwards back to wxWindow::GTKApplyToolTip()
|
||||
void GTKApply( wxWindow *win );
|
||||
|
||||
// this just sets the given tooltip for the specified widget
|
||||
// tip must be UTF-8 encoded
|
||||
static void GTKApply(GtkWidget *w, const gchar *tip);
|
||||
|
||||
private:
|
||||
wxString m_text;
|
||||
wxWindow *m_window;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxToolTip)
|
||||
};
|
||||
|
||||
#endif // __GTKTOOLTIPH__
|
164
Externals/wxWidgets3/include/wx/gtk/toplevel.h
vendored
Normal file
164
Externals/wxWidgets3/include/wx/gtk/toplevel.h
vendored
Normal file
@ -0,0 +1,164 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/toplevel.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: toplevel.h 65373 2010-08-21 09:53:25Z RR $
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_TOPLEVEL_H_
|
||||
#define _WX_GTK_TOPLEVEL_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxTopLevelWindowGTK
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxTopLevelWindowGTK : public wxTopLevelWindowBase
|
||||
{
|
||||
typedef wxTopLevelWindowBase base_type;
|
||||
public:
|
||||
// construction
|
||||
wxTopLevelWindowGTK() { Init(); }
|
||||
wxTopLevelWindowGTK(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, title, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_FRAME_STYLE,
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual ~wxTopLevelWindowGTK();
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual void Maximize(bool maximize = true);
|
||||
virtual bool IsMaximized() const;
|
||||
virtual void Iconize(bool iconize = true);
|
||||
virtual bool IsIconized() const;
|
||||
virtual void SetIcons(const wxIconBundle& icons);
|
||||
virtual void Restore();
|
||||
|
||||
virtual bool EnableCloseButton(bool enable = true);
|
||||
|
||||
virtual void ShowWithoutActivating();
|
||||
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
||||
virtual bool IsFullScreen() const { return m_fsIsShowing; };
|
||||
|
||||
virtual bool SetShape(const wxRegion& region);
|
||||
|
||||
virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
|
||||
|
||||
virtual void SetWindowStyleFlag( long style );
|
||||
|
||||
virtual bool Show(bool show = true);
|
||||
|
||||
virtual void Raise();
|
||||
|
||||
virtual bool IsActive();
|
||||
|
||||
virtual void SetTitle( const wxString &title );
|
||||
virtual wxString GetTitle() const { return m_title; }
|
||||
|
||||
virtual void SetLabel(const wxString& label) { SetTitle( label ); }
|
||||
virtual wxString GetLabel() const { return GetTitle(); }
|
||||
|
||||
|
||||
virtual bool SetTransparent(wxByte alpha);
|
||||
virtual bool CanSetTransparent();
|
||||
|
||||
// Experimental, to allow help windows to be
|
||||
// viewable from within modal dialogs
|
||||
virtual void AddGrab();
|
||||
virtual void RemoveGrab();
|
||||
virtual bool IsGrabbed() const { return m_grabbed; }
|
||||
|
||||
|
||||
virtual void Refresh( bool eraseBackground = true,
|
||||
const wxRect *rect = (const wxRect *) NULL );
|
||||
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
// GTK callbacks
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
// do *not* call this to iconize the frame, this is a private function!
|
||||
void SetIconizeState(bool iconic);
|
||||
|
||||
GtkWidget *m_mainWidget;
|
||||
|
||||
bool m_fsIsShowing; /* full screen */
|
||||
int m_fsSaveGdkFunc, m_fsSaveGdkDecor;
|
||||
wxRect m_fsSaveFrame;
|
||||
|
||||
// m_windowStyle translated to GDK's terms
|
||||
int m_gdkFunc,
|
||||
m_gdkDecor;
|
||||
|
||||
// size of WM decorations
|
||||
wxSize m_decorSize;
|
||||
|
||||
// shape of the frame
|
||||
wxRegion m_shape;
|
||||
|
||||
// private gtk_timeout_add result for mimicing wxUSER_ATTENTION_INFO and
|
||||
// wxUSER_ATTENTION_ERROR difference, -2 for no hint, -1 for ERROR hint, rest for GtkTimeout handle.
|
||||
int m_urgency_hint;
|
||||
|
||||
// return the size of the window without WM decorations
|
||||
void GTKDoGetSize(int *width, int *height) const;
|
||||
|
||||
void GTKUpdateDecorSize(const wxSize& decorSize);
|
||||
|
||||
protected:
|
||||
// give hints to the Window Manager for how the size
|
||||
// of the TLW can be changed by dragging
|
||||
virtual void DoSetSizeHints( int minW, int minH,
|
||||
int maxW, int maxH,
|
||||
int incW, int incH);
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// move the window to the specified location and resize it
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
|
||||
// take into account WM decorations here
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
virtual void DoGetClientSize(int *width, int *height) const;
|
||||
|
||||
// string shown in the title bar
|
||||
wxString m_title;
|
||||
|
||||
bool m_deferShow;
|
||||
|
||||
private:
|
||||
wxSize& GetCachedDecorSize();
|
||||
|
||||
// is the frame currently iconized?
|
||||
bool m_isIconized;
|
||||
|
||||
// is the frame currently grabbed explicitly by the application?
|
||||
bool m_grabbed;
|
||||
|
||||
bool m_updateDecorSize;
|
||||
bool m_deferShowAllowed;
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_TOPLEVEL_H_
|
76
Externals/wxWidgets3/include/wx/gtk/treeentry_gtk.h
vendored
Normal file
76
Externals/wxWidgets3/include/wx/gtk/treeentry_gtk.h
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
/* ///////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/treeentry_gtk.h
|
||||
// Purpose: GtkTreeEntry - a string/userdata combo for use with treeview
|
||||
// Author: Ryan Norton
|
||||
// Id: $Id: treeentry_gtk.h 67254 2011-03-20 00:14:35Z DS $
|
||||
// Copyright: (c) 2006 Ryan Norton
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////// */
|
||||
|
||||
#ifndef __GTK_TREE_ENTRY_H__
|
||||
#define __GTK_TREE_ENTRY_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <gtk/gtk.h> /* for gpointer and gchar* etc. */
|
||||
|
||||
#include "wx/dlimpexp.h"
|
||||
|
||||
#define GTK_TYPE_TREE_ENTRY (gtk_tree_entry_get_type())
|
||||
#define GTK_TREE_ENTRY(obj) (GTK_CHECK_CAST (obj, gtk_tree_entry_get_type (), GtkTreeEntry))
|
||||
#define GTK_TREE_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST (klass, gtk_tree_entry_get_type (), GtkTreeEntryClass))
|
||||
#define GTK_IS_TREE_ENTRY(obj) (GTK_CHECK_TYPE (obj, gtk_tree_entry_get_type ()))
|
||||
|
||||
typedef struct _GtkTreeEntry GtkTreeEntry;
|
||||
typedef struct _GtkTreeEntryClass GtkTreeEntryClass;
|
||||
|
||||
typedef void (*GtkTreeEntryDestroy) (GtkTreeEntry* entry, gpointer context);
|
||||
|
||||
struct _GtkTreeEntry
|
||||
{
|
||||
GObject parent; /* object instance */
|
||||
gchar* label; /* label - always copied by this object except on get */
|
||||
gchar* collate_key; /* collate key used for string comparisons/sorting */
|
||||
gpointer userdata; /* untouched userdata */
|
||||
GtkTreeEntryDestroy destroy_func; /* called upon destruction - use for freeing userdata etc. */
|
||||
gpointer destroy_func_data; /* context passed to destroy_func */
|
||||
};
|
||||
|
||||
struct _GtkTreeEntryClass
|
||||
{
|
||||
GObjectClass parent;
|
||||
};
|
||||
|
||||
WXDLLIMPEXP_CORE
|
||||
GtkTreeEntry* gtk_tree_entry_new (void);
|
||||
|
||||
WXDLLIMPEXP_CORE
|
||||
GtkType gtk_tree_entry_get_type (void);
|
||||
|
||||
WXDLLIMPEXP_CORE
|
||||
gchar* gtk_tree_entry_get_collate_key (GtkTreeEntry* entry);
|
||||
|
||||
WXDLLIMPEXP_CORE
|
||||
gchar* gtk_tree_entry_get_label (GtkTreeEntry* entry);
|
||||
|
||||
WXDLLIMPEXP_CORE
|
||||
gpointer gtk_tree_entry_get_userdata (GtkTreeEntry* entry);
|
||||
|
||||
WXDLLIMPEXP_CORE
|
||||
void gtk_tree_entry_set_label (GtkTreeEntry* entry, const gchar* label);
|
||||
|
||||
WXDLLIMPEXP_CORE
|
||||
void gtk_tree_entry_set_userdata (GtkTreeEntry* entry, gpointer userdata);
|
||||
|
||||
WXDLLIMPEXP_CORE
|
||||
void gtk_tree_entry_set_destroy_func (GtkTreeEntry* entry,
|
||||
GtkTreeEntryDestroy destroy_func,
|
||||
gpointer destroy_func_data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __GTK_TREE_ENTRY_H__ */
|
398
Externals/wxWidgets3/include/wx/gtk/window.h
vendored
Normal file
398
Externals/wxWidgets3/include/wx/gtk/window.h
vendored
Normal file
@ -0,0 +1,398 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/window.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id: window.h 65680 2010-09-30 11:44:45Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_WINDOW_H_
|
||||
#define _WX_GTK_WINDOW_H_
|
||||
|
||||
#include "wx/dynarray.h"
|
||||
|
||||
// helper structure that holds class that holds GtkIMContext object and
|
||||
// some additional data needed for key events processing
|
||||
struct wxGtkIMData;
|
||||
|
||||
WX_DEFINE_EXPORTED_ARRAY_PTR(GdkWindow *, wxArrayGdkWindows);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxWindowGTK
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxWindowGTK : public wxWindowBase
|
||||
{
|
||||
public:
|
||||
// creating the window
|
||||
// -------------------
|
||||
wxWindowGTK();
|
||||
wxWindowGTK(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxPanelNameStr);
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxPanelNameStr);
|
||||
virtual ~wxWindowGTK();
|
||||
|
||||
// implement base class (pure) virtual methods
|
||||
// -------------------------------------------
|
||||
|
||||
virtual bool Destroy();
|
||||
|
||||
virtual void Raise();
|
||||
virtual void Lower();
|
||||
|
||||
virtual bool Show( bool show = true );
|
||||
|
||||
virtual void SetWindowStyleFlag( long style );
|
||||
|
||||
virtual bool IsRetained() const;
|
||||
|
||||
virtual void SetFocus();
|
||||
|
||||
// hint from wx to native GTK+ tab traversal code
|
||||
virtual void SetCanFocus(bool canFocus);
|
||||
|
||||
virtual bool Reparent( wxWindowBase *newParent );
|
||||
|
||||
virtual void WarpPointer(int x, int y);
|
||||
|
||||
virtual void Refresh( bool eraseBackground = true,
|
||||
const wxRect *rect = (const wxRect *) NULL );
|
||||
virtual void Update();
|
||||
virtual void ClearBackground();
|
||||
|
||||
virtual bool SetBackgroundColour( const wxColour &colour );
|
||||
virtual bool SetForegroundColour( const wxColour &colour );
|
||||
virtual bool SetCursor( const wxCursor &cursor );
|
||||
virtual bool SetFont( const wxFont &font );
|
||||
|
||||
virtual bool SetBackgroundStyle(wxBackgroundStyle style) ;
|
||||
|
||||
virtual int GetCharHeight() const;
|
||||
virtual int GetCharWidth() const;
|
||||
|
||||
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
||||
int range, bool refresh = true );
|
||||
virtual void SetScrollPos( int orient, int pos, bool refresh = true );
|
||||
virtual int GetScrollPos( int orient ) const;
|
||||
virtual int GetScrollThumb( int orient ) const;
|
||||
virtual int GetScrollRange( int orient ) const;
|
||||
virtual void ScrollWindow( int dx, int dy,
|
||||
const wxRect* rect = NULL );
|
||||
virtual bool ScrollLines(int lines);
|
||||
virtual bool ScrollPages(int pages);
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
virtual void SetDropTarget( wxDropTarget *dropTarget );
|
||||
#endif // wxUSE_DRAG_AND_DROP
|
||||
|
||||
virtual void AddChild( wxWindowBase *child );
|
||||
virtual void RemoveChild( wxWindowBase *child );
|
||||
|
||||
virtual void SetLayoutDirection(wxLayoutDirection dir);
|
||||
virtual wxLayoutDirection GetLayoutDirection() const;
|
||||
virtual wxCoord AdjustForLayoutDirection(wxCoord x,
|
||||
wxCoord width,
|
||||
wxCoord widthTotal) const;
|
||||
|
||||
virtual bool DoIsExposed( int x, int y ) const;
|
||||
virtual bool DoIsExposed( int x, int y, int w, int h ) const;
|
||||
|
||||
// currently wxGTK2-only
|
||||
void SetDoubleBuffered(bool on);
|
||||
virtual bool IsDoubleBuffered() const;
|
||||
|
||||
// SetLabel(), which does nothing in wxWindow
|
||||
virtual void SetLabel(const wxString& label) { m_gtkLabel = label; }
|
||||
virtual wxString GetLabel() const { return m_gtkLabel; }
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
virtual WXWidget GetHandle() const { return m_widget; }
|
||||
|
||||
// many important things are done here, this function must be called
|
||||
// regularly
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
// For compatibility across platforms (not in event table)
|
||||
void OnIdle(wxIdleEvent& WXUNUSED(event)) {}
|
||||
|
||||
// Used by all window classes in the widget creation process.
|
||||
bool PreCreation( wxWindowGTK *parent, const wxPoint &pos, const wxSize &size );
|
||||
void PostCreation();
|
||||
|
||||
// Internal addition of child windows
|
||||
void DoAddChild(wxWindowGTK *child);
|
||||
|
||||
// This methods sends wxPaintEvents to the window. It reads the
|
||||
// update region, breaks it up into rects and sends an event
|
||||
// for each rect. It is also responsible for background erase
|
||||
// events and NC paint events. It is called from "draw" and
|
||||
// "expose" handlers as well as from ::Update()
|
||||
void GtkSendPaintEvents();
|
||||
|
||||
// The methods below are required because many native widgets
|
||||
// are composed of several subwidgets and setting a style for
|
||||
// the widget means setting it for all subwidgets as well.
|
||||
// also, it is not clear which native widget is the top
|
||||
// widget where (most of) the input goes. even tooltips have
|
||||
// to be applied to all subwidgets.
|
||||
virtual GtkWidget* GetConnectWidget();
|
||||
void ConnectWidget( GtkWidget *widget );
|
||||
|
||||
// Called from several event handlers, if it returns true or false, the
|
||||
// same value should be immediately returned by the handler without doing
|
||||
// anything else. If it returns -1, the handler should continue as usual
|
||||
int GTKCallbackCommonPrologue(struct _GdkEventAny *event) const;
|
||||
|
||||
// Simplified form of GTKCallbackCommonPrologue() which can be used from
|
||||
// GTK callbacks without return value to check if the event should be
|
||||
// ignored: if this returns true, the event shouldn't be handled
|
||||
bool GTKShouldIgnoreEvent() const;
|
||||
|
||||
|
||||
// override this if some events should never be consumed by wxWidgets but
|
||||
// but have to be left for the native control
|
||||
//
|
||||
// base version just calls HandleWindowEvent()
|
||||
virtual bool GTKProcessEvent(wxEvent& event) const;
|
||||
|
||||
// Map GTK widget direction of the given widget to/from wxLayoutDirection
|
||||
static wxLayoutDirection GTKGetLayout(GtkWidget *widget);
|
||||
static void GTKSetLayout(GtkWidget *widget, wxLayoutDirection dir);
|
||||
|
||||
// return true if this window must have a non-NULL parent, false if it can
|
||||
// be created without parent (normally only top level windows but in wxGTK
|
||||
// there is also the exception of wxMenuBar)
|
||||
virtual bool GTKNeedsParent() const { return !IsTopLevel(); }
|
||||
|
||||
// This is called when capture is taken from the window. It will
|
||||
// fire off capture lost events.
|
||||
void GTKReleaseMouseAndNotify();
|
||||
|
||||
GdkWindow* GTKGetDrawingWindow() const;
|
||||
|
||||
bool GTKHandleFocusIn();
|
||||
bool GTKHandleFocusOut();
|
||||
void GTKHandleFocusOutNoDeferring();
|
||||
static void GTKHandleDeferredFocusOut();
|
||||
|
||||
protected:
|
||||
// for controls composed of multiple GTK widgets, return true to eliminate
|
||||
// spurious focus events if the focus changes between GTK+ children within
|
||||
// the same wxWindow
|
||||
virtual bool GTKNeedsToFilterSameWindowFocus() const { return false; }
|
||||
|
||||
// Override GTKWidgetNeedsMnemonic and return true if your
|
||||
// needs to set its mnemonic widget, such as for a
|
||||
// GtkLabel for wxStaticText, then do the actual
|
||||
// setting of the widget inside GTKWidgetDoSetMnemonic
|
||||
virtual bool GTKWidgetNeedsMnemonic() const;
|
||||
virtual void GTKWidgetDoSetMnemonic(GtkWidget* w);
|
||||
|
||||
// Get the GdkWindows making part of this window: usually there will be
|
||||
// only one of them in which case it should be returned directly by this
|
||||
// function. If there is more than one GdkWindow (can be the case for
|
||||
// composite widgets), return NULL and fill in the provided array
|
||||
//
|
||||
// This is not pure virtual for backwards compatibility but almost
|
||||
// certainly must be overridden in any wxControl-derived class!
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
// Check if the given window makes part of this widget
|
||||
bool GTKIsOwnWindow(GdkWindow *window) const;
|
||||
|
||||
public:
|
||||
// Returns the default context which usually is anti-aliased
|
||||
PangoContext *GTKGetPangoDefaultContext();
|
||||
|
||||
#if wxUSE_TOOLTIPS
|
||||
// applies tooltip to the widget (tip must be UTF-8 encoded)
|
||||
virtual void GTKApplyToolTip( GtkTooltips *tips, const gchar *tip );
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
|
||||
// Called when a window should delay showing itself
|
||||
// until idle time used in Reparent().
|
||||
void GTKShowOnIdle() { m_showOnIdle = true; }
|
||||
|
||||
// This is called from the various OnInternalIdle methods
|
||||
bool GTKShowFromOnIdle();
|
||||
|
||||
// is this window transparent for the mouse events (as wxStaticBox is)?
|
||||
virtual bool GTKIsTransparentForMouse() const { return false; }
|
||||
|
||||
// Common scroll event handling code for wxWindow and wxScrollBar
|
||||
wxEventType GTKGetScrollEventType(GtkRange* range);
|
||||
|
||||
// position and size of the window
|
||||
int m_x, m_y;
|
||||
int m_width, m_height;
|
||||
int m_oldClientWidth,m_oldClientHeight;
|
||||
|
||||
// see the docs in src/gtk/window.cpp
|
||||
GtkWidget *m_widget; // mostly the widget seen by the rest of GTK
|
||||
GtkWidget *m_wxwindow; // mostly the client area as per wxWidgets
|
||||
|
||||
// label for use with GetLabelSetLabel
|
||||
wxString m_gtkLabel;
|
||||
|
||||
// return true if the window is of a standard (i.e. not wxWidgets') class
|
||||
bool IsOfStandardClass() const { return m_wxwindow == NULL; }
|
||||
|
||||
// this widget will be queried for GTK's focus events
|
||||
GtkWidget *m_focusWidget;
|
||||
|
||||
void GTKDisableFocusOutEvent();
|
||||
void GTKEnableFocusOutEvent();
|
||||
|
||||
wxGtkIMData *m_imData;
|
||||
|
||||
|
||||
// indices for the arrays below
|
||||
enum ScrollDir { ScrollDir_Horz, ScrollDir_Vert, ScrollDir_Max };
|
||||
|
||||
// horizontal/vertical scroll bar
|
||||
GtkRange* m_scrollBar[ScrollDir_Max];
|
||||
|
||||
// horizontal/vertical scroll position
|
||||
double m_scrollPos[ScrollDir_Max];
|
||||
|
||||
// return the scroll direction index corresponding to the given orientation
|
||||
// (which is wxVERTICAL or wxHORIZONTAL)
|
||||
static ScrollDir ScrollDirFromOrient(int orient)
|
||||
{
|
||||
return orient == wxVERTICAL ? ScrollDir_Vert : ScrollDir_Horz;
|
||||
}
|
||||
|
||||
// return the orientation for the given scrolling direction
|
||||
static int OrientFromScrollDir(ScrollDir dir)
|
||||
{
|
||||
return dir == ScrollDir_Horz ? wxHORIZONTAL : wxVERTICAL;
|
||||
}
|
||||
|
||||
// find the direction of the given scrollbar (must be one of ours)
|
||||
ScrollDir ScrollDirFromRange(GtkRange *range) const;
|
||||
|
||||
// set the current cursor for all GdkWindows making part of this widget
|
||||
// (see GTKGetWindow)
|
||||
void GTKUpdateCursor(bool update_self = true, bool recurse = true);
|
||||
|
||||
// extra (wxGTK-specific) flags
|
||||
bool m_noExpose:1; // wxGLCanvas has its own redrawing
|
||||
bool m_nativeSizeEvent:1; // wxGLCanvas sends wxSizeEvent upon "alloc_size"
|
||||
bool m_hasVMT:1; // set after PostCreation() is called
|
||||
bool m_isScrolling:1; // dragging scrollbar thumb?
|
||||
bool m_clipPaintRegion:1; // true after ScrollWindow()
|
||||
wxRegion m_nativeUpdateRegion; // not transformed for RTL
|
||||
bool m_dirtyTabOrder:1; // tab order changed, GTK focus
|
||||
// chain needs update
|
||||
bool m_needsStyleChange:1; // May not be able to change
|
||||
// background style until OnIdle
|
||||
bool m_mouseButtonDown:1;
|
||||
|
||||
bool m_showOnIdle:1; // postpone showing the window until idle
|
||||
|
||||
protected:
|
||||
// implement the base class pure virtuals
|
||||
virtual void DoGetTextExtent(const wxString& string,
|
||||
int *x, int *y,
|
||||
int *descent = NULL,
|
||||
int *externalLeading = NULL,
|
||||
const wxFont *font = NULL) const;
|
||||
virtual void DoClientToScreen( int *x, int *y ) const;
|
||||
virtual void DoScreenToClient( int *x, int *y ) const;
|
||||
virtual void DoGetPosition( int *x, int *y ) const;
|
||||
virtual void DoGetSize( int *width, int *height ) const;
|
||||
virtual void DoGetClientSize( int *width, int *height ) const;
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
virtual wxSize DoGetBorderSize() const;
|
||||
virtual void DoMoveWindow(int x, int y, int width, int height);
|
||||
virtual void DoEnable(bool enable);
|
||||
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
virtual void DoCaptureMouse();
|
||||
virtual void DoReleaseMouse();
|
||||
|
||||
virtual void DoFreeze();
|
||||
virtual void DoThaw();
|
||||
|
||||
void GTKFreezeWidget(GtkWidget *w);
|
||||
void GTKThawWidget(GtkWidget *w);
|
||||
|
||||
#if wxUSE_TOOLTIPS
|
||||
virtual void DoSetToolTip( wxToolTip *tip );
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
|
||||
// common part of all ctors (not virtual because called from ctor)
|
||||
void Init();
|
||||
|
||||
virtual void DoMoveInTabOrder(wxWindow *win, WindowOrder move);
|
||||
virtual bool DoNavigateIn(int flags);
|
||||
|
||||
|
||||
// Copies m_children tab order to GTK focus chain:
|
||||
void RealizeTabOrder();
|
||||
|
||||
// Called by ApplyWidgetStyle (which is called by SetFont() and
|
||||
// SetXXXColour etc to apply style changed to native widgets) to create
|
||||
// modified GTK style with non-standard attributes. If forceStyle=true,
|
||||
// creates empty GtkRcStyle if there are no modifications, otherwise
|
||||
// returns NULL in such case.
|
||||
GtkRcStyle *GTKCreateWidgetStyle(bool forceStyle = false);
|
||||
|
||||
// Overridden in many GTK widgets who have to handle subwidgets
|
||||
virtual void GTKApplyWidgetStyle(bool forceStyle = false);
|
||||
|
||||
// helper function to ease native widgets wrapping, called by
|
||||
// ApplyWidgetStyle -- override this, not ApplyWidgetStyle
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
|
||||
// sets the border of a given GtkScrolledWindow from a wx style
|
||||
static void GTKScrolledWindowSetBorder(GtkWidget* w, int style);
|
||||
|
||||
// Connect the given function to the specified signal on m_widget.
|
||||
//
|
||||
// This is just a wrapper for g_signal_connect() and returns the handler id
|
||||
// just as it does.
|
||||
gulong GTKConnectWidget(const char *signal, void (*callback)());
|
||||
|
||||
// Return true from here if PostCreation() should connect to size_request
|
||||
// signal: this is done by default but doesn't work for some native
|
||||
// controls which override this function to return false
|
||||
virtual bool GTKShouldConnectSizeRequest() const { return !IsTopLevel(); }
|
||||
|
||||
void ConstrainSize();
|
||||
|
||||
private:
|
||||
enum ScrollUnit { ScrollUnit_Line, ScrollUnit_Page, ScrollUnit_Max };
|
||||
|
||||
// common part of ScrollLines() and ScrollPages() and could be used, in the
|
||||
// future, for horizontal scrolling as well
|
||||
//
|
||||
// return true if we scrolled, false otherwise (on error or simply if we
|
||||
// are already at the end)
|
||||
bool DoScrollByUnits(ScrollDir dir, ScrollUnit unit, int units);
|
||||
virtual void AddChildGTK(wxWindowGTK* child);
|
||||
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxWindowGTK)
|
||||
wxDECLARE_NO_COPY_CLASS(wxWindowGTK);
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_WINDOW_H_
|
Reference in New Issue
Block a user