merged 2.4 branch into the trunk
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -65,6 +65,7 @@ public:
|
||||
// --------------
|
||||
|
||||
void ApplyWidgetStyle();
|
||||
bool IsOwnGtkWindow( GdkWindow *window );
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
|
||||
// Implicit conversion from the colour name
|
||||
wxColour( const wxString &colourName ) { InitFromName(colourName); }
|
||||
wxColour( const char *colourName ) { InitFromName(colourName); }
|
||||
wxColour( const char *colourName ) { InitFromName( wxString::FromAscii(colourName) ); }
|
||||
#if wxUSE_UNICODE
|
||||
wxColour( const wxChar *colourName ) { InitFromName( wxString(colourName) ); }
|
||||
#endif
|
||||
|
||||
@@ -108,6 +108,8 @@ public:
|
||||
|
||||
// implementation
|
||||
|
||||
virtual void SetFocus();
|
||||
|
||||
void OnSize( wxSizeEvent &event );
|
||||
void OnChar( wxKeyEvent &event );
|
||||
|
||||
|
||||
@@ -22,10 +22,8 @@ class wxDataObject : public wxDataObjectBase
|
||||
{
|
||||
public:
|
||||
wxDataObject();
|
||||
#ifdef __DARWIN__
|
||||
virtual ~wxDataObject() { }
|
||||
#endif
|
||||
|
||||
virtual ~wxDataObject();
|
||||
|
||||
virtual bool IsSupportedFormat( const wxDataFormat& format, Direction dir = Get ) const;
|
||||
};
|
||||
|
||||
|
||||
@@ -118,6 +118,8 @@ public:
|
||||
wxWindow *m_owner;
|
||||
wxRegion m_currentClippingRegion;
|
||||
wxRegion m_paintClippingRegion;
|
||||
|
||||
// PangoContext stuff for GTK 2.0
|
||||
#ifdef __WXGTK20__
|
||||
PangoContext *m_context;
|
||||
PangoFontDescription *m_fontdesc;
|
||||
|
||||
@@ -96,6 +96,9 @@ public:
|
||||
virtual void SetEncoding(wxFontEncoding encoding);
|
||||
virtual void SetNativeFontInfo( const wxNativeFontInfo& info );
|
||||
|
||||
virtual void SetNoAntiAliasing( bool no = TRUE );
|
||||
virtual bool GetNoAntiAliasing();
|
||||
|
||||
// implementation from now on
|
||||
void Unshare();
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ public:
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
bool m_menuBarDetached;
|
||||
int m_menuBarHeight;
|
||||
bool m_toolBarDetached;
|
||||
|
||||
protected:
|
||||
@@ -95,8 +96,14 @@ protected:
|
||||
virtual void DoGetClientSize( int *width, int *height ) const;
|
||||
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
|
||||
virtual void DetachMenuBar();
|
||||
virtual void AttachMenuBar(wxMenuBar *menubar);
|
||||
|
||||
public:
|
||||
// Menu size is dynamic now, call this whenever it might change.
|
||||
void UpdateMenuBarSize();
|
||||
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||
|
||||
@@ -42,25 +42,32 @@ extern const wxChar* wxGaugeNameStr;
|
||||
class wxGauge: public wxControl
|
||||
{
|
||||
public:
|
||||
inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; }
|
||||
wxGauge() { Init(); }
|
||||
|
||||
inline 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 )
|
||||
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 )
|
||||
{
|
||||
Create(parent, id, range, pos, size, style, validator, name);
|
||||
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) ) {};
|
||||
|
||||
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) ) { }
|
||||
void SetRange( int r );
|
||||
void SetValue( int pos );
|
||||
int GetShadowWidth() const { return 0; };
|
||||
@@ -68,17 +75,27 @@ public:
|
||||
int GetRange() const;
|
||||
int GetValue() const;
|
||||
|
||||
// Are we a Win95/GTK progress bar, or a normal gauge?
|
||||
inline bool GetProgressBar() const { return m_useProgressBar; }
|
||||
|
||||
// implementation
|
||||
// -------------
|
||||
|
||||
|
||||
void ApplyWidgetStyle();
|
||||
int m_rangeMax;
|
||||
int m_gaugePos;
|
||||
bool m_useProgressBar;
|
||||
|
||||
|
||||
// the max and current gauge values
|
||||
int m_rangeMax,
|
||||
m_gaugePos;
|
||||
|
||||
// obsolete functions, don't use
|
||||
#ifdef WXWIN_COMPATIBILITY_2_2
|
||||
bool GetProgressBar() const { return TRUE; }
|
||||
#endif // WXWIN_COMPATIBILITY_2_2
|
||||
|
||||
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();
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxGauge)
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// Created: 17/8/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
@@ -65,15 +65,15 @@ class WXDLLEXPORT wxGLContext: public wxObject
|
||||
{
|
||||
public:
|
||||
wxGLContext( bool isRGB, wxWindow *win, const wxPalette& palette = wxNullPalette );
|
||||
wxGLContext(
|
||||
bool WXUNUSED(isRGB), wxWindow *win,
|
||||
wxGLContext(
|
||||
bool WXUNUSED(isRGB), wxWindow *win,
|
||||
const wxPalette& WXUNUSED(palette),
|
||||
const wxGLContext *other /* for sharing display lists */
|
||||
);
|
||||
~wxGLContext();
|
||||
|
||||
void SetCurrent();
|
||||
void SetColour(const char *colour);
|
||||
void SetColour(const wxChar *colour);
|
||||
void SwapBuffers();
|
||||
|
||||
void SetupPixelFormat();
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
GtkWidget *m_widget;
|
||||
wxPalette m_palette;
|
||||
wxWindow* m_window;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxGLContext)
|
||||
};
|
||||
@@ -110,51 +110,52 @@ public:
|
||||
m_vi = (void*) NULL;
|
||||
m_exposed = FALSE;
|
||||
}
|
||||
wxGLCanvas( wxWindow *parent, wxWindowID id = -1,
|
||||
wxGLCanvas( wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0, const wxString& name = "GLCanvas",
|
||||
int *attribList = (int*) NULL,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0, const wxString& name = wxGLCanvasName,
|
||||
int *attribList = (int*) NULL,
|
||||
const wxPalette& palette = wxNullPalette );
|
||||
wxGLCanvas( wxWindow *parent, const wxGLContext *shared = (wxGLContext *)NULL,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0, const wxString& name = "GLCanvas",
|
||||
int *attribList = (int*) NULL,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0, const wxString& name = wxGLCanvasName,
|
||||
int *attribList = (int*) NULL,
|
||||
const wxPalette& palette = wxNullPalette );
|
||||
wxGLCanvas( wxWindow *parent, const wxGLCanvas *shared = (wxGLCanvas *)NULL,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0, const wxString& name = "GLCanvas",
|
||||
int *attribList = (int*) NULL,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0, const wxString& name = wxGLCanvasName,
|
||||
int *attribList = (int*) NULL,
|
||||
const wxPalette& palette = wxNullPalette );
|
||||
|
||||
bool Create( wxWindow *parent,
|
||||
const wxGLContext *shared = (wxGLContext*)NULL,
|
||||
const wxGLCanvas *shared_context_of = (wxGLCanvas*)NULL,
|
||||
wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0, const wxString& name = "GLCanvas",
|
||||
int *attribList = (int*) NULL,
|
||||
const wxPalette& palette = wxNullPalette );
|
||||
|
||||
bool Create( wxWindow *parent,
|
||||
const wxGLContext *shared = (wxGLContext*)NULL,
|
||||
const wxGLCanvas *shared_context_of = (wxGLCanvas*)NULL,
|
||||
wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = wxGLCanvasName,
|
||||
int *attribList = (int*) NULL,
|
||||
const wxPalette& palette = wxNullPalette );
|
||||
|
||||
~wxGLCanvas();
|
||||
|
||||
void SetCurrent();
|
||||
void SetColour(const char *colour);
|
||||
void SetColour(const wxChar *colour);
|
||||
void SwapBuffers();
|
||||
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
|
||||
void OnInternalIdle();
|
||||
|
||||
inline wxGLContext* GetContext() const { return m_glContext; }
|
||||
inline wxGLContext* GetContext() const { return m_glContext; }
|
||||
|
||||
// implementation
|
||||
|
||||
|
||||
wxGLContext *m_glContext,
|
||||
*m_sharedContext;
|
||||
wxGLCanvas *m_sharedContextOf;
|
||||
@@ -162,10 +163,10 @@ public:
|
||||
bool m_canFreeVi;
|
||||
GtkWidget *m_glWidget;
|
||||
bool m_exposed;
|
||||
|
||||
|
||||
// returns an XVisualInfo* based on desired GL attributes;
|
||||
// returns NULL if an appropriate visual is not found. The
|
||||
// caller is reponsible for using XFree() to deallocate
|
||||
// caller is reponsible for using XFree() to deallocate
|
||||
// the returned structure.
|
||||
static void* ChooseGLVisual(int *attribList);
|
||||
|
||||
|
||||
@@ -122,12 +122,15 @@ public:
|
||||
// selection internally instead of querying the notebook for it
|
||||
int m_selection;
|
||||
|
||||
// flag set to TRUE while we're inside "switch_page" callback
|
||||
bool m_inSwitchPage;
|
||||
|
||||
protected:
|
||||
// remove one page from the notebook but do not destroy it
|
||||
virtual wxNotebookPage *DoRemovePage(int nPage);
|
||||
|
||||
private:
|
||||
|
||||
// the padding set by SetPadding()
|
||||
int m_padding;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxNotebook)
|
||||
|
||||
@@ -146,11 +146,11 @@ public:
|
||||
void Reset() { m_current = 0u; }
|
||||
void Reset(const wxRegion& region);
|
||||
|
||||
operator bool () const;
|
||||
bool HaveRects() const;
|
||||
operator bool () const { return HaveRects(); }
|
||||
|
||||
void operator ++ ();
|
||||
void operator ++ (int);
|
||||
wxRegionIterator& operator ++ ();
|
||||
wxRegionIterator operator ++ (int);
|
||||
|
||||
wxCoord GetX() const;
|
||||
wxCoord GetY() const;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#define __GTKSCROLLBARH__
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface
|
||||
#pragma interface "scrolbar.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
@@ -157,6 +157,17 @@ public:
|
||||
// and sets m_widgetStyle to this value.
|
||||
GtkStyle *GetWidgetStyle();
|
||||
|
||||
#ifdef __WXGTK20__
|
||||
// Returns the default context which usually is anti-aliased
|
||||
PangoContext *GtkGetPangoDefaultContext();
|
||||
|
||||
// Returns the X11 context which renders on the X11 client
|
||||
// side (which can be remote) and which usually is not
|
||||
// anti-aliased and is thus faster
|
||||
PangoContext *GtkGetPangoX11Context();
|
||||
PangoContext *m_x11Context;
|
||||
#endif
|
||||
|
||||
// Called by SetFont() and SetXXXColour etc
|
||||
void SetWidgetStyle();
|
||||
|
||||
@@ -195,11 +206,15 @@ public:
|
||||
// this widget will be queried for GTK's focus events
|
||||
GtkWidget *m_focusWidget;
|
||||
|
||||
#ifdef __WXGTK20__
|
||||
GtkIMMulticontext *m_imContext;
|
||||
#else
|
||||
#if HAVE_XIM
|
||||
// XIM support for wxWindows
|
||||
GdkIC *m_ic;
|
||||
GdkICAttr *m_icattr;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __WXGTK20__
|
||||
// The area to be cleared (and not just refreshed)
|
||||
|
||||
Reference in New Issue
Block a user