Compare commits
131 Commits
v2.7.1
...
wxPy_2_7_1
Author | SHA1 | Date | |
---|---|---|---|
|
687d0aeae0 | ||
|
24f6c4e865 | ||
|
72156afeb5 | ||
|
26e4b9d063 | ||
|
974a50f1bb | ||
|
7b61ea68e2 | ||
|
77f62aa7b6 | ||
|
6231770f89 | ||
|
88bbc3329b | ||
|
0fb2e8796d | ||
|
3a8b3bd159 | ||
|
40131743c6 | ||
|
a91225b27b | ||
|
15d4b8cdb5 | ||
|
dcc36b34be | ||
|
17b5a3eccb | ||
|
122c2bae32 | ||
|
5f8047a69b | ||
|
e225fe17a8 | ||
|
61b3549028 | ||
|
7753ca6bed | ||
|
d4ca60e8a6 | ||
|
fd39f7a893 | ||
|
ba53bf083e | ||
|
37840b8bc1 | ||
|
f6fc052ae5 | ||
|
f17e0ebd63 | ||
|
daad5a23b7 | ||
|
ffd73a2c76 | ||
|
1b88201ff5 | ||
|
082cfe55b9 | ||
|
38f833b10c | ||
|
daca43d847 | ||
|
edba2de33e | ||
|
fd7a7443bc | ||
|
e3e89a9370 | ||
|
93c5f7558e | ||
|
c78a1b7649 | ||
|
2c7816ffd1 | ||
|
9b9401385f | ||
|
a0fd79ba38 | ||
|
0a82ca5b33 | ||
|
52e22a61ce | ||
|
1ed6bbc207 | ||
|
bc429ce01f | ||
|
fa96a36ecf | ||
|
73703a8063 | ||
|
5f2502393e | ||
|
a49b2d272a | ||
|
41c4b3ef21 | ||
|
e2e0b76a95 | ||
|
f9c1b462c7 | ||
|
d1cf7e2aa4 | ||
|
cd46ad2be4 | ||
|
4a10e43b27 | ||
|
c18fa7a4b6 | ||
|
f1d6804f7c | ||
|
e8a8d0dc2d | ||
|
59185e297d | ||
|
8d0ca2928b | ||
|
1c4e8f384d | ||
|
008a265578 | ||
|
d218e518d8 | ||
|
ecf3b4a57f | ||
|
e47c778924 | ||
|
e60022505d | ||
|
34445cc76d | ||
|
55dc8e189d | ||
|
1e89eecdc2 | ||
|
9c862cfb93 | ||
|
9fd707a51f | ||
|
ad0023978e | ||
|
fc964c0d23 | ||
|
9fd8f2dd3d | ||
|
653752be8a | ||
|
8db7faf281 | ||
|
fe63cfad2b | ||
|
cdac585c3b | ||
|
87d658e5d7 | ||
|
af05af4d87 | ||
|
02ae785a8a | ||
|
23c085422e | ||
|
d41e1ab481 | ||
|
83b96a06ca | ||
|
b0ae510a86 | ||
|
e338053c00 | ||
|
64b75e644a | ||
|
37c9624ecf | ||
|
62f51f1f90 | ||
|
3a5608d3cf | ||
|
8c4e2405ca | ||
|
4f74e0d132 | ||
|
50679f941e | ||
|
eba91e51e8 | ||
|
7cd7bc23d5 | ||
|
4913272f9c | ||
|
f387b80e0e | ||
|
e6c3d3e655 | ||
|
fb743cab53 | ||
|
eb89f88a43 | ||
|
8c9fd6e54e | ||
|
fc2d420900 | ||
|
80fdb7b34d | ||
|
39b5648ed2 | ||
|
47892637d3 | ||
|
db71eb0640 | ||
|
bfeeb7f3a2 | ||
|
8e99bda941 | ||
|
d9c8cf74dd | ||
|
b8dc98c8f5 | ||
|
b7dd8ad1b4 | ||
|
5b20646ea8 | ||
|
96285a18aa | ||
|
19c9f36f13 | ||
|
99ceaa26e4 | ||
|
6850c57605 | ||
|
432efcb004 | ||
|
51ad652fa2 | ||
|
cfa3b25626 | ||
|
9654efd332 | ||
|
820716c69f | ||
|
c819dcf7d3 | ||
|
eda276b092 | ||
|
8913c40c32 | ||
|
ddd5387387 | ||
|
a525c564dc | ||
|
8170f2ee3e | ||
|
331139716c | ||
|
c66068835e | ||
|
6ff2b4376b | ||
|
19fea3417d |
36
configure.in
36
configure.in
@@ -35,7 +35,7 @@ dnl wx_release_number += 1
|
||||
wx_major_version_number=2
|
||||
wx_minor_version_number=7
|
||||
wx_release_number=1
|
||||
wx_subrelease_number=0
|
||||
wx_subrelease_number=1
|
||||
|
||||
WX_RELEASE=$wx_major_version_number.$wx_minor_version_number
|
||||
WX_VERSION=$WX_RELEASE.$wx_release_number
|
||||
@@ -3085,6 +3085,9 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
|
||||
AC_MSG_WARN([Unicode configuration not supported with GTK+ 1.x])
|
||||
wxUSE_UNICODE=no
|
||||
fi
|
||||
|
||||
dnl test for XIM support in libgdk
|
||||
AC_CHECK_LIB(gdk, gdk_im_open, AC_DEFINE(HAVE_XIM))
|
||||
fi
|
||||
|
||||
AC_LANG_POP
|
||||
@@ -3102,10 +3105,6 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
|
||||
TOOLKIT=GTK
|
||||
GUIDIST=GTK_DIST
|
||||
|
||||
dnl test for XIM support in libgdk
|
||||
AC_CHECK_LIB(gdk, gdk_im_open, AC_DEFINE(HAVE_XIM))
|
||||
|
||||
|
||||
dnl test for external libxpm if we're configured to use it
|
||||
if test "$wxUSE_GPE" = "yes"; then
|
||||
AC_MSG_CHECKING(for gpewidget library)
|
||||
@@ -6926,10 +6925,6 @@ if test "$wxUSE_RICHTEXT" = "yes"; then
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS richtext"
|
||||
fi
|
||||
|
||||
if test "$wxUSE_GRAPHICS_CONTEXT" = "yes"; then
|
||||
AC_DEFINE(wxUSE_GRAPHICS_CONTEXT)
|
||||
fi
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl wxImage options
|
||||
dnl ---------------------------------------------------------------------------
|
||||
@@ -7036,6 +7031,29 @@ if test "$wxUSE_WIZARDDLG" = "yes"; then
|
||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS wizard"
|
||||
fi
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl wxGraphicsContext
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
if test "$wxUSE_GRAPHICS_CONTEXT" = "yes"; then
|
||||
if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = "1"; then
|
||||
AC_DEFINE(wxUSE_GRAPHICS_CONTEXT)
|
||||
elif test "$wxUSE_GTK" != 1; then
|
||||
dnl for other builds we'll just wing it for now...
|
||||
AC_DEFINE(wxUSE_GRAPHICS_CONTEXT)
|
||||
else
|
||||
dnl ...but let's check for cairo availability for wxGTK builds
|
||||
PKG_CHECK_MODULES(CAIRO, cairo,
|
||||
[
|
||||
AC_DEFINE(wxUSE_GRAPHICS_CONTEXT)
|
||||
],
|
||||
[
|
||||
AC_MSG_WARN([Cairo library not found, unable to set wxUSE_GRAPHICS_CONTEXT])
|
||||
]
|
||||
)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl wxMediaCtrl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# $Id$
|
||||
|
||||
CONTRIB_SUBDIRS=fl gizmos mmedia ogl plot stc svg deprecated animate #applet
|
||||
CONTRIB_SUBDIRS=fl gizmos mmedia ogl plot stc svg deprecated #animate #applet
|
||||
|
||||
all:
|
||||
@for d in $(CONTRIB_SUBDIRS); do (cd $$d && $(MAKE)); done
|
||||
|
@@ -4,7 +4,7 @@
|
||||
// Author: Jonathan Bayer
|
||||
// Modified by:
|
||||
// Created:
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Jonathan Bayer
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -651,4 +651,3 @@ void wxMultiCellCanvas :: CalculateConstraints()
|
||||
}
|
||||
|
||||
/*** End of File ***/
|
||||
|
||||
|
8
debian/changelog
vendored
8
debian/changelog
vendored
@@ -1,3 +1,11 @@
|
||||
wxwidgets2.7 (2.7.1.1-0) unstable; urgency=low
|
||||
|
||||
* First 2.7.x release from wxPython team.
|
||||
* Many enhancements, changes, fixes and updates. See
|
||||
http://wxpython.org/CHANGES.txt for details.
|
||||
|
||||
-- Robin Dunn <robin@alldunn.com> Wed, 18 Oct 2006 17:09:53 -0700
|
||||
|
||||
wxwidgets2.7 (2.7.0.0-2) unstable; urgency=low
|
||||
|
||||
* Fixes to ansi packages builds
|
||||
|
@@ -2,6 +2,6 @@
|
||||
<bakefile-gen>
|
||||
<include file="../../build/bakefiles/Bakefiles.bkgen"/>
|
||||
<!-- add extra formats to release -->
|
||||
<enable-formats>dmars,dmars_smake,msevc4prj</enable-formats>
|
||||
<enable-formats>gnu,dmars,dmars_smake,msevc4prj</enable-formats>
|
||||
</bakefile-gen>
|
||||
|
||||
|
@@ -17,7 +17,7 @@ DOCDIR=${WX_TEMP_DIR}/wxWidgets/docs/
|
||||
CURDATE=`date -I`
|
||||
|
||||
# build info
|
||||
BUILD_VERSION=2.7.1-rc
|
||||
BUILD_VERSION=2.7.2-rc1
|
||||
BUILD_TAG=HEAD
|
||||
|
||||
|
||||
|
@@ -114,11 +114,20 @@ doinit()
|
||||
dospinport(){
|
||||
port=$1
|
||||
|
||||
if [ $port != "all" ]; then
|
||||
portname="`echo $port|tr '[a-z]' '[A-Z]'`"
|
||||
else
|
||||
portname="Widgets"
|
||||
fi
|
||||
case "$port" in
|
||||
all)
|
||||
portname="Widgets";;
|
||||
base)
|
||||
portname="Base";;
|
||||
motif)
|
||||
portname="Motif";;
|
||||
mac)
|
||||
portname="Mac";;
|
||||
*)
|
||||
# for all the others (DFB, GTK, MGL, MSW, X11) just use the
|
||||
# upper-case version as they are abbreviations
|
||||
portname=`echo $port | tr '[a-z]' '[A-Z]'`;;
|
||||
esac
|
||||
|
||||
echo "Creating wx$portname distribution..."
|
||||
|
||||
|
@@ -38,7 +38,6 @@ INCOMPATIBLE CHANGES SINCE 2.6.x
|
||||
- wxDialog::CreateButtonSizer() may return NULL now, please see the manual
|
||||
|
||||
|
||||
|
||||
Deprecated methods since 2.6.x and their replacements
|
||||
-----------------------------------------------------
|
||||
|
||||
@@ -52,6 +51,18 @@ Major changes in 2.7 release
|
||||
- New AUI library supporting docking windows and much more
|
||||
|
||||
|
||||
2.7.2
|
||||
-----
|
||||
|
||||
All (GUI):
|
||||
|
||||
- wxMemoryDC constructor now optionally accepts a wxBitmap parameter,
|
||||
calling SelectObject itself if a valid bitmap is passed.
|
||||
- Reverted wxBuffered[Paint]DC to pre 2.7.1 state, added
|
||||
wxAutoBufferedPaintDC and wxAutoBufferedPaintDCFactory.
|
||||
|
||||
|
||||
|
||||
2.7.1
|
||||
-----
|
||||
|
||||
|
@@ -22,11 +22,12 @@ your \texttt{OnPaint()} handler, you should look at
|
||||
\helpref{wxBufferedPaintDC}{wxbufferedpaintdc} or \helpref{wxAutoBufferedPaintDC}{wxautobufferedpaintdc}.
|
||||
|
||||
Please note that GTK+ 2.0 as well as OS X provide double buffering themselves
|
||||
natively. wxBufferedDC is aware of this however, and will bypass the buffering
|
||||
unless explicit buffer bitmap is given.
|
||||
+natively. Use \helpref{wxWindow::IsDoubleBuffered}{wxwindowisdoublebuffered} to
|
||||
+determine whether you need to use buffering or not.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxMemoryDC}{wxmemorydc}\\
|
||||
\helpref{wxDC}{wxdc}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
@@ -48,9 +49,9 @@ unless explicit buffer bitmap is given.
|
||||
|
||||
\func{}{wxBufferedDC}{\void}
|
||||
|
||||
\func{}{wxBufferedDC}{\param{wxDC *}{dc}, \param{const wxBitmap\& }{buffer}, \param{int }{style = wxBUFFER\_CLIENT\_AREA}}
|
||||
\func{}{wxBufferedDC}{\param{wxDC *}{dc}, \param{const wxSize\& }{area}, \param{int }{style = wxBUFFER\_CLIENT\_AREA}}
|
||||
|
||||
\func{}{wxBufferedDC}{\param{wxWindow*}{window}, \param{wxDC *}{dc}, \param{const wxSize\& }{area}, \param{int }{style = wxBUFFER\_CLIENT\_AREA}}
|
||||
\func{}{wxBufferedDC}{\param{wxDC *}{dc}, \param{const wxBitmap\& }{buffer}, \param{int }{style = wxBUFFER\_CLIENT\_AREA}}
|
||||
|
||||
If you use the first, default, constructor, you must call one of the
|
||||
\helpref{Init}{wxbuffereddcinit} methods later in order to use the object.
|
||||
@@ -64,10 +65,6 @@ must not be called after using them.
|
||||
flushed to this DC when this object is destroyed. You may pass NULL
|
||||
in order to just initialize the buffer, and not flush it.}
|
||||
|
||||
\docparam{window}{The window on which the dc paints. May be NULL, but
|
||||
you should normally specify this so that the DC can be aware whether the
|
||||
surface is natively double-buffered or not.}
|
||||
|
||||
\docparam{area}{The size of the bitmap to be used for buffering (this bitmap is
|
||||
created internally when it is not given explicitly).}
|
||||
|
||||
@@ -83,9 +80,9 @@ device context).}
|
||||
|
||||
\membersection{wxBufferedDC::Init}\label{wxbuffereddcinit}
|
||||
|
||||
\func{void}{Init}{\param{wxDC *}{dc}, \param{const wxBitmap\& }{buffer}, \param{int }{style = wxBUFFER\_CLIENT\_AREA}}
|
||||
\func{void}{Init}{\param{wxDC *}{dc}, \param{const wxSize\& }{area}, \param{int }{style = wxBUFFER\_CLIENT\_AREA}}
|
||||
|
||||
\func{void}{Init}{\param{wxWindow*}{window}, \param{wxDC *}{dc}, \param{const wxSize\& }{area}, \param{int }{style = wxBUFFER\_CLIENT\_AREA}}
|
||||
\func{void}{Init}{\param{wxDC *}{dc}, \param{const wxBitmap\& }{buffer}, \param{int }{style = wxBUFFER\_CLIENT\_AREA}}
|
||||
|
||||
These functions initialize the object created using the default constructor.
|
||||
Please see \helpref{constructors documentation}{wxbuffereddcctor} for details.
|
||||
@@ -116,6 +113,7 @@ already does this internally for the real underlying wxPaintDC.
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxBufferedDC}{wxbuffereddc}\\
|
||||
\helpref{wxMemoryDC}{wxmemorydc}\\
|
||||
\helpref{wxDC}{wxdc}\\
|
||||
\helpref{wxObject}{wxobject}
|
||||
|
||||
|
@@ -41,13 +41,14 @@ can be reselected into another memory DC.
|
||||
|
||||
\membersection{wxMemoryDC::wxMemoryDC}\label{wxmemorydcctor}
|
||||
|
||||
\func{}{wxMemoryDC}{\void}
|
||||
\func{}{wxMemoryDC}{\param{const wxBitmap\& }{bitmap = wxNullBitmap}}
|
||||
|
||||
Constructs a new memory device context.
|
||||
|
||||
Use the {\it Ok} member to test whether the constructor was successful
|
||||
in creating a usable device context. Don't forget to select a bitmap
|
||||
into the DC before drawing on it.
|
||||
in creating a usable device context. If you don't pass a valid bitmap
|
||||
to the constructor, don't forget to select a bitmap into the DC before
|
||||
drawing on it.
|
||||
|
||||
\membersection{wxMemoryDC::SelectObject}\label{wxmemorydcselectobject}
|
||||
|
||||
|
@@ -3603,9 +3603,10 @@ This function is currently only implemented under MSW.
|
||||
|
||||
Calling this method immediately repaints the invalidated area of the window and
|
||||
all of its children recursively while this would usually only happen when the
|
||||
flow of control returns to the event loop. Notice that this function doesn't
|
||||
refresh the window and does nothing if the window hadn't been already
|
||||
repainted. Use \helpref{Refresh}{wxwindowrefresh} first if you want to
|
||||
flow of control returns to the event loop.
|
||||
Notice that this function doesn't invalidate any area of the window so
|
||||
nothing happens if nothing has been invalidated (i.e. marked as requiring
|
||||
a redraw). Use \helpref{Refresh}{wxwindowrefresh} first if you want to
|
||||
immediately redraw the window unconditionally.
|
||||
|
||||
|
||||
|
@@ -35,18 +35,24 @@ public:
|
||||
wxFloatingPane(wxWindow* parent,
|
||||
wxFrameManager* owner_mgr,
|
||||
const wxPaneInfo& pane,
|
||||
wxWindowID id = wxID_ANY
|
||||
wxWindowID id = wxID_ANY,
|
||||
long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
|
||||
wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT |
|
||||
wxCLIP_CHILDREN
|
||||
);
|
||||
virtual ~wxFloatingPane();
|
||||
void SetPaneWindow(const wxPaneInfo& pane);
|
||||
|
||||
protected:
|
||||
virtual void OnMoveStart();
|
||||
virtual void OnMoving(const wxRect& window_rect, wxDirection dir);
|
||||
virtual void OnMoveFinished();
|
||||
|
||||
private:
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void OnMoveEvent(wxMoveEvent& event);
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
void OnMoveStart();
|
||||
void OnMoving(const wxRect& window_rect, wxDirection dir);
|
||||
void OnMoveFinished();
|
||||
void OnActivate(wxActivateEvent& event);
|
||||
static bool isMouseDown();
|
||||
private:
|
||||
|
@@ -218,6 +218,7 @@ public:
|
||||
bool IsRightDockable() const { return HasFlag(optionRightDockable); }
|
||||
bool IsFloatable() const { return HasFlag(optionFloatable); }
|
||||
bool IsMovable() const { return HasFlag(optionMovable); }
|
||||
bool IsDestroyOnClose() const { return HasFlag(optionDestroyOnClose); }
|
||||
bool HasCaption() const { return HasFlag(optionCaption); }
|
||||
bool HasGripper() const { return HasFlag(optionGripper); }
|
||||
bool HasBorder() const { return HasFlag(optionPaneBorder); }
|
||||
@@ -382,7 +383,7 @@ public:
|
||||
|
||||
|
||||
|
||||
|
||||
class WXDLLIMPEXP_AUI wxFloatingPane;
|
||||
|
||||
class WXDLLIMPEXP_AUI wxFrameManager : public wxEvtHandler
|
||||
{
|
||||
@@ -427,6 +428,8 @@ public:
|
||||
int insert_level = wxAUI_INSERT_PANE);
|
||||
|
||||
bool DetachPane(wxWindow* window);
|
||||
|
||||
void ClosePane(wxPaneInfo& pane_info);
|
||||
|
||||
wxString SavePaneInfo(wxPaneInfo& pane);
|
||||
void LoadPaneInfo(wxString pane_part, wxPaneInfo &pane);
|
||||
@@ -440,6 +443,7 @@ public:
|
||||
|
||||
|
||||
public:
|
||||
virtual wxFloatingPane * CreateFloatingFrame(wxWindow* parent, const wxPaneInfo& p);
|
||||
|
||||
void DrawHintRect(wxWindow* pane_window,
|
||||
const wxPoint& pt,
|
||||
|
@@ -5,7 +5,7 @@
|
||||
// Modified by:
|
||||
// Created: Aug-31-2006
|
||||
// Copyright: (c) Jaakko Salli
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/03/16
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -4,7 +4,7 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/02/15
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -30,7 +30,7 @@ protected:
|
||||
static void *sm_cocoaObserver;
|
||||
public:
|
||||
virtual wxWindow* GetWxWindow() const
|
||||
{ return NULL; }
|
||||
{ return NULL; }
|
||||
virtual void Cocoa_FrameChanged(void) = 0;
|
||||
virtual bool Cocoa_acceptsFirstMouse(bool &acceptsFirstMouse, WX_NSEvent theEvent)
|
||||
{ return false; }
|
||||
@@ -61,8 +61,9 @@ public:
|
||||
virtual bool Cocoa_otherMouseUp(WX_NSEvent theEvent)
|
||||
{ return false; }
|
||||
virtual bool Cocoa_resetCursorRects()
|
||||
{ return false; }
|
||||
{ return false; }
|
||||
virtual ~wxCocoaNSView() { }
|
||||
};
|
||||
|
||||
#endif // _WX_COCOA_NSVIEW_H_
|
||||
#endif
|
||||
// __WX_COCOA_NSVIEW_H__
|
||||
|
@@ -4,7 +4,7 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/03/16
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -2,9 +2,9 @@
|
||||
// Name: wx/cocoa/ObjcAssociate.h
|
||||
// Purpose: Associates an Objective-C class with a C++ class
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Modified by:
|
||||
// Created: 2002/12/03
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2002 David Elliott <dfe@cox.net>
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -76,4 +76,3 @@ void wxClass::Set##ObjcClass(WX_##ObjcClass cocoaObjcClass) \
|
||||
}
|
||||
|
||||
#endif // __WX_COCOA_OBJC_ASSOCIATE_H__
|
||||
|
||||
|
@@ -2,9 +2,9 @@
|
||||
// Name: wx/cocoa/ObjcPose.h
|
||||
// Purpose: Macros for initializing poseAs, among other things
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Modified by:
|
||||
// Created: 2002/12/03
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2002 David Elliott <dfe@cox.net>
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -22,31 +22,31 @@ Objective-C Poser class initialization
|
||||
class wxPoseAsInitializer
|
||||
{
|
||||
public:
|
||||
wxPoseAsInitializer()
|
||||
: m_next(sm_first)
|
||||
{
|
||||
sm_first = this;
|
||||
}
|
||||
virtual ~wxPoseAsInitializer()
|
||||
{
|
||||
sm_first = m_next;
|
||||
}
|
||||
static void InitializePosers()
|
||||
{
|
||||
while(sm_first)
|
||||
{
|
||||
delete sm_first;
|
||||
}
|
||||
};
|
||||
wxPoseAsInitializer()
|
||||
: m_next(sm_first)
|
||||
{
|
||||
sm_first = this;
|
||||
}
|
||||
virtual ~wxPoseAsInitializer()
|
||||
{
|
||||
sm_first = m_next;
|
||||
}
|
||||
static void InitializePosers()
|
||||
{
|
||||
while(sm_first)
|
||||
{
|
||||
delete sm_first;
|
||||
}
|
||||
};
|
||||
protected:
|
||||
wxPoseAsInitializer *m_next;
|
||||
static wxPoseAsInitializer *sm_first;
|
||||
wxPoseAsInitializer *m_next;
|
||||
static wxPoseAsInitializer *sm_first;
|
||||
};
|
||||
|
||||
class wxDummyForPoseAsInitializer
|
||||
{
|
||||
public:
|
||||
wxDummyForPoseAsInitializer(void*) {}
|
||||
wxDummyForPoseAsInitializer(void*) {}
|
||||
};
|
||||
|
||||
#define WX_IMPLEMENT_POSER(poser) \
|
||||
@@ -65,4 +65,3 @@ wxDummyForPoseAsInitializer wxDummyPoseAsInitializerFor##poser(new wxPoseAsIniti
|
||||
#endif // __OBJC__
|
||||
|
||||
#endif // __WX_COCOA_PRIVATE_POSER_H__
|
||||
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: include/wx/cocoa/bitmap.h
|
||||
// Name: wx/cocoa/bitmap.h
|
||||
// Purpose: wxBitmap class
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/07/19
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_BITMAP_H__
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
|
||||
// destructor
|
||||
virtual ~wxBitmap();
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Implementation
|
||||
// ------------------------------------------------------------------------
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
void SetMask(wxMask *mask) ;
|
||||
|
||||
int GetBitmapType() const;
|
||||
|
||||
|
||||
inline bool operator == (const wxBitmap& bitmap) const
|
||||
{ return m_refData == bitmap.m_refData; }
|
||||
inline bool operator != (const wxBitmap& bitmap) const
|
||||
@@ -155,4 +155,5 @@ class WXDLLIMPEXP_CORE wxBitmapHandler: public wxBitmapHandlerBase
|
||||
DECLARE_ABSTRACT_CLASS(wxBitmapHandler)
|
||||
};
|
||||
|
||||
#endif // __WX_COCOA_BITMAP_H__
|
||||
#endif
|
||||
// __WX_COCOA_BITMAP_H__
|
||||
|
@@ -4,9 +4,9 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/03/16
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_BMPBUTTN_H__
|
||||
|
@@ -4,9 +4,9 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2002/12/29
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2002 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_BUTTON_H__
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
{
|
||||
Create(parent, winid, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID winid,
|
||||
const wxString& label = wxEmptyString,
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr);
|
||||
|
||||
|
||||
virtual ~wxButton();
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
@@ -61,4 +61,5 @@ public:
|
||||
wxSize DoGetBestSize() const;
|
||||
};
|
||||
|
||||
#endif // __WX_COCOA_BUTTON_H__
|
||||
#endif
|
||||
// __WX_COCOA_BUTTON_H__
|
||||
|
@@ -4,9 +4,9 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/02/15
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_CONTROL_H__
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
// --------------------------
|
||||
|
||||
void OnEraseBackground(wxEraseEvent& event);
|
||||
|
||||
|
||||
virtual void Command(wxCommandEvent& event) { ProcessCommand(event); }
|
||||
|
||||
// Calls the callback and appropriate event handlers
|
||||
@@ -65,4 +65,5 @@ protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
};
|
||||
|
||||
#endif // __WX_COCOA_CONTROL_H__
|
||||
#endif
|
||||
// __WX_COCOA_CONTROL_H__
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: cursor.h
|
||||
// Name: wx/cocoa/cursor.h
|
||||
// Purpose: wxCursor class
|
||||
// Author: David Elliott <dfe@cox.net>
|
||||
// Modified by:
|
||||
// Created: 2002/11/27
|
||||
// RCS-ID:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COCOA_CURSOR_H_
|
||||
@@ -17,7 +17,7 @@
|
||||
class WXDLLEXPORT wxCursorRefData: public wxObjectRefData
|
||||
{
|
||||
DECLARE_NO_COPY_CLASS(wxCursorRefData)
|
||||
|
||||
|
||||
friend class WXDLLEXPORT wxBitmap;
|
||||
friend class WXDLLEXPORT wxCursor;
|
||||
public:
|
||||
@@ -54,9 +54,9 @@ public:
|
||||
|
||||
inline bool operator == (const wxCursor& cursor) const { return m_refData == cursor.m_refData; }
|
||||
inline bool operator != (const wxCursor& cursor) const { return m_refData != cursor.m_refData; }
|
||||
|
||||
|
||||
inline WX_NSCursor GetNSCursor() const
|
||||
{
|
||||
{
|
||||
return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0);
|
||||
}
|
||||
|
||||
@@ -64,4 +64,5 @@ public:
|
||||
|
||||
extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor);
|
||||
|
||||
#endif // _WX_COCOA_CURSOR_H_
|
||||
#endif
|
||||
// _WX_COCOA_CURSOR_H_
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Created: 2003/04/01
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_DCCLIENT_H__
|
||||
@@ -66,4 +66,5 @@ protected:
|
||||
virtual bool CocoaUnlockFocus();
|
||||
};
|
||||
|
||||
#endif // __WX_COCOA_DCCLIENT_H__
|
||||
#endif
|
||||
// __WX_COCOA_DCCLIENT_H__
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Created: 2003/03/16
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_DCMEMORY_H__
|
||||
@@ -18,7 +18,7 @@ class WXDLLEXPORT wxMemoryDC: public wxDC
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
|
||||
public:
|
||||
wxMemoryDC(void);
|
||||
wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
|
||||
wxMemoryDC( wxDC *dc ); // Create compatible DC
|
||||
virtual ~wxMemoryDC(void);
|
||||
virtual void SelectObject(const wxBitmap& bitmap);
|
||||
@@ -36,4 +36,5 @@ protected:
|
||||
int logicalFunc, bool useMask, wxCoord xsrcMask, wxCoord ysrcMask);
|
||||
};
|
||||
|
||||
#endif // __WX_COCOA_DCMEMORY_H__
|
||||
#endif
|
||||
// __WX_COCOA_DCMEMORY_H__
|
||||
|
@@ -4,9 +4,9 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/03/16
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_DCSCREEN_H__
|
||||
|
@@ -4,7 +4,7 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/03/16
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -15,7 +15,7 @@
|
||||
class WXDLLEXPORT wxMenuBar;
|
||||
class WXDLLEXPORT wxStatusBar;
|
||||
|
||||
class WXDLLEXPORT wxFrame: public wxFrameBase
|
||||
class WXDLLEXPORT wxFrame: public wxFrameBase
|
||||
{
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxFrame)
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
#if wxUSE_TOOLBAR
|
||||
// create main toolbar bycalling OnCreateToolBar()
|
||||
virtual wxToolBar* CreateToolBar(long style = -1,
|
||||
wxWindowID winid = -1,
|
||||
wxWindowID winid = wxID_ANY,
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
// sets the main tool bar
|
||||
virtual void SetToolBar(wxToolBar *toolbar);
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Created: 2003/07/15
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_GAUGE_H__
|
||||
@@ -70,4 +70,5 @@ protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
};
|
||||
|
||||
#endif // __WX_COCOA_GAUGE_H__
|
||||
#endif
|
||||
// __WX_COCOA_GAUGE_H__
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Created: 2003/08/11
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COCOA_ICON_H__
|
||||
@@ -58,4 +58,5 @@ public:
|
||||
bool CreateFromXpm(const char **bits);
|
||||
};
|
||||
|
||||
#endif // _WX_COCOA_ICON_H__
|
||||
#endif
|
||||
// _WX_COCOA_ICON_H__
|
||||
|
@@ -4,9 +4,9 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/03/18
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_RADIOBUT_H__
|
||||
|
@@ -2,11 +2,11 @@
|
||||
// Name: wx/cocoa/region.h
|
||||
// Purpose: wxRegion class
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Modified by:
|
||||
// Created: 2004/04/12
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2004 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COCOA_REGION_H__
|
||||
@@ -68,4 +68,5 @@ public:
|
||||
{ return *(wxRegionIterator*)&(this->wxRegionIteratorGeneric::operator=(iter)); }
|
||||
};
|
||||
|
||||
#endif //ndef _WX_COCOA_REGION_H__
|
||||
#endif
|
||||
//ndef _WX_COCOA_REGION_H__
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Created: 2004/04/25
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2004 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_COCOA_SCROLBAR_H__
|
||||
@@ -71,4 +71,5 @@ protected:
|
||||
int m_pageSize;
|
||||
};
|
||||
|
||||
#endif // _WX_COCOA_SCROLBAR_H__
|
||||
#endif
|
||||
// _WX_COCOA_SCROLBAR_H__
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Created: 2003/06/19
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_SLIDER_H__
|
||||
@@ -79,4 +79,5 @@ public:
|
||||
|
||||
};
|
||||
|
||||
#endif // __WX_COCOA_SLIDER_H__
|
||||
#endif
|
||||
// __WX_COCOA_SLIDER_H__
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Created: 2003/07/14
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_SPINBUTT_H__
|
||||
@@ -27,7 +27,7 @@ class WXDLLEXPORT wxSpinButton: public wxSpinButtonBase// , protected wxCocoaNSS
|
||||
// ------------------------------------------------------------------------
|
||||
public:
|
||||
wxSpinButton() { }
|
||||
wxSpinButton(wxWindow *parent, wxWindowID winid = -1,
|
||||
wxSpinButton(wxWindow *parent, wxWindowID winid = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
Create(parent, winid, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID winid = -1,
|
||||
bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_HORIZONTAL,
|
||||
@@ -60,4 +60,5 @@ public:
|
||||
virtual void SetRange(int minValue, int maxValue);
|
||||
};
|
||||
|
||||
#endif // __WX_COCOA_SPINBUTT_H__
|
||||
#endif
|
||||
// __WX_COCOA_SPINBUTT_H__
|
||||
|
@@ -4,9 +4,9 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/03/16
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_STATBMP_H__
|
||||
|
@@ -4,9 +4,9 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/03/18
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_STATBOX_H__
|
||||
|
@@ -4,9 +4,9 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/03/18
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_STATLINE_H__
|
||||
|
@@ -4,9 +4,9 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/02/15
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_STATTEXT_H__
|
||||
@@ -55,4 +55,5 @@ public:
|
||||
void SetLabel(const wxString& label);
|
||||
};
|
||||
|
||||
#endif // __WX_COCOA_STATTEXT_H__
|
||||
#endif
|
||||
// __WX_COCOA_STATTEXT_H__
|
||||
|
@@ -4,7 +4,7 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/03/16
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -16,29 +16,15 @@
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/window.h"
|
||||
|
||||
|
||||
// I think this patch should be test on wxMac with
|
||||
// wxTEST_PAINTDCDELEGATION as 1, and then with
|
||||
// with wxTEST_MEMORYDCDELEGATION as 1.
|
||||
#define wxTEST_PAINTDCDELEGATION 0
|
||||
#define wxTEST_MEMORYDCDELEGATION 0
|
||||
|
||||
|
||||
// Split platforms into two groups - those which have well-working
|
||||
// double-buffering by default, and those which do not.
|
||||
#if defined(__WXMAC__) || defined(__WXGTK20__)
|
||||
#if defined(__WXMAC__) || defined(__WXGTK20__) || defined(__WXDFB__)
|
||||
#define wxALWAYS_NATIVE_DOUBLE_BUFFER 1
|
||||
#else
|
||||
#define wxALWAYS_NATIVE_DOUBLE_BUFFER 0
|
||||
#endif
|
||||
|
||||
|
||||
#if wxTEST_PAINTDCDELEGATION || wxTEST_MEMORYDCDELEGATION
|
||||
#undef wxALWAYS_NATIVE_DOUBLE_BUFFER
|
||||
#define wxALWAYS_NATIVE_DOUBLE_BUFFER 0
|
||||
#endif
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Double buffering helper.
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -51,12 +37,11 @@
|
||||
// does not prepare the window DC
|
||||
#define wxBUFFER_CLIENT_AREA 0x02
|
||||
|
||||
class WXDLLEXPORT wxBufferedDC : public wxDC
|
||||
class WXDLLEXPORT wxBufferedDC : public wxMemoryDC
|
||||
{
|
||||
public:
|
||||
// Default ctor, must subsequently call Init for two stage construction.
|
||||
wxBufferedDC() : wxDC(), m_targetDc(NULL), m_mainDc(NULL),
|
||||
m_buffer(NULL), m_style(0)
|
||||
wxBufferedDC() : m_dc( 0 ), m_buffer(NULL), m_style(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -64,38 +49,23 @@ public:
|
||||
wxBufferedDC(wxDC *dc,
|
||||
const wxBitmap &buffer = wxNullBitmap,
|
||||
int style = wxBUFFER_CLIENT_AREA)
|
||||
: wxDC(),
|
||||
m_targetDc(NULL),
|
||||
m_mainDc(NULL)
|
||||
: m_dc( dc ),
|
||||
m_buffer( &buffer ),
|
||||
m_style(style)
|
||||
{
|
||||
// All other members except dcs are initialized in Init
|
||||
Init(dc, buffer, style);
|
||||
UseBuffer();
|
||||
}
|
||||
|
||||
// Construct a wxBufferedDC with an internal buffer of 'area'
|
||||
// (where area is usually something like the size of the window
|
||||
// being buffered)
|
||||
wxBufferedDC(wxDC *dc, const wxSize &area, int style = wxBUFFER_CLIENT_AREA)
|
||||
: wxDC(),
|
||||
m_targetDc(NULL),
|
||||
m_mainDc(NULL)
|
||||
{
|
||||
// All other members except dcs are initialized in Init
|
||||
Init(NULL, dc, area, style);
|
||||
}
|
||||
: m_dc( dc ),
|
||||
m_buffer(NULL),
|
||||
m_style(style)
|
||||
|
||||
// Same, but also receives window to detect whether it is
|
||||
// natively double-buffered.
|
||||
wxBufferedDC(wxWindow* win,
|
||||
wxDC *dc,
|
||||
const wxSize &area,
|
||||
int style = wxBUFFER_CLIENT_AREA)
|
||||
: wxDC(),
|
||||
m_targetDc(NULL),
|
||||
m_mainDc(NULL)
|
||||
{
|
||||
// All other members except dcs are initialized in Init
|
||||
Init(win, dc, area, style);
|
||||
UseBuffer(area.x, area.y);
|
||||
}
|
||||
|
||||
// default copy ctor ok.
|
||||
@@ -103,55 +73,31 @@ public:
|
||||
// The usually desired action in the dtor is to blit the buffer.
|
||||
virtual ~wxBufferedDC()
|
||||
{
|
||||
UnMask();
|
||||
if ( m_dc ) UnMask();
|
||||
}
|
||||
|
||||
// These reimplement the actions of the ctors for two stage creation, but
|
||||
// are not used by the ctors themselves to save a few cpu cycles.
|
||||
void Init(wxDC *dc,
|
||||
const wxBitmap &buffer,
|
||||
const wxBitmap &buffer=wxNullBitmap,
|
||||
int style = wxBUFFER_CLIENT_AREA)
|
||||
{
|
||||
wxASSERT_MSG( m_mainDc == NULL,
|
||||
wxT("wxBufferedDC already initialised") );
|
||||
wxASSERT_MSG( buffer.Ok(),
|
||||
wxT("invalid bitmap") );
|
||||
m_mainDc = dc;
|
||||
wxASSERT_MSG( m_dc == 0 && m_buffer == NULL,
|
||||
_T("wxBufferedDC already initialised") );
|
||||
m_dc = dc;
|
||||
m_buffer = &buffer;
|
||||
m_style = style;
|
||||
UseBuffer();
|
||||
}
|
||||
|
||||
void Init(wxWindow* win,
|
||||
wxDC *dc,
|
||||
const wxSize &area = wxDefaultSize,
|
||||
int style = wxBUFFER_CLIENT_AREA)
|
||||
void Init(wxDC *dc, const wxSize &area, int style = wxBUFFER_CLIENT_AREA)
|
||||
{
|
||||
wxASSERT_MSG( m_mainDc == NULL,
|
||||
wxT("wxBufferedDC already initialised") );
|
||||
|
||||
m_mainDc = dc;
|
||||
wxASSERT_MSG( m_dc == 0 && m_buffer == NULL,
|
||||
_T("wxBufferedDC already initialised") );
|
||||
m_dc = dc;
|
||||
m_buffer = NULL;
|
||||
m_style = style;
|
||||
|
||||
#if wxTEST_MEMORYDCDELEGATION
|
||||
if ( 0 )
|
||||
#elif wxTEST_PAINTDCDELEGATION
|
||||
if ( 1 )
|
||||
#else
|
||||
if ( win && win->IsDoubleBuffered() )
|
||||
#endif
|
||||
{
|
||||
AttachDC(dc);
|
||||
m_buffer = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
PrepareBuffer(win, area);
|
||||
UseBuffer();
|
||||
}
|
||||
}
|
||||
|
||||
void Init(wxDC *dc, const wxSize &area = wxDefaultSize, int style = wxBUFFER_CLIENT_AREA)
|
||||
{
|
||||
Init(NULL, dc, area, style);
|
||||
UseBuffer(area.x, area.y);
|
||||
}
|
||||
|
||||
// Blits the buffer to the dc, and detaches the dc from the buffer (so it
|
||||
@@ -160,443 +106,45 @@ public:
|
||||
// Usually called in the dtor or by the dtor of derived classes if the
|
||||
// BufferedDC must blit before the derived class (which may own the dc it's
|
||||
// blitting to) is destroyed.
|
||||
void UnMask();
|
||||
void UnMask()
|
||||
{
|
||||
wxASSERT_MSG( m_dc != 0,
|
||||
_T("No underlying DC associated with wxBufferedDC (anymore)") );
|
||||
|
||||
wxCoord x=0, y=0;
|
||||
|
||||
if (m_style & wxBUFFER_CLIENT_AREA)
|
||||
GetDeviceOrigin(&x, &y);
|
||||
|
||||
m_dc->Blit( 0, 0,
|
||||
m_buffer->GetWidth(), m_buffer->GetHeight(), this,
|
||||
-x, -y );
|
||||
m_dc = NULL;
|
||||
}
|
||||
|
||||
// Set and get the style
|
||||
void SetStyle(int style) { m_style = style; }
|
||||
int GetStyle() const { return m_style; }
|
||||
|
||||
private:
|
||||
// Prepares wxMemoryDC.
|
||||
void UseBuffer();
|
||||
// check that the bitmap is valid and use it
|
||||
void UseBuffer(wxCoord w = -1, wxCoord h = -1);
|
||||
|
||||
// Allocate m_buffer, if necessary.
|
||||
void PrepareBuffer(wxWindow* win, const wxSize& area);
|
||||
|
||||
// DC to which calls are delegated.
|
||||
wxDC* m_targetDc;
|
||||
|
||||
// This the underlying DC to which we copy everything drawn on
|
||||
// this one in UnMask().
|
||||
// the underlying DC to which we copy everything drawn on this one in
|
||||
// UnMask()
|
||||
//
|
||||
// NB: Without the existence of a wxNullDC, this must be a pointer, else it
|
||||
// could probably be a reference.
|
||||
wxDC* m_mainDc;
|
||||
wxDC *m_dc;
|
||||
|
||||
// the buffer (selected in this DC)
|
||||
const wxBitmap* m_buffer;
|
||||
const wxBitmap *m_buffer;
|
||||
|
||||
// the buffering style
|
||||
int m_style;
|
||||
int m_style;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxBufferedDC)
|
||||
DECLARE_NO_COPY_CLASS(wxBufferedDC)
|
||||
public:
|
||||
//
|
||||
// BEGIN DC-DELEGATION IMPLEMENTATION
|
||||
//
|
||||
|
||||
wxDC& GetAttachedDC()
|
||||
{
|
||||
return *m_targetDc;
|
||||
}
|
||||
|
||||
// Use this to set the DC which receives delegated calls.
|
||||
void AttachDC(wxDC* dc)
|
||||
{
|
||||
m_targetDc = dc;
|
||||
#ifdef __WXMSW__
|
||||
SetHDC( dc ? dc->GetHDC() : NULL );
|
||||
#endif
|
||||
}
|
||||
|
||||
// Sets DC to NULL
|
||||
wxDC* DetachDC()
|
||||
{
|
||||
wxDC* retDc = m_targetDc;
|
||||
AttachDC(NULL);
|
||||
return retDc;
|
||||
}
|
||||
|
||||
#ifdef __WXGTK__
|
||||
virtual GdkWindow* GetGDKWindow() const
|
||||
{
|
||||
return m_targetDc->GetGDKWindow();
|
||||
}
|
||||
virtual wxBitmap GetSelectedBitmap() const
|
||||
{
|
||||
return m_targetDc->GetSelectedBitmap();
|
||||
}
|
||||
#endif
|
||||
|
||||
bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
||||
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
||||
int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord)
|
||||
{ return m_targetDc->Blit(xdest, ydest, width, height,
|
||||
source, xsrc, ysrc, rop,
|
||||
useMask, xsrcMask, ysrcMask); }
|
||||
bool Blit(const wxPoint& destPt, const wxSize& sz,
|
||||
wxDC *source, const wxPoint& srcPt,
|
||||
int rop = wxCOPY, bool useMask = false, const wxPoint& srcPtMask = wxDefaultPosition)
|
||||
{ return m_targetDc->Blit(destPt, sz, source, srcPt,
|
||||
rop, useMask, srcPtMask); }
|
||||
virtual void CalcBoundingBox(wxCoord x, wxCoord y) { m_targetDc->CalcBoundingBox(x, y); }
|
||||
#if defined(__WXWINCE__)
|
||||
void CalculateEllipticPoints( wxList* points,
|
||||
wxCoord xStart, wxCoord yStart,
|
||||
wxCoord w, wxCoord h,
|
||||
double sa, double ea )
|
||||
{ m_targetDc->CalculateEllipticPoints(points, xStart, yStart, w,
|
||||
h, sa, ea); }
|
||||
#endif // defined(__WXWINCE__)
|
||||
virtual bool CanDrawBitmap() const { return m_targetDc->CanDrawBitmap(); }
|
||||
virtual bool CanGetTextExtent() const { return m_targetDc->CanGetTextExtent(); }
|
||||
virtual void Clear() { m_targetDc->Clear(); }
|
||||
virtual void ComputeScaleAndOrigin() { m_targetDc->ComputeScaleAndOrigin(); }
|
||||
void CrossHair(wxCoord x, wxCoord y) { m_targetDc->CrossHair(x, y); }
|
||||
void CrossHair(const wxPoint& pt) { m_targetDc->CrossHair(pt); }
|
||||
virtual void DestroyClippingRegion() { m_targetDc->DestroyClippingRegion(); }
|
||||
wxCoord DeviceToLogicalX(wxCoord x) const { return m_targetDc->DeviceToLogicalX(x); }
|
||||
wxCoord DeviceToLogicalXRel(wxCoord x) const { return m_targetDc->DeviceToLogicalXRel(x); }
|
||||
wxCoord DeviceToLogicalY(wxCoord y) const { return m_targetDc->DeviceToLogicalY(y); }
|
||||
wxCoord DeviceToLogicalYRel(wxCoord y) const { return m_targetDc->DeviceToLogicalYRel(y); }
|
||||
#if defined(__WXWINCE__)
|
||||
virtual void DoDrawEllipticArcRot( wxCoord x, wxCoord y,
|
||||
wxCoord w, wxCoord h,
|
||||
double sa = 0, double ea = 0, double angle = 0 )
|
||||
{ m_targetDc->DoDrawEllipticArcRot(x, y, w, h,
|
||||
sa, ea, angle); }
|
||||
#endif // defined(__WXWINCE__)
|
||||
void DrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
|
||||
wxCoord xc, wxCoord yc)
|
||||
{ m_targetDc->DrawArc(x1, y1, x2, y2,
|
||||
xc, yc); }
|
||||
void DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& centre)
|
||||
{ m_targetDc->DrawArc(pt1, pt2, centre); }
|
||||
void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
|
||||
bool useMask = false)
|
||||
{ m_targetDc->DrawBitmap(bmp, x, y, useMask); }
|
||||
void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt,
|
||||
bool useMask = false)
|
||||
{ m_targetDc->DrawBitmap(bmp, pt, useMask); }
|
||||
void DrawCheckMark(wxCoord x, wxCoord y,
|
||||
wxCoord width, wxCoord height)
|
||||
{ m_targetDc->DrawCheckMark(x, y, width, height); }
|
||||
void DrawCheckMark(const wxRect& rect) { m_targetDc->DrawCheckMark(rect); }
|
||||
void DrawCircle(wxCoord x, wxCoord y, wxCoord radius) { m_targetDc->DrawCircle(x, y, radius); }
|
||||
void DrawCircle(const wxPoint& pt, wxCoord radius) { m_targetDc->DrawCircle(pt, radius); }
|
||||
void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
|
||||
{ m_targetDc->DrawEllipse(x, y, width, height); }
|
||||
void DrawEllipse(const wxPoint& pt, const wxSize& sz) { m_targetDc->DrawEllipse(pt, sz); }
|
||||
void DrawEllipse(const wxRect& rect) { m_targetDc->DrawEllipse(rect); }
|
||||
void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
|
||||
double sa, double ea)
|
||||
{ m_targetDc->DrawEllipticArc(x, y, w, h,
|
||||
sa, ea); }
|
||||
void DrawEllipticArc(const wxPoint& pt, const wxSize& sz,
|
||||
double sa, double ea)
|
||||
{ m_targetDc->DrawEllipticArc(pt, sz, sa, ea); }
|
||||
#if defined(__WXWINCE__)
|
||||
void DrawEllipticArcRot( wxCoord x, wxCoord y,
|
||||
wxCoord width, wxCoord height,
|
||||
double sa = 0, double ea = 0, double angle = 0 )
|
||||
{ m_targetDc->DrawEllipticArcRot(x, y, width, height,
|
||||
sa, ea, angle); }
|
||||
void DrawEllipticArcRot( const wxPoint& pt,
|
||||
const wxSize& sz,
|
||||
double sa = 0, double ea = 0, double angle = 0 )
|
||||
{ m_targetDc->DrawEllipticArcRot(pt, sz, sa, ea,
|
||||
angle); }
|
||||
void DrawEllipticArcRot( const wxRect& rect,
|
||||
double sa = 0, double ea = 0, double angle = 0 )
|
||||
{ m_targetDc->DrawEllipticArcRot(rect, sa, ea, angle); }
|
||||
#endif // defined(__WXWINCE__)
|
||||
void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y) { m_targetDc->DrawIcon(icon, x, y); }
|
||||
void DrawIcon(const wxIcon& icon, const wxPoint& pt) { m_targetDc->DrawIcon(icon, pt); }
|
||||
virtual void DrawLabel(const wxString& text,
|
||||
const wxBitmap& image,
|
||||
const wxRect& rect,
|
||||
int alignment = wxALIGN_LEFT | wxALIGN_TOP,
|
||||
int indexAccel = -1,
|
||||
wxRect *rectBounding = NULL)
|
||||
{ m_targetDc->DrawLabel(text, image, rect, alignment,
|
||||
indexAccel, rectBounding); }
|
||||
void DrawLabel(const wxString& text, const wxRect& rect,
|
||||
int alignment = wxALIGN_LEFT | wxALIGN_TOP,
|
||||
int indexAccel = -1)
|
||||
{ m_targetDc->DrawLabel(text, rect, alignment, indexAccel); }
|
||||
void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
|
||||
{ m_targetDc->DrawLine(x1, y1, x2, y2); }
|
||||
void DrawLine(const wxPoint& pt1, const wxPoint& pt2) { m_targetDc->DrawLine(pt1, pt2); }
|
||||
void DrawLines(int n, wxPoint points[],
|
||||
wxCoord xoffset = 0, wxCoord yoffset = 0)
|
||||
{ m_targetDc->DrawLines(n, points, xoffset, yoffset); }
|
||||
void DrawLines(const wxList *list,
|
||||
wxCoord xoffset = 0, wxCoord yoffset = 0)
|
||||
{ m_targetDc->DrawLines(list, xoffset, yoffset); }
|
||||
virtual void DrawObject(wxDrawObject* drawobject) { m_targetDc->DrawObject(drawobject); }
|
||||
void DrawPoint(wxCoord x, wxCoord y) { m_targetDc->DrawPoint(x, y); }
|
||||
void DrawPoint(const wxPoint& pt) { m_targetDc->DrawPoint(pt); }
|
||||
void DrawPolyPolygon(int n, int count[], wxPoint points[],
|
||||
wxCoord xoffset = 0, wxCoord yoffset = 0,
|
||||
int fillStyle = wxODDEVEN_RULE)
|
||||
{ m_targetDc->DrawPolyPolygon(n, count, points, xoffset,
|
||||
yoffset, fillStyle); }
|
||||
void DrawPolygon(int n, wxPoint points[],
|
||||
wxCoord xoffset = 0, wxCoord yoffset = 0,
|
||||
int fillStyle = wxODDEVEN_RULE)
|
||||
{ m_targetDc->DrawPolygon(n, points, xoffset, yoffset,
|
||||
fillStyle); }
|
||||
void DrawPolygon(const wxList *list,
|
||||
wxCoord xoffset = 0, wxCoord yoffset = 0,
|
||||
int fillStyle = wxODDEVEN_RULE)
|
||||
{ m_targetDc->DrawPolygon(list, xoffset, yoffset, fillStyle); }
|
||||
void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
|
||||
{ m_targetDc->DrawRectangle(x, y, width, height); }
|
||||
void DrawRectangle(const wxPoint& pt, const wxSize& sz) { m_targetDc->DrawRectangle(pt, sz); }
|
||||
void DrawRectangle(const wxRect& rect) { m_targetDc->DrawRectangle(rect); }
|
||||
void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle)
|
||||
{ m_targetDc->DrawRotatedText(text, x, y, angle); }
|
||||
void DrawRotatedText(const wxString& text, const wxPoint& pt, double angle)
|
||||
{ m_targetDc->DrawRotatedText(text, pt, angle); }
|
||||
void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height,
|
||||
double radius)
|
||||
{ m_targetDc->DrawRoundedRectangle(x, y, width, height,
|
||||
radius); }
|
||||
void DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz,
|
||||
double radius)
|
||||
{ m_targetDc->DrawRoundedRectangle(pt, sz, radius); }
|
||||
void DrawRoundedRectangle(const wxRect& r, double radius)
|
||||
{ m_targetDc->DrawRoundedRectangle(r, radius); }
|
||||
#if wxUSE_SPLINES
|
||||
void DrawSpline(wxCoord x1, wxCoord y1,
|
||||
wxCoord x2, wxCoord y2,
|
||||
wxCoord x3, wxCoord y3)
|
||||
{ m_targetDc->DrawSpline(x1, y1, x2, y2,
|
||||
x3, y3); }
|
||||
void DrawSpline(int n, wxPoint points[]) { m_targetDc->DrawSpline(n, points); }
|
||||
void DrawSpline(wxList *points) { m_targetDc->DrawSpline(points); }
|
||||
#endif // wxUSE_SPLINES
|
||||
void DrawText(const wxString& text, wxCoord x, wxCoord y)
|
||||
{ m_targetDc->DrawText(text, x, y); }
|
||||
void DrawText(const wxString& text, const wxPoint& pt) { m_targetDc->DrawText(text, pt); }
|
||||
virtual void EndDoc() { m_targetDc->EndDoc(); }
|
||||
virtual void EndPage() { m_targetDc->EndPage(); }
|
||||
bool FloodFill(wxCoord x, wxCoord y, const wxColour& col,
|
||||
int style = wxFLOOD_SURFACE)
|
||||
{ return m_targetDc->FloodFill(x, y, col, style); }
|
||||
bool FloodFill(const wxPoint& pt, const wxColour& col,
|
||||
int style = wxFLOOD_SURFACE)
|
||||
{ return m_targetDc->FloodFill(pt, col, style); }
|
||||
virtual const wxBrush& GetBackground() const { return m_targetDc->GetBackground(); }
|
||||
virtual int GetBackgroundMode() const { return m_targetDc->GetBackgroundMode(); }
|
||||
virtual const wxBrush& GetBrush() const { return m_targetDc->GetBrush(); }
|
||||
virtual wxCoord GetCharHeight() const { return m_targetDc->GetCharHeight(); }
|
||||
virtual wxCoord GetCharWidth() const { return m_targetDc->GetCharWidth(); }
|
||||
void GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *w, wxCoord *h) const
|
||||
{ m_targetDc->GetClippingBox(x, y, w, h); }
|
||||
void GetClippingBox(wxRect& rect) const { m_targetDc->GetClippingBox(rect); }
|
||||
void GetClippingBox(long *x, long *y, long *w, long *h) const
|
||||
{ m_targetDc->GetClippingBox(x, y, w, h); }
|
||||
virtual int GetDepth() const { return m_targetDc->GetDepth(); }
|
||||
void GetDeviceOrigin(wxCoord *x, wxCoord *y) const { m_targetDc->GetDeviceOrigin(x, y); }
|
||||
wxPoint GetDeviceOrigin() const { return m_targetDc->GetDeviceOrigin(); }
|
||||
void GetDeviceOrigin(long *x, long *y) const { m_targetDc->GetDeviceOrigin(x, y); }
|
||||
virtual const wxFont& GetFont() const { return m_targetDc->GetFont(); }
|
||||
virtual int GetLogicalFunction() const { return m_targetDc->GetLogicalFunction(); }
|
||||
void GetLogicalOrigin(wxCoord *x, wxCoord *y) const { m_targetDc->GetLogicalOrigin(x, y); }
|
||||
wxPoint GetLogicalOrigin() const { return m_targetDc->GetLogicalOrigin(); }
|
||||
void GetLogicalOrigin(long *x, long *y) const { m_targetDc->GetLogicalOrigin(x, y); }
|
||||
virtual void GetLogicalScale(double *x, double *y) { m_targetDc->GetLogicalScale(x, y); }
|
||||
virtual int GetMapMode() const { return m_targetDc->GetMapMode(); }
|
||||
virtual void GetMultiLineTextExtent(const wxString& text,
|
||||
wxCoord *width,
|
||||
wxCoord *height,
|
||||
wxCoord *heightLine = NULL,
|
||||
wxFont *font = NULL)
|
||||
{ m_targetDc->GetMultiLineTextExtent(text, width, height, heightLine,
|
||||
font); }
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
virtual bool GetOptimization() { return m_targetDc->GetOptimization(); }
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
virtual wxSize GetPPI() const { return m_targetDc->GetPPI(); }
|
||||
bool GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const
|
||||
{ return m_targetDc->GetPartialTextExtents(text, widths); }
|
||||
virtual const wxPen& GetPen() const { return m_targetDc->GetPen(); }
|
||||
bool GetPixel(wxCoord x, wxCoord y, wxColour *col) const
|
||||
{ return m_targetDc->GetPixel(x, y, col); }
|
||||
bool GetPixel(const wxPoint& pt, wxColour *col) const { return m_targetDc->GetPixel(pt, col); }
|
||||
void GetSize(int *width, int *height) const { m_targetDc->GetSize(width, height); }
|
||||
wxSize GetSize() const { return m_targetDc->GetSize(); }
|
||||
void GetSizeMM(int* width, int* height) const { m_targetDc->GetSizeMM(width, height); }
|
||||
wxSize GetSizeMM() const { return m_targetDc->GetSizeMM(); }
|
||||
virtual const wxColour& GetTextBackground() const { return m_targetDc->GetTextBackground(); }
|
||||
void GetTextExtent(const wxString& string,
|
||||
wxCoord *x, wxCoord *y,
|
||||
wxCoord *descent = NULL,
|
||||
wxCoord *externalLeading = NULL,
|
||||
wxFont *theFont = NULL) const
|
||||
{ m_targetDc->GetTextExtent(string, x, y, descent,
|
||||
externalLeading, theFont); }
|
||||
void GetTextExtent(const wxString& string,
|
||||
long *x, long *y,
|
||||
long *descent = NULL,
|
||||
long *externalLeading = NULL,
|
||||
wxFont *theFont = NULL) const
|
||||
{ m_targetDc->GetTextExtent(string, x, y, descent,
|
||||
externalLeading, theFont); }
|
||||
virtual const wxColour& GetTextForeground() const { return m_targetDc->GetTextForeground(); }
|
||||
virtual void GetUserScale(double *x, double *y) const { m_targetDc->GetUserScale(x, y); }
|
||||
void GradientFillConcentric(const wxRect& rect,
|
||||
const wxColour& initialColour,
|
||||
const wxColour& destColour)
|
||||
{ m_targetDc->GradientFillConcentric(rect, initialColour, destColour); }
|
||||
void GradientFillConcentric(const wxRect& rect,
|
||||
const wxColour& initialColour,
|
||||
const wxColour& destColour,
|
||||
const wxPoint& circleCenter)
|
||||
{ m_targetDc->GradientFillConcentric(rect, initialColour, destColour, circleCenter); }
|
||||
void GradientFillLinear(const wxRect& rect,
|
||||
const wxColour& initialColour,
|
||||
const wxColour& destColour,
|
||||
wxDirection nDirection = wxEAST)
|
||||
{ m_targetDc->GradientFillLinear(rect, initialColour, destColour, nDirection); }
|
||||
wxCoord LogicalToDeviceX(wxCoord x) const { return m_targetDc->LogicalToDeviceX(x); }
|
||||
wxCoord LogicalToDeviceXRel(wxCoord x) const { return m_targetDc->LogicalToDeviceXRel(x); }
|
||||
wxCoord LogicalToDeviceY(wxCoord y) const { return m_targetDc->LogicalToDeviceY(y); }
|
||||
wxCoord LogicalToDeviceYRel(wxCoord y) const { return m_targetDc->LogicalToDeviceYRel(y); }
|
||||
wxCoord MaxX() const { return m_targetDc->MaxX(); }
|
||||
wxCoord MaxY() const { return m_targetDc->MaxY(); }
|
||||
wxCoord MinX() const { return m_targetDc->MinX(); }
|
||||
wxCoord MinY() const { return m_targetDc->MinY(); }
|
||||
virtual bool Ok() const { return m_targetDc->Ok(); }
|
||||
void ResetBoundingBox()
|
||||
{ m_targetDc->ResetBoundingBox(); }
|
||||
#if defined(__WXWINCE__)
|
||||
void Rotate( wxList* points, double angle, wxPoint center = wxPoint(0,0) )
|
||||
{ m_targetDc->Rotate(points, angle, center); }
|
||||
#endif // defined(__WXWINCE__)
|
||||
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp)
|
||||
{ m_targetDc->SetAxisOrientation(xLeftRight, yBottomUp); }
|
||||
virtual void SetBackground(const wxBrush& brush) { m_targetDc->SetBackground(brush); }
|
||||
virtual void SetBackgroundMode(int mode) { m_targetDc->SetBackgroundMode(mode); }
|
||||
virtual void SetBrush(const wxBrush& brush) { m_targetDc->SetBrush(brush); }
|
||||
void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
|
||||
{ m_targetDc->SetClippingRegion(x, y, width, height); }
|
||||
void SetClippingRegion(const wxPoint& pt, const wxSize& sz)
|
||||
{ m_targetDc->SetClippingRegion(pt, sz); }
|
||||
void SetClippingRegion(const wxRect& rect) { m_targetDc->SetClippingRegion(rect); }
|
||||
void SetClippingRegion(const wxRegion& region) { m_targetDc->SetClippingRegion(region); }
|
||||
virtual void SetDeviceOrigin(wxCoord x, wxCoord y) { m_targetDc->SetDeviceOrigin(x, y); }
|
||||
virtual void SetFont(const wxFont& font) { m_targetDc->SetFont(font); }
|
||||
virtual void SetLogicalFunction(int function) { m_targetDc->SetLogicalFunction(function); }
|
||||
virtual void SetLogicalOrigin(wxCoord x, wxCoord y) { m_targetDc->SetLogicalOrigin(x, y); }
|
||||
virtual void SetLogicalScale(double x, double y) { m_targetDc->SetLogicalScale(x, y); }
|
||||
virtual void SetMapMode(int mode) { m_targetDc->SetMapMode(mode); }
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
virtual void SetOptimization(bool opt) { m_targetDc->SetOptimization(opt); }
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
#if wxUSE_PALETTE
|
||||
virtual void SetPalette(const wxPalette& palette) { m_targetDc->SetPalette(palette); }
|
||||
#endif // wxUSE_PALETTE
|
||||
virtual void SetPen(const wxPen& pen) { m_targetDc->SetPen(pen); }
|
||||
virtual void SetTextBackground(const wxColour& colour) { m_targetDc->SetTextBackground(colour); }
|
||||
virtual void SetTextForeground(const wxColour& colour) { m_targetDc->SetTextForeground(colour); }
|
||||
virtual void SetUserScale(double x, double y) { m_targetDc->SetUserScale(x, y); }
|
||||
virtual bool StartDoc(const wxString& message) { return m_targetDc->StartDoc(message); }
|
||||
virtual void StartPage() { m_targetDc->StartPage(); }
|
||||
protected:
|
||||
virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
|
||||
wxCoord width, wxCoord height,
|
||||
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
||||
int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord)
|
||||
{ return m_targetDc->Blit(xdest, ydest, width, height,
|
||||
source, xsrc, ysrc, rop,
|
||||
useMask, xsrcMask, ysrcMask); }
|
||||
virtual void DoCrossHair(wxCoord x, wxCoord y) { m_targetDc->CrossHair(x, y); }
|
||||
virtual void DoDrawArc(wxCoord x1, wxCoord y1,
|
||||
wxCoord x2, wxCoord y2,
|
||||
wxCoord xc, wxCoord yc)
|
||||
{ m_targetDc->DrawArc(x1, y1, x2, y2,
|
||||
xc, yc); }
|
||||
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
|
||||
bool useMask = false)
|
||||
{ m_targetDc->DrawBitmap(bmp, x, y, useMask); }
|
||||
virtual void DoDrawCheckMark(wxCoord x, wxCoord y,
|
||||
wxCoord width, wxCoord height)
|
||||
{ m_targetDc->DrawCheckMark(x, y, width, height); }
|
||||
virtual void DoDrawEllipse(wxCoord x, wxCoord y,
|
||||
wxCoord width, wxCoord height)
|
||||
{ m_targetDc->DrawEllipse(x, y, width, height); }
|
||||
virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
|
||||
double sa, double ea)
|
||||
{ m_targetDc->DrawEllipticArc(x, y, w, h,
|
||||
sa, ea); }
|
||||
virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y)
|
||||
{ m_targetDc->DrawIcon(icon, x, y); }
|
||||
virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
|
||||
{ m_targetDc->DrawLine(x1, y1, x2, y2); }
|
||||
virtual void DoDrawLines(int n, wxPoint points[],
|
||||
wxCoord xoffset, wxCoord yoffset)
|
||||
{ m_targetDc->DrawLines(n, points, xoffset, yoffset); }
|
||||
virtual void DoDrawPoint(wxCoord x, wxCoord y) { m_targetDc->DrawPoint(x, y); }
|
||||
virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[],
|
||||
wxCoord xoffset, wxCoord yoffset,
|
||||
int fillStyle)
|
||||
{ m_targetDc->DrawPolyPolygon(n, count, points, xoffset,
|
||||
yoffset, fillStyle); }
|
||||
virtual void DoDrawPolygon(int n, wxPoint points[],
|
||||
wxCoord xoffset, wxCoord yoffset,
|
||||
int fillStyle = wxODDEVEN_RULE)
|
||||
{ m_targetDc->DrawPolygon(n, points, xoffset, yoffset,
|
||||
fillStyle); }
|
||||
virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
|
||||
{ m_targetDc->DrawRectangle(x, y, width, height); }
|
||||
virtual void DoDrawRotatedText(const wxString& text,
|
||||
wxCoord x, wxCoord y, double angle)
|
||||
{ m_targetDc->DrawRotatedText(text, x, y, angle); }
|
||||
virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y,
|
||||
wxCoord width, wxCoord height,
|
||||
double radius)
|
||||
{ m_targetDc->DrawRoundedRectangle(x, y, width, height,
|
||||
radius); }
|
||||
#if wxUSE_SPLINES
|
||||
virtual void DoDrawSpline(wxList *points) { m_targetDc->DrawSpline(points); }
|
||||
#endif // wxUSE_SPLINES
|
||||
virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y)
|
||||
{ m_targetDc->DrawText(text, x, y); }
|
||||
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
|
||||
int style = wxFLOOD_SURFACE)
|
||||
{ return m_targetDc->FloodFill(x, y, col, style); }
|
||||
virtual void DoGetClippingBox(wxCoord *x, wxCoord *y,
|
||||
wxCoord *w, wxCoord *h) const
|
||||
{ m_targetDc->GetClippingBox(x, y, w, h); }
|
||||
virtual void DoGetDeviceOrigin(wxCoord *x, wxCoord *y) const
|
||||
{ m_targetDc->GetDeviceOrigin(x, y); }
|
||||
virtual void DoGetLogicalOrigin(wxCoord *x, wxCoord *y) const
|
||||
{ m_targetDc->GetLogicalOrigin(x, y); }
|
||||
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const
|
||||
{ return m_targetDc->GetPartialTextExtents(text, widths); }
|
||||
virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const
|
||||
{ return m_targetDc->GetPixel(x, y, col); }
|
||||
virtual void DoGetSize(int *width, int *height) const { m_targetDc->GetSize(width, height); }
|
||||
virtual void DoGetSizeMM(int* width, int* height) const { m_targetDc->GetSizeMM(width, height); }
|
||||
virtual void DoGetTextExtent(const wxString& string,
|
||||
wxCoord *x, wxCoord *y,
|
||||
wxCoord *descent = NULL,
|
||||
wxCoord *externalLeading = NULL,
|
||||
wxFont *theFont = NULL) const
|
||||
{ m_targetDc->GetTextExtent(string, x, y, descent,
|
||||
externalLeading, theFont); }
|
||||
virtual void DoGradientFillLinear(const wxRect& rect,
|
||||
const wxColour& initialColour,
|
||||
const wxColour& destColour,
|
||||
wxDirection nDirection = wxEAST)
|
||||
{ m_targetDc->GradientFillLinear(rect, initialColour, destColour, nDirection); }
|
||||
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
|
||||
wxCoord width, wxCoord height)
|
||||
{ m_targetDc->SetClippingRegion(x, y, width, height); }
|
||||
virtual void DoSetClippingRegionAsRegion(const wxRegion& region)
|
||||
{ m_targetDc->SetClippingRegion(region); }
|
||||
};
|
||||
|
||||
|
||||
@@ -606,7 +154,7 @@ protected:
|
||||
|
||||
// Creates a double buffered wxPaintDC, optionally allowing the
|
||||
// user to specify their own buffer to use.
|
||||
class wxBufferedPaintDC : public wxBufferedDC
|
||||
class WXDLLEXPORT wxBufferedPaintDC : public wxBufferedDC
|
||||
{
|
||||
public:
|
||||
// If no bitmap is supplied by the user, a temporary one will be created.
|
||||
@@ -620,7 +168,7 @@ public:
|
||||
if( buffer != wxNullBitmap )
|
||||
Init(&m_paintdc, buffer, style);
|
||||
else
|
||||
Init(window, &m_paintdc, window->GetClientSize(), style);
|
||||
Init(&m_paintdc, window->GetClientSize(), style);
|
||||
}
|
||||
|
||||
// If no bitmap is supplied by the user, a temporary one will be created.
|
||||
@@ -631,7 +179,7 @@ public:
|
||||
if (style & wxBUFFER_VIRTUAL_AREA)
|
||||
window->PrepareDC( m_paintdc );
|
||||
|
||||
Init(window, &m_paintdc, window->GetClientSize(), style);
|
||||
Init(&m_paintdc, window->GetClientSize(), style);
|
||||
}
|
||||
|
||||
// default copy ctor ok.
|
||||
@@ -646,6 +194,7 @@ public:
|
||||
private:
|
||||
wxPaintDC m_paintdc;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxBufferedPaintDC)
|
||||
DECLARE_NO_COPY_CLASS(wxBufferedPaintDC)
|
||||
};
|
||||
|
||||
@@ -684,7 +233,7 @@ private:
|
||||
{
|
||||
// Help the user to get the double-buffering working properly.
|
||||
wxASSERT_MSG( win->GetBackgroundStyle() == wxBG_STYLE_CUSTOM,
|
||||
wxT("In constructor, you need to call GetBackgroundStyle(wxBG_STYLE_CUSTOM), ")
|
||||
wxT("In constructor, you need to call SetBackgroundStyle(wxBG_STYLE_CUSTOM), ")
|
||||
wxT("and also, if needed, paint the background manually in the paint event handler."));
|
||||
}
|
||||
|
||||
@@ -699,4 +248,16 @@ typedef wxAutoBufferedPaintDCBase wxAutoBufferedPaintDC;
|
||||
#endif
|
||||
|
||||
|
||||
// Check if the window is natively double buffered and will return a wxPaintDC
|
||||
// if it is, a wxBufferedPaintDC otherwise. It is the caller's responsibility
|
||||
// to delete the wxDC pointer when finished with it.
|
||||
inline wxDC* wxAutoBufferedPaintDCFactory(wxWindow* window)
|
||||
{
|
||||
if ( window->IsDoubleBuffered() )
|
||||
return new wxPaintDC(window);
|
||||
else
|
||||
return new wxBufferedPaintDC(window);
|
||||
}
|
||||
|
||||
|
||||
#endif // _WX_DCBUFFER_H_
|
||||
|
@@ -17,7 +17,7 @@
|
||||
class WXDLLIMPEXP_CORE wxMemoryDC : public wxDC
|
||||
{
|
||||
public:
|
||||
wxMemoryDC();
|
||||
wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
|
||||
wxMemoryDC(wxDC *dc); // create compatible DC
|
||||
|
||||
virtual void SelectObject(const wxBitmap& bitmap);
|
||||
|
@@ -4,7 +4,7 @@
|
||||
// Author: Jaakko Salli
|
||||
// Modified by:
|
||||
// Created: Aug-30-2006
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Jaakko Salli
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -28,7 +28,7 @@ extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxGridNameStr[];
|
||||
//
|
||||
#define WXGRID_DEFAULT_NUMBER_ROWS 10
|
||||
#define WXGRID_DEFAULT_NUMBER_COLS 10
|
||||
#ifdef __WXMSW__
|
||||
#if defined(__WXMSW__) || defined(__WXGTK20__)
|
||||
#define WXGRID_DEFAULT_ROW_HEIGHT 25
|
||||
#else
|
||||
#define WXGRID_DEFAULT_ROW_HEIGHT 30
|
||||
|
@@ -122,6 +122,9 @@ private:
|
||||
bool CreateFromImageAsPixmap(const wxImage& image, int depth);
|
||||
bool CreateFromImageAsPixbuf(const wxImage& image);
|
||||
|
||||
virtual wxObjectRefData* CreateRefData() const;
|
||||
virtual wxObjectRefData* CloneRefData(const wxObjectRefData* data) const;
|
||||
|
||||
enum Representation
|
||||
{
|
||||
Pixmap,
|
||||
|
@@ -99,8 +99,6 @@ public:
|
||||
virtual void SetDeviceOrigin( wxCoord x, wxCoord y );
|
||||
virtual void SetAxisOrientation( bool xLeftRight, bool yBottomUp );
|
||||
|
||||
virtual GdkWindow* GetGDKWindow() const { return m_window; }
|
||||
|
||||
// protected:
|
||||
// implementation
|
||||
// --------------
|
||||
@@ -128,7 +126,7 @@ public:
|
||||
protected:
|
||||
virtual void ComputeScaleAndOrigin();
|
||||
|
||||
GdkWindow *GetWindow() { return m_window; }
|
||||
virtual GdkWindow *GetGDKWindow() const { return m_window; }
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxWindowDC)
|
||||
|
@@ -26,7 +26,7 @@ class WXDLLIMPEXP_CORE wxMemoryDC;
|
||||
class WXDLLIMPEXP_CORE wxMemoryDC : public wxWindowDC
|
||||
{
|
||||
public:
|
||||
wxMemoryDC();
|
||||
wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
|
||||
wxMemoryDC( wxDC *dc ); // Create compatible DC
|
||||
virtual ~wxMemoryDC();
|
||||
virtual void SelectObject( const wxBitmap& bitmap );
|
||||
|
@@ -84,6 +84,9 @@ protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
virtual wxObjectRefData* CreateRefData() const;
|
||||
virtual wxObjectRefData* CloneRefData(const wxObjectRefData* data) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxFont)
|
||||
};
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: gauge.h
|
||||
// Name: wx/gtk/gauge.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_GAUGE_H_
|
||||
@@ -57,12 +57,12 @@ public:
|
||||
virtual void Pulse();
|
||||
|
||||
bool IsVertical() const { return HasFlag(wxGA_VERTICAL); }
|
||||
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
virtual wxVisualAttributes GetDefaultAttributes() const;
|
||||
|
||||
|
||||
// implementation
|
||||
// -------------
|
||||
|
||||
@@ -83,4 +83,5 @@ private:
|
||||
DECLARE_DYNAMIC_CLASS(wxGauge)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_GAUGE_H_
|
||||
#endif
|
||||
// _WX_GTK_GAUGE_H_
|
||||
|
@@ -75,7 +75,7 @@ public:
|
||||
virtual ~wxMenu();
|
||||
|
||||
void Attach(wxMenuBarBase *menubar);
|
||||
|
||||
|
||||
void SetLayoutDirection(const wxLayoutDirection dir);
|
||||
wxLayoutDirection GetLayoutDirection() const;
|
||||
|
||||
@@ -101,9 +101,10 @@ private:
|
||||
// common part of Append (if pos == -1) and Insert
|
||||
bool GtkAppend(wxMenuItem *item, int pos=-1);
|
||||
|
||||
GtkWidget *m_prevRadio;
|
||||
GtkWidget *m_prevRadio;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMenu)
|
||||
};
|
||||
|
||||
#endif // __GTKMENUH__
|
||||
#endif
|
||||
// __GTKMENUH__
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: stattext.h
|
||||
// Name: wx/gtk/stattext.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_STATTEXT_H_
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
wxWindowID id,
|
||||
const wxString &label,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString &name = wxStaticTextNameStr );
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
wxWindowID id,
|
||||
const wxString &label,
|
||||
const wxPoint &pos = wxDefaultPosition,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
const wxSize &size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString &name = wxStaticTextNameStr );
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
|
||||
// see wx/stattext.h
|
||||
void Wrap(int width);
|
||||
|
||||
@@ -56,10 +56,11 @@ protected:
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticText)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_STATTEXT_H_
|
||||
#endif
|
||||
// _WX_GTK_STATTEXT_H_
|
||||
|
@@ -174,6 +174,9 @@ public:
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
// has the control been frozen by Freeze()?
|
||||
bool IsFrozen() const { return m_frozenness > 0; }
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
@@ -186,9 +189,6 @@ protected:
|
||||
// override this and return true.
|
||||
virtual bool UseGTKStyleBase() const { return true; }
|
||||
|
||||
// has the control been frozen by Freeze()?
|
||||
bool IsFrozen() const { return m_frozenness > 0; }
|
||||
|
||||
virtual void DoSetValue(const wxString &value, int flags = 0);
|
||||
|
||||
private:
|
||||
|
@@ -22,15 +22,6 @@ extern "C" {
|
||||
#define GTK_PIZZA(obj) GTK_CHECK_CAST (obj, gtk_pizza_get_type (), GtkPizza)
|
||||
#define GTK_IS_PIZZA(obj) GTK_CHECK_TYPE (obj, gtk_pizza_get_type ())
|
||||
|
||||
/* Shadow types */
|
||||
typedef enum
|
||||
{
|
||||
GTK_MYSHADOW_NONE,
|
||||
GTK_MYSHADOW_THIN,
|
||||
GTK_MYSHADOW_IN,
|
||||
GTK_MYSHADOW_OUT
|
||||
} GtkMyShadowType;
|
||||
|
||||
typedef struct _GtkPizzaChild GtkPizzaChild;
|
||||
typedef struct _GtkPizza GtkPizza;
|
||||
typedef struct _GtkPizzaClass GtkPizzaClass;
|
||||
@@ -48,13 +39,10 @@ struct _GtkPizza
|
||||
{
|
||||
GtkContainer container;
|
||||
GList *children;
|
||||
GtkMyShadowType shadow_type;
|
||||
|
||||
guint m_xoffset;
|
||||
guint m_yoffset;
|
||||
|
||||
gint m_width;
|
||||
|
||||
GdkWindow *bin_window;
|
||||
};
|
||||
|
||||
@@ -87,9 +75,6 @@ void gtk_pizza_set_yoffset (GtkPizza *pizza, gint yoffset);
|
||||
WXDLLIMPEXP_CORE
|
||||
gint gtk_pizza_get_rtl_offset (GtkPizza *pizza);
|
||||
|
||||
WXDLLIMPEXP_CORE
|
||||
void gtk_pizza_set_shadow_type (GtkPizza *pizza,
|
||||
GtkMyShadowType type);
|
||||
|
||||
WXDLLIMPEXP_CORE
|
||||
void gtk_pizza_scroll (GtkPizza *pizza,
|
||||
|
@@ -26,7 +26,7 @@ class WXDLLIMPEXP_CORE wxMemoryDC;
|
||||
class WXDLLIMPEXP_CORE wxMemoryDC : public wxWindowDC
|
||||
{
|
||||
public:
|
||||
wxMemoryDC();
|
||||
wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
|
||||
wxMemoryDC( wxDC *dc ); // Create compatible DC
|
||||
virtual ~wxMemoryDC();
|
||||
virtual void SelectObject( const wxBitmap& bitmap );
|
||||
|
@@ -4,7 +4,7 @@
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKGAUGEH__
|
||||
@@ -99,4 +99,5 @@ private:
|
||||
|
||||
#endif
|
||||
|
||||
#endif // __GTKGAUGEH__
|
||||
#endif
|
||||
// __GTKGAUGEH__
|
||||
|
@@ -92,9 +92,10 @@ private:
|
||||
// common part of Append (if pos == -1) and Insert
|
||||
bool GtkAppend(wxMenuItem *item, int pos=-1);
|
||||
|
||||
GtkWidget *m_prevRadio;
|
||||
GtkWidget *m_prevRadio;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMenu)
|
||||
};
|
||||
|
||||
#endif // __GTKMENUH__
|
||||
#endif
|
||||
// __GTKMENUH__
|
||||
|
@@ -4,7 +4,7 @@
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKSTATICTEXTH__
|
||||
@@ -74,4 +74,5 @@ protected:
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticText)
|
||||
};
|
||||
|
||||
#endif // __GTKSTATICTEXTH__
|
||||
#endif
|
||||
// __GTKSTATICTEXTH__
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: webkit.h
|
||||
// Name: wx/html/webkit.h
|
||||
// Purpose: wxWebKitCtrl - embeddable web kit control
|
||||
// Author: Jethro Grassie / Kevin Ollivier
|
||||
// Modified by:
|
||||
@@ -63,8 +63,8 @@ public:
|
||||
bool CanGetPageSource();
|
||||
wxString GetPageSource();
|
||||
void SetPageSource(wxString& source, const wxString& baseUrl = wxEmptyString);
|
||||
wxString GetPageURL(){ return m_currentURL; }
|
||||
wxString GetPageTitle(){ return m_pageTitle; }
|
||||
wxString GetPageURL(){ return m_currentURL; }
|
||||
wxString GetPageTitle(){ return m_pageTitle; }
|
||||
|
||||
//we need to resize the webview when the control size changes
|
||||
void OnSize(wxSizeEvent &event);
|
||||
@@ -129,4 +129,5 @@ END_DECLARE_EVENT_TYPES()
|
||||
|
||||
#endif // wxUSE_WEBKIT
|
||||
|
||||
#endif // _WX_WEBKIT_H_
|
||||
#endif
|
||||
// _WX_WEBKIT_H_
|
||||
|
@@ -12,90 +12,133 @@
|
||||
// from config.log confdefs
|
||||
|
||||
#define HAVE_SSIZE_T 1
|
||||
#define HAVE_BOOL 1
|
||||
#define HAVE_CONST_CAST
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_EXPLICIT 1
|
||||
#define HAVE_FCNTL 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FNMATCH 1
|
||||
#define HAVE_FNMATCH_H 1
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
#define HAVE_ICONV 1
|
||||
#define HAVE_INET_ADDR 1
|
||||
#define HAVE_INET_ADDR 1
|
||||
#define HAVE_INET_ATON 1
|
||||
#define HAVE_INET_ATON 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_IOSTREAM 1
|
||||
#define HAVE_LANGINFO_H 1
|
||||
#define HAVE_LARGEFILE_SUPPORT 1
|
||||
#define HAVE_LOCALTIME 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_MKSTEMP 1
|
||||
#define HAVE_PTHREAD_CANCEL 1
|
||||
#define HAVE_PTHREAD_MUTEXATTR_T 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_PW_GECOS 1
|
||||
#define HAVE_REGCOMP 1
|
||||
#define HAVE_SCHED_H 1
|
||||
#define HAVE_SCHED_YIELD 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_STATFS 1
|
||||
#define HAVE_STATIC_CAST
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRCASECMP_IN_STRING_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRPTIME 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_THREAD_PRIORITY_FUNCTIONS 1
|
||||
#define HAVE_TIMEGM 1
|
||||
#define HAVE_UNAME 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_USLEEP 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_VSNPRINTF_DECL 1
|
||||
#define HAVE_WCHAR_H 1
|
||||
#define HAVE_WCSLEN 1
|
||||
#define HAVE_WPRINTF 1
|
||||
#define HAVE_WCSRTOMBS 1
|
||||
#define HAVE_X11_XKBLIB_H 1
|
||||
#define HAVE_X11_XLIB_H 1
|
||||
#define ICONV_CONST const
|
||||
#define PACKAGE_BUGREPORT "wx-dev@lists.wxwidgets.org"
|
||||
#define PACKAGE_NAME "wxWidgets"
|
||||
#define PACKAGE_STRING "wxWidgets 2.5.1"
|
||||
#define PACKAGE_TARNAME "wxwidgets"
|
||||
#define PACKAGE_VERSION "2.5.1"
|
||||
#define SIZEOF_CHAR 1
|
||||
#define SIZEOF_INT 4
|
||||
#define SIZEOF_LONG 4
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define SIZEOF_SHORT 2
|
||||
#define SIZEOF_SIZE_T 4
|
||||
#define SIZEOF_VOID_P 4
|
||||
#define SIZEOF_WCHAR_T 4
|
||||
#define SOCKLEN_T socklen_t
|
||||
#define STDC_HEADERS 1
|
||||
#define TARGET_CARBON 1
|
||||
#if __BIG_ENDIAN__
|
||||
#define WORDS_BIGENDIAN 1
|
||||
#endif
|
||||
#define WXWIN_OS_DESCRIPTION "Darwin 7.3.0 Power Macintosh"
|
||||
#define WX_GMTOFF_IN_TM 1
|
||||
#define WX_NO_REGEX_ADVANCED 1
|
||||
#define WX_STATFS_T struct statfs
|
||||
#define WX_TIMEZONE timezone
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
#define wxUSE_UNIX 1
|
||||
#define __UNIX__ 1
|
||||
#define __BSD__ 1
|
||||
#define __DARWIN__ 1
|
||||
#define __POWERPC__ 1
|
||||
#define __UNIX__ 1
|
||||
#define wxSIZE_T_IS_ULONG 1
|
||||
#define wx_USE_NANOX 0
|
||||
#define TARGET_CARBON 1
|
||||
|
||||
#define HAVE_BOOL 1
|
||||
#define HAVE_EXPLICIT 1
|
||||
#define HAVE_CONST_CAST
|
||||
#define HAVE_REINTERPRET_CAST
|
||||
#define HAVE_STATIC_CAST
|
||||
#define HAVE_VA_COPY 1
|
||||
#define HAVE_VARIADIC_MACROS 1
|
||||
#define CONST_COMPATIBILITY 0
|
||||
#define WX_TIMEZONE timezone
|
||||
#define WX_SOCKLEN_T socklen_t
|
||||
#define SOCKOPTLEN_T socklen_t
|
||||
#define WX_STATFS_T struct statfs
|
||||
#define wxTYPE_SA_HANDLER int
|
||||
#define WX_GMTOFF_IN_TM 1
|
||||
#define HAVE_PW_GECOS 1
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
#define HAVE_FSYNC 1
|
||||
#define HAVE_LARGEFILE_SUPPORT 1
|
||||
#define HAVE_LOCALTIME 1
|
||||
#define HAVE_SCHED_YIELD 1
|
||||
#define HAVE_PTHREAD_MUTEXATTR_T 1
|
||||
#define HAVE_PTHREAD_MUTEXATTR_SETTYPE_DECL 1
|
||||
#define HAVE_PTHREAD_CANCEL 1
|
||||
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SNPRINTF 1
|
||||
#define HAVE_SNPRINTF_DECL 1
|
||||
#define HAVE_UNIX98_PRINTF 1
|
||||
#define HAVE_STATFS 1
|
||||
#define HAVE_STATFS_DECL 1
|
||||
#define HAVE_STRPTIME 1
|
||||
#define HAVE_STRPTIME_DECL 1
|
||||
#define HAVE_THREAD_PRIORITY_FUNCTIONS 1
|
||||
#define HAVE_TIMEGM 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_VSNPRINTF_DECL 1
|
||||
#define HAVE_USLEEP 1
|
||||
#define HAVE_WCSLEN 1
|
||||
#define SIZEOF_CHAR 1
|
||||
#define SIZEOF_WCHAR_T 4
|
||||
#define SIZEOF_SHORT 2
|
||||
#define SIZEOF_INT 4
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOID_P 8
|
||||
#define SIZEOF_LONG 8
|
||||
#define SIZEOF_SIZE_T 8
|
||||
#else
|
||||
#define SIZEOF_VOID_P 4
|
||||
#define SIZEOF_LONG 4
|
||||
#define SIZEOF_SIZE_T 4
|
||||
#endif
|
||||
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define wxSIZE_T_IS_ULONG 1
|
||||
#define HAVE_FCNTL 1
|
||||
#define HAVE_GETHOSTBYNAME 1
|
||||
#define HAVE_GETSERVBYNAME 1
|
||||
#define HAVE_GMTIME_R 1
|
||||
#define HAVE_INET_ADDR 1
|
||||
#define HAVE_INET_ATON 1
|
||||
#define HAVE_LOCALTIME_R 1
|
||||
#define HAVE_MKSTEMP 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_READDIR_R 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
#define HAVE_UNAME 1
|
||||
#define HAVE_USLEEP 1
|
||||
#define HAVE_X11_XKBLIB_H 1
|
||||
#define HAVE_FNMATCH 1
|
||||
#define HAVE_FNMATCH_H 1
|
||||
#define HAVE_IOSTREAM 1
|
||||
#define HAVE_SCHED_H 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_WCHAR_H 1
|
||||
#define HAVE_ICONV 1
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
|
||||
#define ICONV_CONST const
|
||||
#else
|
||||
#define ICONV_CONST
|
||||
#endif
|
||||
#define HAVE_LANGINFO_H 1
|
||||
#define HAVE_WCSRTOMBS 1
|
||||
#define HAVE_FPUTWS 1
|
||||
#define HAVE_STRCASECMP_IN_STRING_H 1
|
||||
#define HAVE_WPRINTF 1
|
||||
#define HAVE_SWPRINTF 1
|
||||
#define HAVE_VSWPRINTF 1
|
||||
#define HAVE_FSEEKO 1
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
|
||||
#define WXWIN_OS_DESCRIPTION "Darwin 7.9.0 Power Macintosh"
|
||||
#define PACKAGE_BUGREPORT "wx-dev@lists.wxwidgets.org"
|
||||
#define PACKAGE_NAME "wxWidgets"
|
||||
#define PACKAGE_STRING "wxWidgets 2.7.1"
|
||||
#define PACKAGE_TARNAME "wxwidgets"
|
||||
#define PACKAGE_VERSION "2.7.1"
|
||||
|
||||
// for regex
|
||||
#define WX_NO_REGEX_ADVANCED 1
|
||||
|
||||
// for jpeg
|
||||
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
// OBSOLETE ?
|
||||
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
#define HAVE_REGCOMP 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_X11_XLIB_H 1
|
||||
#define SOCKLEN_T socklen_t
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: cursor.h
|
||||
// Name: wx/mac/carbon/cursor.h
|
||||
// Purpose: wxCursor class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
wxCursor(int cursor_type);
|
||||
virtual ~wxCursor();
|
||||
|
||||
bool CreateFromXpm(const char **bits) ;
|
||||
bool CreateFromXpm(const char **bits) ;
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const ;
|
||||
|
||||
|
@@ -19,7 +19,7 @@ class WXDLLEXPORT wxMemoryDC: public wxPaintDC
|
||||
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
|
||||
|
||||
public:
|
||||
wxMemoryDC(void);
|
||||
wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
|
||||
wxMemoryDC( wxDC *dc ); // Create compatible DC
|
||||
virtual ~wxMemoryDC(void);
|
||||
virtual void SelectObject( const wxBitmap& bitmap );
|
||||
|
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dnd.h
|
||||
// Name: wx/mac/carbon/dnd.h
|
||||
// Purpose: Declaration of the wxDropTarget, wxDropSource class etc.
|
||||
// Author: Stefan Csomor
|
||||
// RCS-ID: $Id$
|
||||
@@ -55,7 +55,7 @@ class WXDLLEXPORT wxDropTarget: public wxDropTargetBase
|
||||
virtual bool OnDrop(wxCoord x, wxCoord y);
|
||||
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
|
||||
virtual bool GetData();
|
||||
|
||||
|
||||
bool CurrentDragHasSupportedFormat() ;
|
||||
void SetCurrentDrag( void* drag ) { m_currentDrag = drag ; }
|
||||
void* GetCurrentDrag() { return m_currentDrag ; }
|
||||
@@ -95,16 +95,14 @@ public:
|
||||
wxWindow* GetWindow() { return m_window ; }
|
||||
void SetCurrentDrag( void* drag ) { m_currentDrag = drag ; }
|
||||
void* GetCurrentDrag() { return m_currentDrag ; }
|
||||
bool MacInstallDefaultCursor(wxDragResult effect) ;
|
||||
bool MacInstallDefaultCursor(wxDragResult effect) ;
|
||||
protected :
|
||||
|
||||
|
||||
wxWindow *m_window;
|
||||
void* m_currentDrag ;
|
||||
};
|
||||
|
||||
#endif // wxUSE_DRAG_AND_DROP
|
||||
|
||||
#endif
|
||||
// D&D
|
||||
|
||||
#endif
|
||||
//_WX_DND_H_
|
||||
|
||||
//_WX_DND_H_
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: drawer.h
|
||||
// Name: wx/mac/carbon/drawer.h
|
||||
// Purpose: Drawer child window class.
|
||||
// Drawer windows appear under their parent window and
|
||||
// behave like a drawer, opening and closing to reveal
|
||||
@@ -28,26 +28,26 @@
|
||||
class WXDLLEXPORT wxDrawerWindow : public wxTopLevelWindow
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxDrawerWindow)
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxDrawerWindow();
|
||||
|
||||
|
||||
wxDrawerWindow(wxWindow* parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
wxSize size = wxDefaultSize,
|
||||
wxDirection edge = wxLEFT,
|
||||
const wxString& name = wxT("drawerwindow"))
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
wxSize size = wxDefaultSize,
|
||||
wxDirection edge = wxLEFT,
|
||||
const wxString& name = wxT("drawerwindow"))
|
||||
{
|
||||
this->Create(parent, id, title, size, edge, name);
|
||||
}
|
||||
|
||||
|
||||
virtual ~wxDrawerWindow();
|
||||
|
||||
// Create a drawer window.
|
||||
|
||||
// Create a drawer window.
|
||||
// If parent is NULL, create as a tool window.
|
||||
// If parent is not NULL, then wxTopLevelWindow::Attach this window to parent.
|
||||
// If parent is not NULL, then wxTopLevelWindow::Attach this window to parent.
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& title,
|
||||
@@ -58,13 +58,14 @@ public:
|
||||
bool Open(bool show = true); // open or close the drawer, possibility for async param, i.e. animate
|
||||
bool Close() { return this->Open(false); }
|
||||
bool IsOpen() const;
|
||||
|
||||
|
||||
// Set the edge of the parent where the drawer attaches.
|
||||
bool SetPreferredEdge(wxDirection edge);
|
||||
wxDirection GetPreferredEdge() const;
|
||||
wxDirection GetCurrentEdge() const; // not necessarily the preferred, due to screen constraints
|
||||
wxDirection GetCurrentEdge() const; // not necessarily the preferred, due to screen constraints
|
||||
};
|
||||
|
||||
#endif // defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
|
||||
|
||||
#endif // _WX_DRAWERWINDOW_H_
|
||||
#endif
|
||||
// _WX_DRAWERWINDOW_H_
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: fontdlg.h
|
||||
// Purpose: wxFontDialog class using fonts window services (10.2+).
|
||||
// Name: wx/mac/carbon/fontdlg.h
|
||||
// Purpose: wxFontDialog class using fonts window services (10.2+).
|
||||
// Author: Ryan Norton
|
||||
// Modified by:
|
||||
// Created: 2004-09-25
|
||||
@@ -157,11 +157,10 @@ public:
|
||||
protected:
|
||||
wxWindow* m_dialogParent;
|
||||
wxFontData m_fontData;
|
||||
void* m_pEventHandlerRef;
|
||||
void* m_pEventHandlerRef;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_FONTDLG_H_
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/mac/mimetype.h
|
||||
// Name: wx/mac/carbon/mimetype.h
|
||||
// Purpose: Mac Carbon implementation for wx mime-related classes
|
||||
// Author: Ryan Norton
|
||||
// Modified by:
|
||||
@@ -19,11 +19,11 @@
|
||||
class wxMimeTypesManagerImpl
|
||||
{
|
||||
public :
|
||||
//kinda kooky but in wxMimeTypesManager::EnsureImpl it doesn't call
|
||||
//kinda kooky but in wxMimeTypesManager::EnsureImpl it doesn't call
|
||||
//intialize, so we do it ourselves
|
||||
wxMimeTypesManagerImpl() : m_hIC(NULL) { Initialize(); }
|
||||
~wxMimeTypesManagerImpl() { ClearData(); }
|
||||
|
||||
|
||||
// load all data into memory - done when it is needed for the first time
|
||||
void Initialize(int mailcapStyles = wxMAILCAP_STANDARD,
|
||||
const wxString& extraDir = wxEmptyString);
|
||||
@@ -48,20 +48,20 @@ public :
|
||||
wxFileType *Associate(const wxFileTypeInfo& ftInfo);
|
||||
// remove association
|
||||
bool Unassociate(wxFileType *ft);
|
||||
|
||||
|
||||
private:
|
||||
wxArrayFileTypeInfo m_fallbacks;
|
||||
void* m_hIC;
|
||||
void** m_hDatabase;
|
||||
long m_lCount;
|
||||
|
||||
void* m_hIC;
|
||||
void** m_hDatabase;
|
||||
long m_lCount;
|
||||
|
||||
void* pReserved1;
|
||||
void* pReserved2;
|
||||
void* pReserved3;
|
||||
void* pReserved4;
|
||||
void* pReserved5;
|
||||
void* pReserved6;
|
||||
|
||||
|
||||
friend class wxFileTypeImpl;
|
||||
};
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
//kind of nutty, but mimecmn.cpp creates one with an empty new
|
||||
wxFileTypeImpl() : m_manager(NULL) {}
|
||||
~wxFileTypeImpl() {} //for those broken compilers
|
||||
|
||||
|
||||
// implement accessor functions
|
||||
bool GetExtensions(wxArrayString& extensions);
|
||||
bool GetMimeType(wxString *mimeType) const;
|
||||
@@ -99,15 +99,15 @@ public:
|
||||
bool SetDefaultIcon(const wxString& strIcon = wxEmptyString, int index = 0);
|
||||
|
||||
private:
|
||||
void Init(wxMimeTypesManagerImpl *manager, long lIndex)
|
||||
void Init(wxMimeTypesManagerImpl *manager, long lIndex)
|
||||
{ m_manager=(manager); m_lIndex=(lIndex); }
|
||||
|
||||
// helper function
|
||||
wxString GetCommand(const wxString& verb) const;
|
||||
|
||||
|
||||
wxMimeTypesManagerImpl *m_manager;
|
||||
long m_lIndex;
|
||||
|
||||
long m_lIndex;
|
||||
|
||||
void* pReserved1;
|
||||
void* pReserved2;
|
||||
void* pReserved3;
|
||||
@@ -119,4 +119,4 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
//_MIMETYPE_H
|
||||
//_MIMETYPE_H
|
||||
|
@@ -43,6 +43,10 @@
|
||||
#define MAC_OS_X_VERSION_10_4 1040
|
||||
#endif
|
||||
|
||||
#ifndef MAC_OS_X_VERSION_10_5
|
||||
#define MAC_OS_X_VERSION_10_5 1050
|
||||
#endif
|
||||
|
||||
#ifdef __WXMAC_CARBON__
|
||||
#include "wx/mac/corefoundation/cfstring.h"
|
||||
#endif
|
||||
@@ -60,10 +64,17 @@ inline int FixedToInt( Fixed inFixed )
|
||||
}
|
||||
#endif
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
|
||||
typedef UInt32 URefCon;
|
||||
typedef SInt32 SRefCon;
|
||||
#endif
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
#include "wx/listbox.h"
|
||||
|
||||
#ifndef __LP64__
|
||||
|
||||
class wxMacPortStateHelper
|
||||
{
|
||||
DECLARE_NO_COPY_CLASS(wxMacPortStateHelper)
|
||||
@@ -140,6 +151,7 @@ private:
|
||||
GrafPtr m_newPort;
|
||||
ThemeDrawingState m_themeDrawingState;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if wxMAC_USE_CORE_GRAPHICS
|
||||
class WXDLLEXPORT wxMacCGContextStateSaver
|
||||
@@ -496,7 +508,7 @@ public :
|
||||
virtual ControlRef * GetControlRefAddr() { return &m_controlRef; }
|
||||
virtual ControlRef GetControlRef() const { return m_controlRef; }
|
||||
|
||||
virtual void SetReference( SInt32 data );
|
||||
virtual void SetReference( URefCon data );
|
||||
/*
|
||||
void operator= (ControlRef c) { m_controlRef = c; }
|
||||
operator ControlRef () { return m_controlRef; }
|
||||
@@ -663,7 +675,7 @@ public :
|
||||
OSStatus GetItemCount( DataBrowserItemID container,
|
||||
Boolean recurse,
|
||||
DataBrowserItemState state,
|
||||
UInt32 *numItems) const;
|
||||
ItemCount *numItems) const;
|
||||
|
||||
OSStatus GetItems( DataBrowserItemID container,
|
||||
Boolean recurse,
|
||||
@@ -727,8 +739,8 @@ public :
|
||||
|
||||
OSStatus GetColumnIDFromIndex( DataBrowserTableViewColumnIndex position, DataBrowserTableViewColumnID* id );
|
||||
|
||||
OSStatus GetColumnPosition( DataBrowserPropertyID column, UInt32 *position) const;
|
||||
OSStatus SetColumnPosition( DataBrowserPropertyID column, UInt32 position);
|
||||
OSStatus GetColumnPosition( DataBrowserPropertyID column, DataBrowserTableViewColumnIndex *position) const;
|
||||
OSStatus SetColumnPosition( DataBrowserPropertyID column, DataBrowserTableViewColumnIndex position);
|
||||
|
||||
OSStatus GetScrollPosition( UInt32 *top , UInt32 *left ) const;
|
||||
OSStatus SetScrollPosition( UInt32 top , UInt32 left );
|
||||
@@ -773,14 +785,14 @@ protected :
|
||||
Boolean changeValue ) = 0;
|
||||
|
||||
static pascal Boolean DataBrowserCompareProc(
|
||||
ControlRef browser,
|
||||
DataBrowserItemID itemOneID,
|
||||
DataBrowserItemID itemTwoID,
|
||||
DataBrowserPropertyID sortProperty);
|
||||
ControlRef browser,
|
||||
DataBrowserItemID itemOneID,
|
||||
DataBrowserItemID itemTwoID,
|
||||
DataBrowserPropertyID sortProperty);
|
||||
|
||||
virtual Boolean CompareItems(DataBrowserItemID itemOneID,
|
||||
DataBrowserItemID itemTwoID,
|
||||
DataBrowserPropertyID sortProperty) = 0;
|
||||
virtual Boolean CompareItems(DataBrowserItemID itemOneID,
|
||||
DataBrowserItemID itemTwoID,
|
||||
DataBrowserPropertyID sortProperty) = 0;
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
@@ -1261,6 +1273,8 @@ private :
|
||||
|
||||
ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow, const Point& location , WindowRef window , ControlPartCode *outPart );
|
||||
|
||||
#ifndef __LP64__
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
inline Rect* wxMacGetPictureBounds( PicHandle pict , Rect* rect )
|
||||
{
|
||||
@@ -1274,6 +1288,8 @@ ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow, cons
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
#define wxMAC_DEFINE_PROC_GETTER( UPP , x ) \
|
||||
@@ -1301,5 +1317,14 @@ wxString wxMacFSRefToPath( const FSRef *fsRef , CFStringRef additionalPathCompon
|
||||
OSStatus wxMacPathToFSRef( const wxString&path , FSRef *fsRef );
|
||||
wxString wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname );
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
// deprecating QD
|
||||
|
||||
void wxMacLocalToGlobal( WindowRef window , Point*pt );
|
||||
void wxMacGlobalToLocal( WindowRef window , Point*pt );
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_PRIVATE_H_
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: print.h
|
||||
// Name: wx/mac/carbon/private/print.h
|
||||
// Purpose: private implementation for printing on MacOS
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 03/02/99
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: toolbar.h
|
||||
// Name: wx/mac/carbon/toolbar.h
|
||||
// Purpose: wxToolBar class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@@ -93,9 +93,9 @@ protected:
|
||||
virtual wxToolBarToolBase *CreateTool(wxControl *control);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
#if wxMAC_USE_NATIVE_TOOLBAR
|
||||
bool m_macUsesNativeToolbar ;
|
||||
void* m_macHIToolbarRef ;
|
||||
#if wxMAC_USE_NATIVE_TOOLBAR
|
||||
bool m_macUsesNativeToolbar ;
|
||||
void* m_macHIToolbarRef ;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: uma.h
|
||||
// Name: wx/mac/carbon/uma.h
|
||||
// Purpose: Universal MacOS API
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 03/02/99
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -17,11 +17,6 @@
|
||||
void UMAInitToolbox( UInt16 inMoreMastersCalls, bool isEmbedded) ;
|
||||
void UMACleanupToolbox() ;
|
||||
long UMAGetSystemVersion() ;
|
||||
bool UMAHasAppearance() ;
|
||||
long UMAGetAppearanceVersion() ;
|
||||
bool UMAHasWindowManager() ;
|
||||
long UMAGetWindowManagerAttr() ;
|
||||
bool UMAHasAquaLayout() ;
|
||||
|
||||
bool UMASystemIsInitialized() ;
|
||||
void UMASetSystemIsInitialized(bool val);
|
||||
|
@@ -65,7 +65,8 @@ public:
|
||||
const wxRect *rect = NULL );
|
||||
virtual void Freeze();
|
||||
virtual void Thaw();
|
||||
|
||||
virtual bool IsFrozen() const;
|
||||
|
||||
virtual void Update() ;
|
||||
virtual void ClearBackground();
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: cursor.h
|
||||
// Name: wx/mac/classic/cursor.h
|
||||
// Purpose: wxCursor class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@@ -17,7 +17,7 @@
|
||||
class WXDLLEXPORT wxCursorRefData: public wxBitmapRefData
|
||||
{
|
||||
DECLARE_NO_COPY_CLASS(wxCursorRefData)
|
||||
|
||||
|
||||
friend class WXDLLEXPORT wxBitmap;
|
||||
friend class WXDLLEXPORT wxCursor;
|
||||
public:
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
wxCursor(int cursor_type);
|
||||
virtual ~wxCursor();
|
||||
|
||||
bool CreateFromXpm(const char **bits) ;
|
||||
bool CreateFromXpm(const char **bits) ;
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const { return (m_refData != NULL && ( M_CURSORDATA->m_hCursor != NULL || M_CURSORDATA->m_themeCursor != -1 ) ) ; }
|
||||
|
||||
|
@@ -19,7 +19,7 @@ class WXDLLEXPORT wxMemoryDC: public wxPaintDC
|
||||
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
|
||||
|
||||
public:
|
||||
wxMemoryDC(void);
|
||||
wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
|
||||
wxMemoryDC( wxDC *dc ); // Create compatible DC
|
||||
virtual ~wxMemoryDC(void);
|
||||
virtual void SelectObject( const wxBitmap& bitmap );
|
||||
|
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dnd.h
|
||||
// Name: wx/mac/classic/dnd.h
|
||||
// Purpose: Declaration of the wxDropTarget, wxDropSource class etc.
|
||||
// Author: Stefan Csomor
|
||||
// RCS-ID: $Id$
|
||||
@@ -55,7 +55,7 @@ class WXDLLEXPORT wxDropTarget: public wxDropTargetBase
|
||||
virtual bool OnDrop(wxCoord x, wxCoord y);
|
||||
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
|
||||
virtual bool GetData();
|
||||
|
||||
|
||||
bool CurrentDragHasSupportedFormat() ;
|
||||
void SetCurrentDrag( void* drag ) { m_currentDrag = drag ; }
|
||||
void* GetCurrentDrag() { return m_currentDrag ; }
|
||||
@@ -95,16 +95,14 @@ public:
|
||||
wxWindow* GetWindow() { return m_window ; }
|
||||
void SetCurrentDrag( void* drag ) { m_currentDrag = drag ; }
|
||||
void* GetCurrentDrag() { return m_currentDrag ; }
|
||||
bool MacInstallDefaultCursor(wxDragResult effect) ;
|
||||
protected :
|
||||
|
||||
bool MacInstallDefaultCursor(wxDragResult effect) ;
|
||||
protected :
|
||||
|
||||
wxWindow *m_window;
|
||||
void* m_currentDrag ;
|
||||
};
|
||||
|
||||
#endif // wxUSE_DRAG_AND_DROP
|
||||
|
||||
#endif
|
||||
// D&D
|
||||
|
||||
#endif
|
||||
//_WX_DND_H_
|
||||
|
||||
//_WX_DND_H_
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: private.h
|
||||
// Name: wx/mac/classic/private.h
|
||||
// Purpose: Private declarations: as this header is only included by
|
||||
// wxWidgets itself, it may contain identifiers which don't start
|
||||
// with "wx".
|
||||
@@ -37,12 +37,12 @@
|
||||
|
||||
#include "wx/window.h"
|
||||
|
||||
class wxMacPortStateHelper
|
||||
class wxMacPortStateHelper
|
||||
{
|
||||
DECLARE_NO_COPY_CLASS(wxMacPortStateHelper)
|
||||
|
||||
|
||||
public:
|
||||
wxMacPortStateHelper( GrafPtr newport) ;
|
||||
wxMacPortStateHelper( GrafPtr newport) ;
|
||||
wxMacPortStateHelper() ;
|
||||
~wxMacPortStateHelper() ;
|
||||
|
||||
@@ -65,7 +65,7 @@ private:
|
||||
class WXDLLEXPORT wxMacPortSetter
|
||||
{
|
||||
DECLARE_NO_COPY_CLASS(wxMacPortSetter)
|
||||
|
||||
|
||||
public:
|
||||
wxMacPortSetter( const wxDC* dc ) ;
|
||||
~wxMacPortSetter() ;
|
||||
@@ -77,7 +77,7 @@ private:
|
||||
class WXDLLEXPORT wxMacWindowClipper
|
||||
{
|
||||
DECLARE_NO_COPY_CLASS(wxMacWindowClipper)
|
||||
|
||||
|
||||
public:
|
||||
wxMacWindowClipper( const wxWindow* win ) ;
|
||||
~wxMacWindowClipper() ;
|
||||
@@ -89,7 +89,7 @@ private:
|
||||
class wxMacDrawingHelper
|
||||
{
|
||||
DECLARE_NO_COPY_CLASS(wxMacDrawingHelper)
|
||||
|
||||
|
||||
public:
|
||||
wxMacDrawingHelper( wxWindowMac * theWindow , bool clientArea = false ) ;
|
||||
~wxMacDrawingHelper() ;
|
||||
@@ -177,57 +177,57 @@ void wxMacConvertNewlines10To13( wxChar * data ) ;
|
||||
|
||||
#if TARGET_CARBON
|
||||
|
||||
class wxMacCFStringHolder
|
||||
{
|
||||
public:
|
||||
wxMacCFStringHolder()
|
||||
{
|
||||
m_cfs = NULL ;
|
||||
m_release = false ;
|
||||
}
|
||||
|
||||
wxMacCFStringHolder(const wxString &str , wxFontEncoding encoding )
|
||||
{
|
||||
m_cfs = NULL ;
|
||||
m_release = false ;
|
||||
Assign( str , encoding ) ;
|
||||
}
|
||||
|
||||
wxMacCFStringHolder(CFStringRef ref , bool release = true )
|
||||
{
|
||||
class wxMacCFStringHolder
|
||||
{
|
||||
public:
|
||||
wxMacCFStringHolder()
|
||||
{
|
||||
m_cfs = NULL ;
|
||||
m_release = false ;
|
||||
}
|
||||
|
||||
wxMacCFStringHolder(const wxString &str , wxFontEncoding encoding )
|
||||
{
|
||||
m_cfs = NULL ;
|
||||
m_release = false ;
|
||||
Assign( str , encoding ) ;
|
||||
}
|
||||
|
||||
wxMacCFStringHolder(CFStringRef ref , bool release = true )
|
||||
{
|
||||
m_cfs = ref ;
|
||||
m_release = release ;
|
||||
}
|
||||
|
||||
~wxMacCFStringHolder()
|
||||
{
|
||||
Release() ;
|
||||
}
|
||||
m_release = release ;
|
||||
}
|
||||
|
||||
~wxMacCFStringHolder()
|
||||
{
|
||||
Release() ;
|
||||
}
|
||||
|
||||
CFStringRef Detach()
|
||||
{
|
||||
CFStringRef retval = m_cfs ;
|
||||
m_release = false ;
|
||||
m_cfs = NULL ;
|
||||
return retval ;
|
||||
}
|
||||
|
||||
CFStringRef retval = m_cfs ;
|
||||
m_release = false ;
|
||||
m_cfs = NULL ;
|
||||
return retval ;
|
||||
}
|
||||
|
||||
void Release()
|
||||
{
|
||||
if ( m_release && m_cfs)
|
||||
CFRelease( m_cfs ) ;
|
||||
m_cfs = NULL ;
|
||||
}
|
||||
if ( m_release && m_cfs)
|
||||
CFRelease( m_cfs ) ;
|
||||
m_cfs = NULL ;
|
||||
}
|
||||
|
||||
void Assign( const wxString &str , wxFontEncoding encoding ) ;
|
||||
void Assign( const wxString &str , wxFontEncoding encoding ) ;
|
||||
|
||||
operator CFStringRef () { return m_cfs; }
|
||||
operator CFStringRef () { return m_cfs; }
|
||||
wxString AsString( wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
CFStringRef m_cfs;
|
||||
bool m_release ;
|
||||
bool m_release ;
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: print.h
|
||||
// Name: wx/mac/classic/private/print.h
|
||||
// Purpose: private implementation for printing on MacOS
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 03/02/99
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -23,7 +23,7 @@
|
||||
# include "Printing.h"
|
||||
#endif
|
||||
|
||||
#if TARGET_CARBON
|
||||
#if TARGET_CARBON
|
||||
#if !PM_USE_SESSION_APIS
|
||||
#error "only Carbon Printing Session API is supported"
|
||||
#endif
|
||||
@@ -34,48 +34,48 @@ class wxNativePrintData
|
||||
public :
|
||||
wxNativePrintData() {}
|
||||
virtual ~wxNativePrintData() {}
|
||||
|
||||
|
||||
virtual void TransferFrom( wxPrintData * ) = 0 ;
|
||||
virtual void TransferTo( wxPrintData * ) = 0 ;
|
||||
|
||||
|
||||
virtual void TransferFrom( wxPageSetupDialogData * ) = 0 ;
|
||||
virtual void TransferTo( wxPageSetupDialogData * ) = 0 ;
|
||||
|
||||
|
||||
virtual void TransferFrom( wxPrintDialogData * ) = 0 ;
|
||||
virtual void TransferTo( wxPrintDialogData * ) = 0 ;
|
||||
|
||||
|
||||
virtual void CopyFrom( wxNativePrintData * ) = 0;
|
||||
|
||||
|
||||
virtual int ShowPrintDialog() = 0 ;
|
||||
virtual int ShowPageSetupDialog() = 0 ;
|
||||
|
||||
|
||||
static wxNativePrintData* Create() ;
|
||||
} ;
|
||||
|
||||
#if TARGET_CARBON
|
||||
|
||||
class wxMacCarbonPrintData : public wxNativePrintData
|
||||
class wxMacCarbonPrintData : public wxNativePrintData
|
||||
{
|
||||
public :
|
||||
wxMacCarbonPrintData() ;
|
||||
~wxMacCarbonPrintData() ;
|
||||
|
||||
|
||||
virtual void TransferFrom( wxPrintData * ) ;
|
||||
virtual void TransferTo( wxPrintData * ) ;
|
||||
|
||||
|
||||
virtual void TransferFrom( wxPageSetupDialogData * ) ;
|
||||
virtual void TransferTo( wxPageSetupDialogData * ) ;
|
||||
|
||||
|
||||
virtual void TransferFrom( wxPrintDialogData * ) ;
|
||||
virtual void TransferTo( wxPrintDialogData * ) ;
|
||||
|
||||
|
||||
virtual void CopyFrom( wxNativePrintData * ) ;
|
||||
virtual int ShowPrintDialog() ;
|
||||
virtual int ShowPageSetupDialog() ;
|
||||
private :
|
||||
virtual void ValidateOrCreate() ;
|
||||
public :
|
||||
PMPrintSession m_macPrintSession ;
|
||||
PMPrintSession m_macPrintSession ;
|
||||
PMPageFormat m_macPageFormat ;
|
||||
PMPrintSettings m_macPrintSettings ;
|
||||
} ;
|
||||
@@ -105,3 +105,4 @@ public :
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// _WX_MAC_PRIVATE_PRINT_H_
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// File: wx/mac/taskbarosx.h
|
||||
// File: wx/mac/classic/taskbarosx.h
|
||||
// Purpose: Defines wxTaskBarIcon class for OSX
|
||||
// Author: Ryan Norton
|
||||
// Modified by:
|
||||
@@ -18,14 +18,14 @@ class WXDLLEXPORT wxMenu;
|
||||
class WXDLLEXPORT wxTaskBarIcon : public wxTaskBarIconBase
|
||||
{
|
||||
public:
|
||||
//type of taskbar item to create (currently only DOCK is implemented)
|
||||
enum wxTaskBarIconType
|
||||
{
|
||||
DOCK,
|
||||
STATUSITEM,
|
||||
MENUEXTRA
|
||||
};
|
||||
|
||||
//type of taskbar item to create (currently only DOCK is implemented)
|
||||
enum wxTaskBarIconType
|
||||
{
|
||||
DOCK,
|
||||
STATUSITEM,
|
||||
MENUEXTRA
|
||||
};
|
||||
|
||||
wxTaskBarIcon(const wxTaskBarIconType& nType = DOCK);
|
||||
virtual ~wxTaskBarIcon();
|
||||
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
|
||||
protected:
|
||||
wxTaskBarIconType m_nType;
|
||||
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxTaskBarIcon)
|
||||
};
|
||||
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: uma.h
|
||||
// Name: wx/mac/classic/uma.h
|
||||
// Purpose: Universal MacOS API
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
// Created: 03/02/99
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -91,7 +91,7 @@ protected:
|
||||
wxString m_szProductName; //product name
|
||||
int m_nProductId; //product id
|
||||
int m_nManufacturerId; //manufacturer id
|
||||
mach_port_t m_pPort; //mach port to use
|
||||
mach_port_t m_pPort; //mach port to use
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -112,4 +112,5 @@ public:
|
||||
|
||||
#endif //__DARWIN__
|
||||
|
||||
#endif //WX_MACCARBONHID_H
|
||||
#endif
|
||||
// _WX_MACCARBONHID_H_
|
||||
|
@@ -26,7 +26,7 @@ class WXDLLEXPORT wxMemoryDC;
|
||||
class WXDLLEXPORT wxMemoryDC : public wxDC
|
||||
{
|
||||
public:
|
||||
wxMemoryDC();
|
||||
wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
|
||||
wxMemoryDC(wxDC *dc); // Create compatible DC
|
||||
virtual ~wxMemoryDC();
|
||||
virtual void SelectObject(const wxBitmap& bitmap);
|
||||
|
@@ -19,7 +19,7 @@ class WXDLLIMPEXP_CORE wxMemoryDC : public wxWindowDC
|
||||
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
|
||||
|
||||
public:
|
||||
wxMemoryDC();
|
||||
wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
|
||||
wxMemoryDC( wxDC *dc ); // Create compatible DC
|
||||
virtual ~wxMemoryDC();
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Created: 17/09/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_TOOLBAR_H_
|
||||
@@ -17,7 +17,7 @@ class WXDLLEXPORT wxToolBar : public wxToolBarBase
|
||||
public:
|
||||
// ctors and dtor
|
||||
wxToolBar() { Init(); }
|
||||
|
||||
|
||||
wxToolBar(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
@@ -26,41 +26,41 @@ public:
|
||||
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 = wxNO_BORDER | wxTB_HORIZONTAL,
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
|
||||
|
||||
virtual ~wxToolBar();
|
||||
|
||||
|
||||
// override/implement base class virtuals
|
||||
virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
|
||||
|
||||
|
||||
virtual bool Realize();
|
||||
|
||||
|
||||
// implementation from now on
|
||||
|
||||
|
||||
// find tool by widget
|
||||
wxToolBarToolBase *FindToolByWidget(WXWidget w) const;
|
||||
|
||||
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
|
||||
// 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& bmpNormal,
|
||||
@@ -79,4 +79,4 @@ private:
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_TOOLBAR_H_
|
||||
// _WX_TOOLBAR_H_
|
||||
|
@@ -17,7 +17,7 @@
|
||||
class WXDLLEXPORT wxMemoryDC : public wxDC
|
||||
{
|
||||
public:
|
||||
wxMemoryDC();
|
||||
wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
|
||||
wxMemoryDC(wxDC *dc); // Create compatible DC
|
||||
|
||||
virtual void SelectObject(const wxBitmap& bitmap);
|
||||
|
@@ -190,7 +190,7 @@ typedef OSVERSIONINFOEXA OSVERSIONINFOEX,*POSVERSIONINFOEX,*LPOSVERSIONINFOEX;
|
||||
// NMLVCUSTOMDRAW originally didn't have the iSubItem member. It was added
|
||||
// with IE4, as was IPN_FIRST which is used as a test :-(.
|
||||
//
|
||||
#ifndef IPN_FIRST
|
||||
#ifndef IPN_FIRST
|
||||
|
||||
typedef struct wxtagNMLVCUSTOMDRAW_ {
|
||||
NMCUSTOMDRAW nmcd;
|
||||
@@ -202,7 +202,7 @@ typedef struct wxtagNMLVCUSTOMDRAW_ {
|
||||
#define NMLVCUSTOMDRAW wxNMLVCUSTOMDRAW_
|
||||
#define LPNMLVCUSTOMDRAW wxLPNMLVCUSTOMDRAW_
|
||||
|
||||
#endif // defined IPN_FIRST
|
||||
#endif // defined IPN_FIRST
|
||||
|
||||
#endif // defined __VISUALC__ && __VISUALC__ <= 1100
|
||||
|
||||
|
@@ -17,7 +17,6 @@
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/memory.h"
|
||||
|
||||
class WXDLLIMPEXP_BASE wxObject;
|
||||
@@ -471,13 +470,16 @@ public:
|
||||
// destroy a reference
|
||||
void UnRef();
|
||||
|
||||
// Make sure this object has only one reference
|
||||
void UnShare() { AllocExclusive(); }
|
||||
|
||||
protected:
|
||||
// ensure that our data is not shared with anybody else: if we have no
|
||||
// data, it is created using CreateRefData() below, if we have shared data
|
||||
// it is copied using CloneRefData(), otherwise nothing is done
|
||||
void AllocExclusive();
|
||||
|
||||
// both methods must be implemented if Unshare() is used, not pure virtual
|
||||
// both methods must be implemented if AllocExclusive() is used, not pure virtual
|
||||
// only because of the backwards compatibility reasons
|
||||
|
||||
// create a new m_refData
|
||||
|
@@ -17,7 +17,7 @@
|
||||
class WXDLLEXPORT wxMemoryDC: public wxDC
|
||||
{
|
||||
public:
|
||||
wxMemoryDC(void);
|
||||
wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
|
||||
wxMemoryDC(wxDC* pDC); // Create compatible DC
|
||||
|
||||
virtual void SelectObject(const wxBitmap& rBitmap);
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: helpxxxx.h
|
||||
// Name: wx/os2/helpwin.h
|
||||
// Purpose: Help system: native implementation for your system.
|
||||
// Author: David Webster
|
||||
// Modified by:
|
||||
// Created: 10/09/99
|
||||
// Created: 10/09/99
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) David Webster
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_HELPWIN_H_
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: pnghand.h
|
||||
// Name: wx/os2/pnghand.h
|
||||
// Purpose: PNG bitmap handler
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 04/01/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Microsoft, Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_PNGHAND_H_
|
||||
@@ -38,5 +38,4 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WX_PNGHAND_H_
|
||||
|
||||
// _WX_PNGHAND_H_
|
||||
|
@@ -1,9 +1,10 @@
|
||||
/*
|
||||
* File: pngread.h
|
||||
* Purpose: PNG file reader
|
||||
* Author: Alejandro Aguilar Sierra/Julian Smart
|
||||
* Created: 1995
|
||||
* Copyright: (c) 1995, Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
|
||||
* File: wx/os2/pngread.h
|
||||
* Purpose: PNG file reader
|
||||
* Author: Alejandro Aguilar Sierra/Julian Smart
|
||||
* Created: 1995
|
||||
* RCS-ID: $Id$
|
||||
* Copyright: (c) 1995, Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@@ -21,15 +22,15 @@ typedef byte* ImagePointerType;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
byte red;
|
||||
byte green;
|
||||
byte blue;
|
||||
byte red;
|
||||
byte green;
|
||||
byte blue;
|
||||
} rgb_color_struct;
|
||||
|
||||
|
||||
#define COLORTYPE_PALETTE 1
|
||||
#define COLORTYPE_COLOR 2
|
||||
#define COLORTYPE_ALPHA 4
|
||||
#define COLORTYPE_PALETTE 1
|
||||
#define COLORTYPE_COLOR 2
|
||||
#define COLORTYPE_ALPHA 4
|
||||
|
||||
class wxPNGReader
|
||||
{
|
||||
@@ -143,7 +144,7 @@ inline
|
||||
wxPNGReaderIter::wxPNGReaderIter(wxPNGReader *imax): ima(imax)
|
||||
{
|
||||
if (ima)
|
||||
IterImage = ima->RawImage;
|
||||
IterImage = ima->RawImage;
|
||||
Itx = Ity = 0;
|
||||
Stepx = Stepy = 0;
|
||||
}
|
||||
@@ -158,9 +159,9 @@ inline
|
||||
bool wxPNGReaderIter::ItOK ()
|
||||
{
|
||||
if (ima)
|
||||
return ima->Inside(Itx, Ity);
|
||||
return ima->Inside(Itx, Ity);
|
||||
else
|
||||
return FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -206,7 +207,7 @@ inline void wxPNGReaderIter::SetRow(byte *buf, int n)
|
||||
// Here should be bcopy or memcpy
|
||||
//_fmemcpy(IterImage, (void far *)buf, n);
|
||||
if (n<0)
|
||||
n = ima->GetWidth();
|
||||
n = ima->GetWidth();
|
||||
|
||||
for (int i=0; i<n; i++) IterImage[i] = buf[i];
|
||||
}
|
||||
@@ -284,4 +285,4 @@ inline bool wxPNGReaderIter::PrevStep()
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// _WX_PNGREAD__
|
@@ -17,7 +17,7 @@
|
||||
class WXDLLEXPORT wxMemoryDC : public wxDC
|
||||
{
|
||||
public:
|
||||
wxMemoryDC();
|
||||
wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
|
||||
wxMemoryDC(wxDC *dc); // Create compatible DC
|
||||
|
||||
virtual void SelectObject(const wxBitmap& bitmap);
|
||||
|
@@ -33,6 +33,7 @@
|
||||
# if defined(__MACH__)
|
||||
# define __WXMAC_OSX__
|
||||
# define __WXMAC_CARBON__
|
||||
# include <AvailabilityMacros.h>
|
||||
# ifdef __WXMAC_XCODE__
|
||||
# include <unistd.h>
|
||||
# include "wx/mac/carbon/config_xcode.h"
|
||||
|
@@ -98,6 +98,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextParagraph;
|
||||
class WXDLLIMPEXP_RICHTEXT wxRichTextFileHandler;
|
||||
class WXDLLIMPEXP_RICHTEXT wxRichTextStyleSheet;
|
||||
class WXDLLIMPEXP_RICHTEXT wxTextAttrEx;
|
||||
class WXDLLIMPEXP_RICHTEXT wxRichTextListStyleDefinition;
|
||||
|
||||
/*!
|
||||
* Flags determining the available space, passed to Layout
|
||||
@@ -133,7 +134,7 @@ class WXDLLIMPEXP_RICHTEXT wxTextAttrEx;
|
||||
#define wxRICHTEXT_UNFORMATTED 0x02
|
||||
|
||||
/*!
|
||||
* Flags for SetStyle
|
||||
* Flags for SetStyle/SetListStyle
|
||||
*/
|
||||
|
||||
#define wxRICHTEXT_SETSTYLE_NONE 0x00
|
||||
@@ -155,6 +156,14 @@ class WXDLLIMPEXP_RICHTEXT wxTextAttrEx;
|
||||
// preserved independently from that of e.g. a named paragraph style.
|
||||
#define wxRICHTEXT_SETSTYLE_CHARACTERS_ONLY 0x08
|
||||
|
||||
// For SetListStyle only: specifies starting from the given number, otherwise
|
||||
// deduces number from existing attributes
|
||||
#define wxRICHTEXT_SETSTYLE_RENUMBER 0x10
|
||||
|
||||
// For SetListStyle only: specifies the list level for all paragraphs, otherwise
|
||||
// the current indentation will be used
|
||||
#define wxRICHTEXT_SETSTYLE_SPECIFY_LEVEL 0x20
|
||||
|
||||
/*!
|
||||
* Flags for text insertion
|
||||
*/
|
||||
@@ -174,6 +183,7 @@ class WXDLLIMPEXP_RICHTEXT wxTextAttrEx;
|
||||
#define wxTEXT_ATTR_BULLET_STYLE 0x00010000
|
||||
#define wxTEXT_ATTR_BULLET_NUMBER 0x00020000
|
||||
#define wxTEXT_ATTR_BULLET_SYMBOL 0x00040000
|
||||
#define wxTEXT_ATTR_LIST_STYLE_NAME 0x00080000
|
||||
|
||||
/*!
|
||||
* Styles for wxTextAttrEx::SetBulletStyle
|
||||
@@ -274,18 +284,22 @@ public:
|
||||
wxTextAttrEx(const wxTextAttr& attr) { Init(); (*this) = attr; }
|
||||
wxTextAttrEx() { Init(); }
|
||||
|
||||
// Initialise this object.
|
||||
// Initialise this object
|
||||
void Init();
|
||||
|
||||
// Assignment from a wxTextAttrEx object
|
||||
void operator= (const wxTextAttrEx& attr);
|
||||
|
||||
// Assignment from a wxTextAttr object.
|
||||
// Assignment from a wxTextAttr object
|
||||
void operator= (const wxTextAttr& attr);
|
||||
|
||||
// Equality test
|
||||
bool operator== (const wxTextAttrEx& attr) const;
|
||||
|
||||
// setters
|
||||
void SetCharacterStyleName(const wxString& name) { m_characterStyleName = name; SetFlags(GetFlags() | wxTEXT_ATTR_CHARACTER_STYLE_NAME); }
|
||||
void SetParagraphStyleName(const wxString& name) { m_paragraphStyleName = name; SetFlags(GetFlags() | wxTEXT_ATTR_PARAGRAPH_STYLE_NAME); }
|
||||
void SetListStyleName(const wxString& name) { m_listStyleName = name; SetFlags(GetFlags() | wxTEXT_ATTR_LIST_STYLE_NAME); }
|
||||
void SetParagraphSpacingAfter(int spacing) { m_paragraphSpacingAfter = spacing; SetFlags(GetFlags() | wxTEXT_ATTR_PARA_SPACING_AFTER); }
|
||||
void SetParagraphSpacingBefore(int spacing) { m_paragraphSpacingBefore = spacing; SetFlags(GetFlags() | wxTEXT_ATTR_PARA_SPACING_BEFORE); }
|
||||
void SetLineSpacing(int spacing) { m_lineSpacing = spacing; SetFlags(GetFlags() | wxTEXT_ATTR_LINE_SPACING); }
|
||||
@@ -296,6 +310,7 @@ public:
|
||||
|
||||
const wxString& GetCharacterStyleName() const { return m_characterStyleName; }
|
||||
const wxString& GetParagraphStyleName() const { return m_paragraphStyleName; }
|
||||
const wxString& GetListStyleName() const { return m_listStyleName; }
|
||||
int GetParagraphSpacingAfter() const { return m_paragraphSpacingAfter; }
|
||||
int GetParagraphSpacingBefore() const { return m_paragraphSpacingBefore; }
|
||||
int GetLineSpacing() const { return m_lineSpacing; }
|
||||
@@ -315,6 +330,7 @@ public:
|
||||
bool HasLineSpacing() const { return HasFlag(wxTEXT_ATTR_LINE_SPACING); }
|
||||
bool HasCharacterStyleName() const { return HasFlag(wxTEXT_ATTR_CHARACTER_STYLE_NAME) || !m_characterStyleName.IsEmpty(); }
|
||||
bool HasParagraphStyleName() const { return HasFlag(wxTEXT_ATTR_PARAGRAPH_STYLE_NAME) || !m_paragraphStyleName.IsEmpty(); }
|
||||
bool HasListStyleName() const { return HasFlag(wxTEXT_ATTR_LIST_STYLE_NAME) || !m_listStyleName.IsEmpty(); }
|
||||
bool HasBulletStyle() const { return HasFlag(wxTEXT_ATTR_BULLET_STYLE); }
|
||||
bool HasBulletNumber() const { return HasFlag(wxTEXT_ATTR_BULLET_NUMBER); }
|
||||
bool HasBulletSymbol() const { return HasFlag(wxTEXT_ATTR_BULLET_SYMBOL); }
|
||||
@@ -331,7 +347,8 @@ public:
|
||||
return !HasTextColour() && !HasBackgroundColour() && !HasFont() && !HasAlignment() &&
|
||||
!HasTabs() && !HasLeftIndent() && !HasRightIndent() &&
|
||||
!HasParagraphSpacingAfter() && !HasParagraphSpacingBefore() && !HasLineSpacing() &&
|
||||
!HasCharacterStyleName() && !HasParagraphStyleName() && !HasBulletNumber() && !HasBulletStyle() && !HasBulletSymbol();
|
||||
!HasCharacterStyleName() && !HasParagraphStyleName() && !HasListStyleName() &&
|
||||
!HasBulletNumber() && !HasBulletStyle() && !HasBulletSymbol();
|
||||
}
|
||||
|
||||
// return the attribute having the valid font and colours: it uses the
|
||||
@@ -356,6 +373,9 @@ private:
|
||||
|
||||
// Paragraph style
|
||||
wxString m_paragraphStyleName;
|
||||
|
||||
// List style
|
||||
wxString m_listStyleName;
|
||||
};
|
||||
|
||||
/*!
|
||||
@@ -415,6 +435,7 @@ public:
|
||||
|
||||
void SetCharacterStyleName(const wxString& name) { m_characterStyleName = name; m_flags |= wxTEXT_ATTR_CHARACTER_STYLE_NAME; }
|
||||
void SetParagraphStyleName(const wxString& name) { m_paragraphStyleName = name; m_flags |= wxTEXT_ATTR_PARAGRAPH_STYLE_NAME; }
|
||||
void SetListStyleName(const wxString& name) { m_listStyleName = name; SetFlags(GetFlags() | wxTEXT_ATTR_LIST_STYLE_NAME); }
|
||||
void SetParagraphSpacingAfter(int spacing) { m_paragraphSpacingAfter = spacing; m_flags |= wxTEXT_ATTR_PARA_SPACING_AFTER; }
|
||||
void SetParagraphSpacingBefore(int spacing) { m_paragraphSpacingBefore = spacing; m_flags |= wxTEXT_ATTR_PARA_SPACING_BEFORE; }
|
||||
void SetLineSpacing(int spacing) { m_lineSpacing = spacing; m_flags |= wxTEXT_ATTR_LINE_SPACING; }
|
||||
@@ -440,6 +461,7 @@ public:
|
||||
|
||||
const wxString& GetCharacterStyleName() const { return m_characterStyleName; }
|
||||
const wxString& GetParagraphStyleName() const { return m_paragraphStyleName; }
|
||||
const wxString& GetListStyleName() const { return m_listStyleName; }
|
||||
int GetParagraphSpacingAfter() const { return m_paragraphSpacingAfter; }
|
||||
int GetParagraphSpacingBefore() const { return m_paragraphSpacingBefore; }
|
||||
int GetLineSpacing() const { return m_lineSpacing; }
|
||||
@@ -467,6 +489,7 @@ public:
|
||||
bool HasLineSpacing() const { return (m_flags & wxTEXT_ATTR_LINE_SPACING) != 0; }
|
||||
bool HasCharacterStyleName() const { return (m_flags & wxTEXT_ATTR_CHARACTER_STYLE_NAME) != 0 || !m_characterStyleName.IsEmpty(); }
|
||||
bool HasParagraphStyleName() const { return (m_flags & wxTEXT_ATTR_PARAGRAPH_STYLE_NAME) != 0 || !m_paragraphStyleName.IsEmpty(); }
|
||||
bool HasListStyleName() const { return HasFlag(wxTEXT_ATTR_LIST_STYLE_NAME) || !m_listStyleName.IsEmpty(); }
|
||||
bool HasBulletStyle() const { return (m_flags & wxTEXT_ATTR_BULLET_STYLE) != 0; }
|
||||
bool HasBulletNumber() const { return (m_flags & wxTEXT_ATTR_BULLET_NUMBER) != 0; }
|
||||
bool HasBulletSymbol() const { return (m_flags & wxTEXT_ATTR_BULLET_SYMBOL) != 0; }
|
||||
@@ -485,7 +508,8 @@ public:
|
||||
return !HasTextColour() && !HasBackgroundColour() && !HasFont() && !HasAlignment() &&
|
||||
!HasTabs() && !HasLeftIndent() && !HasRightIndent() &&
|
||||
!HasParagraphSpacingAfter() && !HasParagraphSpacingBefore() && !HasLineSpacing() &&
|
||||
!HasCharacterStyleName() && !HasParagraphStyleName() && !HasBulletNumber() && !HasBulletStyle() && !HasBulletSymbol();
|
||||
!HasCharacterStyleName() && !HasParagraphStyleName() && !HasListStyleName() &&
|
||||
!HasBulletNumber() && !HasBulletStyle() && !HasBulletSymbol();
|
||||
}
|
||||
|
||||
// return the attribute having the valid font and colours: it uses the
|
||||
@@ -528,13 +552,16 @@ private:
|
||||
|
||||
// Paragraph style
|
||||
wxString m_paragraphStyleName;
|
||||
|
||||
// List style
|
||||
wxString m_listStyleName;
|
||||
};
|
||||
|
||||
#define wxTEXT_ATTR_CHARACTER (wxTEXT_ATTR_FONT | wxTEXT_ATTR_BACKGROUND_COLOUR | wxTEXT_ATTR_TEXT_COLOUR | wxTEXT_ATTR_CHARACTER_STYLE_NAME)
|
||||
|
||||
#define wxTEXT_ATTR_PARAGRAPH (wxTEXT_ATTR_ALIGNMENT|wxTEXT_ATTR_LEFT_INDENT|wxTEXT_ATTR_RIGHT_INDENT|wxTEXT_ATTR_TABS|\
|
||||
wxTEXT_ATTR_PARA_SPACING_BEFORE|wxTEXT_ATTR_PARA_SPACING_AFTER|wxTEXT_ATTR_LINE_SPACING|\
|
||||
wxTEXT_ATTR_BULLET_STYLE|wxTEXT_ATTR_BULLET_NUMBER|wxTEXT_ATTR_BULLET_SYMBOL|wxTEXT_ATTR_PARAGRAPH_STYLE_NAME)
|
||||
wxTEXT_ATTR_BULLET_STYLE|wxTEXT_ATTR_BULLET_NUMBER|wxTEXT_ATTR_BULLET_SYMBOL|wxTEXT_ATTR_PARAGRAPH_STYLE_NAME|wxTEXT_ATTR_LIST_STYLE_NAME)
|
||||
|
||||
#define wxTEXT_ATTR_ALL (wxTEXT_ATTR_CHARACTER|wxTEXT_ATTR_PARAGRAPH)
|
||||
|
||||
@@ -858,6 +885,10 @@ public:
|
||||
void SetPartialParagraph(bool partialPara) { m_partialParagraph = partialPara; }
|
||||
bool GetPartialParagraph() const { return m_partialParagraph; }
|
||||
|
||||
/// If this is a buffer, returns the current style sheet. The base layout box
|
||||
/// class doesn't have an associated style sheet.
|
||||
virtual wxRichTextStyleSheet* GetStyleSheet() const { return NULL; }
|
||||
|
||||
// Operations
|
||||
|
||||
/// Initialize the object.
|
||||
@@ -953,6 +984,27 @@ public:
|
||||
/// content.
|
||||
bool CollectStyle(wxTextAttrEx& currentStyle, const wxTextAttrEx& style, long& multipleStyleAttributes);
|
||||
|
||||
/// Set list style
|
||||
virtual bool SetListStyle(const wxRichTextRange& range, wxRichTextListStyleDefinition* def, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1);
|
||||
virtual bool SetListStyle(const wxRichTextRange& range, const wxString& defName, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1);
|
||||
|
||||
/// Clear list for given range
|
||||
virtual bool ClearListStyle(const wxRichTextRange& range, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO);
|
||||
|
||||
/// Number/renumber any list elements in the given range.
|
||||
/// def/defName can be NULL/empty to indicate that the existing list style should be used.
|
||||
virtual bool NumberList(const wxRichTextRange& range, wxRichTextListStyleDefinition* def, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1);
|
||||
virtual bool NumberList(const wxRichTextRange& range, const wxString& defName, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1);
|
||||
|
||||
/// Promote the list items within the given range. promoteBy can be a positive or negative number, e.g. 1 or -1
|
||||
/// def/defName can be NULL/empty to indicate that the existing list style should be used.
|
||||
virtual bool PromoteList(int promoteBy, const wxRichTextRange& range, wxRichTextListStyleDefinition* def, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int specifiedLevel = -1);
|
||||
virtual bool PromoteList(int promoteBy, const wxRichTextRange& range, const wxString& defName, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int specifiedLevel = -1);
|
||||
|
||||
/// Helper for NumberList and PromoteList, that does renumbering and promotion simultaneously
|
||||
/// def/defName can be NULL/empty to indicate that the existing list style should be used.
|
||||
virtual bool DoNumberList(const wxRichTextRange& range, const wxRichTextRange& promotionRange, int promoteBy, wxRichTextListStyleDefinition* def, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1);
|
||||
|
||||
/// Test if this whole range has character attributes of the specified kind. If any
|
||||
/// of the attributes are different within the range, the test fails. You
|
||||
/// can use this to implement, for example, bold button updating. style must have
|
||||
@@ -1205,9 +1257,21 @@ public:
|
||||
/// Get combined attributes of the base style and paragraph style.
|
||||
wxTextAttrEx GetCombinedAttributes() const;
|
||||
|
||||
/// Create default tabstop array
|
||||
static void InitDefaultTabs();
|
||||
|
||||
/// Clear default tabstop array
|
||||
static void ClearDefaultTabs();
|
||||
|
||||
/// Get default tabstop array
|
||||
static const wxArrayInt& GetDefaultTabs() { return sm_defaultTabs; }
|
||||
|
||||
protected:
|
||||
/// The lines that make up the wrapped paragraph
|
||||
wxRichTextLineList m_cachedLines;
|
||||
|
||||
/// Default tabstops
|
||||
static wxArrayInt sm_defaultTabs;
|
||||
};
|
||||
|
||||
/*!
|
||||
@@ -1453,7 +1517,13 @@ public:
|
||||
|
||||
/// Set style sheet, if any.
|
||||
void SetStyleSheet(wxRichTextStyleSheet* styleSheet) { m_styleSheet = styleSheet; }
|
||||
wxRichTextStyleSheet* GetStyleSheet() const { return m_styleSheet; }
|
||||
virtual wxRichTextStyleSheet* GetStyleSheet() const { return m_styleSheet; }
|
||||
|
||||
/// Push style sheet to top of stack
|
||||
bool PushStyleSheet(wxRichTextStyleSheet* styleSheet);
|
||||
|
||||
/// Pop style sheet from top of stack
|
||||
wxRichTextStyleSheet* PopStyleSheet();
|
||||
|
||||
// Operations
|
||||
|
||||
@@ -2003,6 +2073,9 @@ void wxSetFontPreservingStyles(wxTextAttr& attr, const wxFont& font);
|
||||
/// Convert a decimal to Roman numerals
|
||||
wxString wxRichTextDecimalToRoman(long n);
|
||||
|
||||
|
||||
WXDLLIMPEXP_RICHTEXT void wxRichTextModuleInit();
|
||||
|
||||
#endif
|
||||
// wxUSE_RICHTEXT
|
||||
|
||||
|
@@ -196,6 +196,23 @@ public:
|
||||
virtual const wxTextAttrEx& GetDefaultStyleEx() const;
|
||||
virtual const wxTextAttr& GetDefaultStyle() const;
|
||||
|
||||
/// Set list style
|
||||
virtual bool SetListStyle(const wxRichTextRange& range, wxRichTextListStyleDefinition* def, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1);
|
||||
virtual bool SetListStyle(const wxRichTextRange& range, const wxString& defName, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1);
|
||||
|
||||
/// Clear list for given range
|
||||
virtual bool ClearListStyle(const wxRichTextRange& range, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO);
|
||||
|
||||
/// Number/renumber any list elements in the given range
|
||||
/// def/defName can be NULL/empty to indicate that the existing list style should be used.
|
||||
virtual bool NumberList(const wxRichTextRange& range, wxRichTextListStyleDefinition* def, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1);
|
||||
virtual bool NumberList(const wxRichTextRange& range, const wxString& defName, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int startFrom = 1, int specifiedLevel = -1);
|
||||
|
||||
/// Promote the list items within the given range. promoteBy can be a positive or negative number, e.g. 1 or -1
|
||||
/// def/defName can be NULL/empty to indicate that the existing list style should be used.
|
||||
virtual bool PromoteList(int promoteBy, const wxRichTextRange& range, wxRichTextListStyleDefinition* def, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int specifiedLevel = -1);
|
||||
virtual bool PromoteList(int promoteBy, const wxRichTextRange& range, const wxString& defName, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO, int specifiedLevel = -1);
|
||||
|
||||
// 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.
|
||||
@@ -530,10 +547,16 @@ public:
|
||||
/// Apply a named style to the selection
|
||||
virtual bool ApplyStyle(wxRichTextStyleDefinition* def);
|
||||
|
||||
/// Set style sheet, if any.
|
||||
/// Set style sheet, if any
|
||||
void SetStyleSheet(wxRichTextStyleSheet* styleSheet) { GetBuffer().SetStyleSheet(styleSheet); }
|
||||
wxRichTextStyleSheet* GetStyleSheet() const { return GetBuffer().GetStyleSheet(); }
|
||||
|
||||
/// Push style sheet to top of stack
|
||||
bool PushStyleSheet(wxRichTextStyleSheet* styleSheet) { return GetBuffer().PushStyleSheet(styleSheet); }
|
||||
|
||||
/// Pop style sheet from top of stack
|
||||
wxRichTextStyleSheet* PopStyleSheet() { return GetBuffer().PopStyleSheet(); }
|
||||
|
||||
/// Apply the style sheet to the buffer, for example if the styles have changed.
|
||||
bool ApplyStyleSheet(wxRichTextStyleSheet* styleSheet = NULL);
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/richtext/richedithtml.h
|
||||
// Name: wx/richtext/richtexthtml.h
|
||||
// Purpose: HTML I/O for wxRichTextCtrl
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@@ -49,54 +49,54 @@ protected:
|
||||
/// Output character formatting
|
||||
virtual void BeginCharacterFormatting(const wxTextAttrEx& currentStyle, const wxTextAttrEx& thisStyle, const wxTextAttrEx& paraStyle, wxOutputStream& stream );
|
||||
virtual void EndCharacterFormatting(const wxTextAttrEx& WXUNUSED(currentStyle), const wxTextAttrEx& thisStyle, const wxTextAttrEx& paraStyle, wxOutputStream& stream );
|
||||
|
||||
/// Output paragraph formatting
|
||||
|
||||
/// Output paragraph formatting
|
||||
virtual void OutputParagraphFormatting(const wxTextAttrEx& WXUNUSED(currentStyle), const wxTextAttrEx& thisStyle, wxOutputStream& stream/*, bool start*/);
|
||||
|
||||
/// Converts an image to its base64 equivalent
|
||||
void Image_to_Base64(wxRichTextImage* image, wxOutputStream& stream);
|
||||
|
||||
/// Builds required indentation
|
||||
void Indent( const wxTextAttrEx& thisStyle, wxTextOutputStream& str );
|
||||
|
||||
/// Left indent
|
||||
void LIndent( const wxTextAttrEx& thisStyle, wxTextOutputStream& str );
|
||||
|
||||
/// Converts from pt to size property compatible height
|
||||
long Pt_To_Size(long size);
|
||||
|
||||
/// Typical base64 encoder
|
||||
wxChar* b64enc( unsigned char* input, size_t in_len );
|
||||
|
||||
/// Gets the mime type of the given wxBITMAP_TYPE
|
||||
|
||||
/// Converts an image to its base64 equivalent
|
||||
void Image_to_Base64(wxRichTextImage* image, wxOutputStream& stream);
|
||||
|
||||
/// Builds required indentation
|
||||
void Indent( const wxTextAttrEx& thisStyle, wxTextOutputStream& str );
|
||||
|
||||
/// Left indent
|
||||
void LIndent( const wxTextAttrEx& thisStyle, wxTextOutputStream& str );
|
||||
|
||||
/// Converts from pt to size property compatible height
|
||||
long Pt_To_Size(long size);
|
||||
|
||||
/// Typical base64 encoder
|
||||
wxChar* b64enc( unsigned char* input, size_t in_len );
|
||||
|
||||
/// Gets the mime type of the given wxBITMAP_TYPE
|
||||
const wxChar* GetMimeType(int imageType);
|
||||
|
||||
/// Gets the html equivalent of the specified value
|
||||
wxString GetAlignment( const wxTextAttrEx& thisStyle );
|
||||
|
||||
/// Generates array for indentations
|
||||
wxString SymbolicIndent(long indent);
|
||||
|
||||
/// Finds the html equivalent of the specified bullet
|
||||
void TypeOfList( const wxTextAttrEx& thisStyle, wxString& tag );
|
||||
|
||||
/// Closes existings or Opens new tables for navigation to an item's horizontal position.
|
||||
void NavigateToListPosition( const wxTextAttrEx& thisStyle, wxTextOutputStream& str );
|
||||
|
||||
/// Indentation values of the table tags
|
||||
wxArrayInt m_indents;
|
||||
|
||||
/// Horizontal position of the current table
|
||||
long m_indent;
|
||||
/// Gets the html equivalent of the specified value
|
||||
wxString GetAlignment( const wxTextAttrEx& thisStyle );
|
||||
|
||||
/// Is there any opened font tag
|
||||
bool m_font;
|
||||
/// Generates array for indentations
|
||||
wxString SymbolicIndent(long indent);
|
||||
|
||||
/// Is there any opened ul/ol tag
|
||||
bool m_list;
|
||||
/// Finds the html equivalent of the specified bullet
|
||||
void TypeOfList( const wxTextAttrEx& thisStyle, wxString& tag );
|
||||
|
||||
/// type of list, ul or ol?
|
||||
bool m_is_ul;
|
||||
/// Closes existings or Opens new tables for navigation to an item's horizontal position.
|
||||
void NavigateToListPosition( const wxTextAttrEx& thisStyle, wxTextOutputStream& str );
|
||||
|
||||
/// Indentation values of the table tags
|
||||
wxArrayInt m_indents;
|
||||
|
||||
/// Horizontal position of the current table
|
||||
long m_indent;
|
||||
|
||||
/// Is there any opened font tag
|
||||
bool m_font;
|
||||
|
||||
/// Is there any opened ul/ol tag
|
||||
bool m_list;
|
||||
|
||||
/// type of list, ul or ol?
|
||||
bool m_is_ul;
|
||||
|
||||
};
|
||||
|
||||
|
@@ -30,6 +30,8 @@
|
||||
#include "wx/combo.h"
|
||||
#endif
|
||||
|
||||
#include "wx/choice.h"
|
||||
|
||||
/*!
|
||||
* Forward declarations
|
||||
*/
|
||||
@@ -47,32 +49,47 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextStyleDefinition: public wxObject
|
||||
DECLARE_CLASS(wxRichTextStyleDefinition)
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
/// Copy constructors
|
||||
wxRichTextStyleDefinition(const wxRichTextStyleDefinition& def)
|
||||
: wxObject()
|
||||
{
|
||||
Init();
|
||||
Copy(def);
|
||||
}
|
||||
|
||||
/// Default constructor
|
||||
wxRichTextStyleDefinition(const wxString& name = wxEmptyString) { Init(); m_name = name; }
|
||||
|
||||
/// Destructor
|
||||
virtual ~wxRichTextStyleDefinition() {}
|
||||
|
||||
/// Initialises members
|
||||
void Init() {}
|
||||
|
||||
/// Copies from def
|
||||
void Copy(const wxRichTextStyleDefinition& def);
|
||||
|
||||
/// Equality test
|
||||
bool Eq(const wxRichTextStyleDefinition& def) const;
|
||||
|
||||
/// Assignment operator
|
||||
void operator =(const wxRichTextStyleDefinition& def) { Copy(def); }
|
||||
|
||||
/// Equality operator
|
||||
bool operator ==(const wxRichTextStyleDefinition& def) const { return Eq(def); }
|
||||
|
||||
/// Override to clone the object
|
||||
virtual wxRichTextStyleDefinition* Clone() const = 0;
|
||||
|
||||
/// The name of the style.
|
||||
/// Sets and gets the name of the style
|
||||
void SetName(const wxString& name) { m_name = name; }
|
||||
const wxString& GetName() const { return m_name; }
|
||||
|
||||
/// The name of the style that this style is based on.
|
||||
/// Sets and gets the name of the style that this style is based on
|
||||
void SetBaseStyle(const wxString& name) { m_baseStyle = name; }
|
||||
const wxString& GetBaseStyle() const { return m_baseStyle; }
|
||||
|
||||
/// The style.
|
||||
/// Sets the style
|
||||
void SetStyle(const wxRichTextAttr& style) { m_style = style; }
|
||||
const wxRichTextAttr& GetStyle() const { return m_style; }
|
||||
wxRichTextAttr& GetStyle() { return m_style; }
|
||||
@@ -92,13 +109,17 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextCharacterStyleDefinition: public wxRichText
|
||||
DECLARE_DYNAMIC_CLASS(wxRichTextCharacterStyleDefinition)
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
/// Copy constructor
|
||||
wxRichTextCharacterStyleDefinition(const wxRichTextCharacterStyleDefinition& def): wxRichTextStyleDefinition(def) {}
|
||||
|
||||
/// Default constructor
|
||||
wxRichTextCharacterStyleDefinition(const wxString& name = wxEmptyString):
|
||||
wxRichTextStyleDefinition(name) {}
|
||||
|
||||
/// Destructor
|
||||
virtual ~wxRichTextCharacterStyleDefinition() {}
|
||||
|
||||
/// Clones the object
|
||||
virtual wxRichTextStyleDefinition* Clone() const { return new wxRichTextCharacterStyleDefinition(*this); }
|
||||
|
||||
protected:
|
||||
@@ -113,21 +134,30 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextParagraphStyleDefinition: public wxRichText
|
||||
DECLARE_DYNAMIC_CLASS(wxRichTextParagraphStyleDefinition)
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
/// Copy constructor
|
||||
wxRichTextParagraphStyleDefinition(const wxRichTextParagraphStyleDefinition& def): wxRichTextStyleDefinition(def) { m_nextStyle = def.m_nextStyle; }
|
||||
|
||||
/// Default constructor
|
||||
wxRichTextParagraphStyleDefinition(const wxString& name = wxEmptyString):
|
||||
wxRichTextStyleDefinition(name) {}
|
||||
|
||||
// Destructor
|
||||
virtual ~wxRichTextParagraphStyleDefinition() {}
|
||||
|
||||
/// The next style.
|
||||
/// Sets and gets the next style
|
||||
void SetNextStyle(const wxString& name) { m_nextStyle = name; }
|
||||
const wxString& GetNextStyle() const { return m_nextStyle; }
|
||||
|
||||
/// Copies from def
|
||||
void Copy(const wxRichTextParagraphStyleDefinition& def);
|
||||
|
||||
/// Assignment operator
|
||||
void operator =(const wxRichTextParagraphStyleDefinition& def) { Copy(def); }
|
||||
|
||||
/// Equality operator
|
||||
bool operator ==(const wxRichTextParagraphStyleDefinition& def) const;
|
||||
|
||||
/// Clones the object
|
||||
virtual wxRichTextStyleDefinition* Clone() const { return new wxRichTextParagraphStyleDefinition(*this); }
|
||||
|
||||
protected:
|
||||
@@ -136,6 +166,72 @@ protected:
|
||||
wxString m_nextStyle;
|
||||
};
|
||||
|
||||
/*!
|
||||
* wxRichTextListStyleDefinition class declaration
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_RICHTEXT wxRichTextListStyleDefinition: public wxRichTextParagraphStyleDefinition
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxRichTextListStyleDefinition)
|
||||
public:
|
||||
|
||||
/// Copy constructor
|
||||
wxRichTextListStyleDefinition(const wxRichTextListStyleDefinition& def): wxRichTextParagraphStyleDefinition(def) { Init(); Copy(def); }
|
||||
|
||||
/// Default constructor
|
||||
wxRichTextListStyleDefinition(const wxString& name = wxEmptyString):
|
||||
wxRichTextParagraphStyleDefinition(name) { Init(); }
|
||||
|
||||
/// Destructor
|
||||
virtual ~wxRichTextListStyleDefinition() {}
|
||||
|
||||
/// Copies from def
|
||||
void Copy(const wxRichTextListStyleDefinition& def);
|
||||
|
||||
/// Assignment operator
|
||||
void operator =(const wxRichTextListStyleDefinition& def) { Copy(def); }
|
||||
|
||||
/// Equality operator
|
||||
bool operator ==(const wxRichTextListStyleDefinition& def) const;
|
||||
|
||||
/// Clones the object
|
||||
virtual wxRichTextStyleDefinition* Clone() const { return new wxRichTextListStyleDefinition(*this); }
|
||||
|
||||
/// Sets/gets the attributes for the given level
|
||||
void SetLevelAttributes(int i, const wxTextAttrEx& attr);
|
||||
wxTextAttrEx* GetLevelAttributes(int i);
|
||||
const wxTextAttrEx* GetLevelAttributes(int i) const;
|
||||
|
||||
/// Convenience function for setting the major attributes for a list level specification
|
||||
void SetAttributes(int i, int leftIndent, int leftSubIndent, int bulletStyle, const wxString& bulletSymbol = wxEmptyString);
|
||||
|
||||
/// Finds the level corresponding to the given indentation
|
||||
int FindLevelForIndent(int indent) const;
|
||||
|
||||
/// Combine the base and list style with a paragraph style, using the given indent (from which
|
||||
/// an appropriate level is found)
|
||||
wxTextAttrEx CombineWithParagraphStyle(int indent, const wxTextAttrEx& paraStyle);
|
||||
|
||||
/// Combine the base and list style, using the given indent (from which
|
||||
/// an appropriate level is found)
|
||||
wxTextAttrEx GetCombinedStyle(int indent);
|
||||
|
||||
/// Combine the base and list style, using the given level from which
|
||||
/// an appropriate level is found)
|
||||
wxTextAttrEx GetCombinedStyleForLevel(int level);
|
||||
|
||||
/// Gets the number of available levels
|
||||
int GetLevelCount() const { return 10; }
|
||||
|
||||
/// Is this a numbered list?
|
||||
bool IsNumbered(int i) const;
|
||||
|
||||
protected:
|
||||
|
||||
/// The styles for each level (up to 10)
|
||||
wxTextAttrEx m_levelStyles[10];
|
||||
};
|
||||
|
||||
/*!
|
||||
* The style sheet
|
||||
*/
|
||||
@@ -152,7 +248,7 @@ public:
|
||||
Copy(sheet);
|
||||
}
|
||||
wxRichTextStyleSheet() { Init(); }
|
||||
virtual ~wxRichTextStyleSheet() { DeleteStyles(); }
|
||||
virtual ~wxRichTextStyleSheet();
|
||||
|
||||
/// Initialisation
|
||||
void Init();
|
||||
@@ -172,33 +268,65 @@ public:
|
||||
/// Add a definition to the paragraph style list
|
||||
bool AddParagraphStyle(wxRichTextParagraphStyleDefinition* def);
|
||||
|
||||
/// Add a definition to the list style list
|
||||
bool AddListStyle(wxRichTextListStyleDefinition* def);
|
||||
|
||||
/// Remove a character style
|
||||
bool RemoveCharacterStyle(wxRichTextStyleDefinition* def, bool deleteStyle = false) { return RemoveStyle(m_characterStyleDefinitions, def, deleteStyle); }
|
||||
|
||||
/// Remove a paragraph style
|
||||
bool RemoveParagraphStyle(wxRichTextStyleDefinition* def, bool deleteStyle = false) { return RemoveStyle(m_paragraphStyleDefinitions, def, deleteStyle); }
|
||||
|
||||
/// Remove a list style
|
||||
bool RemoveListStyle(wxRichTextStyleDefinition* def, bool deleteStyle = false) { return RemoveStyle(m_listStyleDefinitions, def, deleteStyle); }
|
||||
|
||||
/// Find a character definition by name
|
||||
wxRichTextCharacterStyleDefinition* FindCharacterStyle(const wxString& name) const { return (wxRichTextCharacterStyleDefinition*) FindStyle(m_characterStyleDefinitions, name); }
|
||||
wxRichTextCharacterStyleDefinition* FindCharacterStyle(const wxString& name, bool recurse = true) const { return (wxRichTextCharacterStyleDefinition*) FindStyle(m_characterStyleDefinitions, name, recurse); }
|
||||
|
||||
/// Find a paragraph definition by name
|
||||
wxRichTextParagraphStyleDefinition* FindParagraphStyle(const wxString& name) const { return (wxRichTextParagraphStyleDefinition*) FindStyle(m_paragraphStyleDefinitions, name); }
|
||||
wxRichTextParagraphStyleDefinition* FindParagraphStyle(const wxString& name, bool recurse = true) const { return (wxRichTextParagraphStyleDefinition*) FindStyle(m_paragraphStyleDefinitions, name, recurse); }
|
||||
|
||||
/// Return the number of character styes.
|
||||
/// Find a list definition by name
|
||||
wxRichTextListStyleDefinition* FindListStyle(const wxString& name, bool recurse = true) const { return (wxRichTextListStyleDefinition*) FindStyle(m_listStyleDefinitions, name, recurse); }
|
||||
|
||||
/// Return the number of character styles
|
||||
size_t GetCharacterStyleCount() const { return m_characterStyleDefinitions.GetCount(); }
|
||||
|
||||
/// Return the number of paragraph styes.
|
||||
/// Return the number of paragraph styles
|
||||
size_t GetParagraphStyleCount() const { return m_paragraphStyleDefinitions.GetCount(); }
|
||||
|
||||
/// Return the number of list styles
|
||||
size_t GetListStyleCount() const { return m_listStyleDefinitions.GetCount(); }
|
||||
|
||||
/// Return the nth character style
|
||||
wxRichTextCharacterStyleDefinition* GetCharacterStyle(size_t n) const { return (wxRichTextCharacterStyleDefinition*) m_characterStyleDefinitions.Item(n)->GetData(); }
|
||||
|
||||
/// Return the nth paragraph style
|
||||
wxRichTextParagraphStyleDefinition* GetParagraphStyle(size_t n) const { return (wxRichTextParagraphStyleDefinition*) m_paragraphStyleDefinitions.Item(n)->GetData(); }
|
||||
|
||||
/// Return the nth list style
|
||||
wxRichTextListStyleDefinition* GetListStyle(size_t n) const { return (wxRichTextListStyleDefinition*) m_listStyleDefinitions.Item(n)->GetData(); }
|
||||
|
||||
/// Delete all styles
|
||||
void DeleteStyles();
|
||||
|
||||
/// Insert into list of style sheets
|
||||
bool InsertSheet(wxRichTextStyleSheet* before);
|
||||
|
||||
/// Append to list of style sheets
|
||||
bool AppendSheet(wxRichTextStyleSheet* after);
|
||||
|
||||
/// Unlink from the list of style sheets
|
||||
void Unlink();
|
||||
|
||||
/// Get/set next sheet
|
||||
wxRichTextStyleSheet* GetNextSheet() const { return m_nextSheet; }
|
||||
void SetNextSheet(wxRichTextStyleSheet* sheet) { m_nextSheet = sheet; }
|
||||
|
||||
/// Get/set previous sheet
|
||||
wxRichTextStyleSheet* GetPreviousSheet() const { return m_previousSheet; }
|
||||
void SetPreviousSheet(wxRichTextStyleSheet* sheet) { m_previousSheet = sheet; }
|
||||
|
||||
/// Implementation
|
||||
|
||||
/// Add a definition to one of the style lists
|
||||
@@ -208,12 +336,16 @@ public:
|
||||
bool RemoveStyle(wxList& list, wxRichTextStyleDefinition* def, bool deleteStyle);
|
||||
|
||||
/// Find a definition by name
|
||||
wxRichTextStyleDefinition* FindStyle(const wxList& list, const wxString& name) const;
|
||||
wxRichTextStyleDefinition* FindStyle(const wxList& list, const wxString& name, bool recurse = true) const;
|
||||
|
||||
protected:
|
||||
|
||||
wxList m_characterStyleDefinitions;
|
||||
wxList m_paragraphStyleDefinitions;
|
||||
wxList m_listStyleDefinitions;
|
||||
|
||||
wxRichTextStyleSheet* m_previousSheet;
|
||||
wxRichTextStyleSheet* m_nextSheet;
|
||||
};
|
||||
|
||||
#if wxUSE_HTML
|
||||
@@ -228,6 +360,15 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextStyleListBox: public wxHtmlListBox
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
public:
|
||||
/// Which type of style definition is currently showing?
|
||||
enum wxRichTextStyleType
|
||||
{
|
||||
wxRICHTEXT_STYLE_ALL,
|
||||
wxRICHTEXT_STYLE_PARAGRAPH,
|
||||
wxRICHTEXT_STYLE_CHARACTER,
|
||||
wxRICHTEXT_STYLE_LIST
|
||||
};
|
||||
|
||||
wxRichTextStyleListBox()
|
||||
{
|
||||
Init();
|
||||
@@ -240,7 +381,8 @@ public:
|
||||
{
|
||||
m_styleSheet = NULL;
|
||||
m_richTextCtrl = NULL;
|
||||
m_applyOnSelection = true;
|
||||
m_applyOnSelection = false;
|
||||
m_styleType = wxRICHTEXT_STYLE_PARAGRAPH;
|
||||
}
|
||||
|
||||
bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition,
|
||||
@@ -278,14 +420,12 @@ public:
|
||||
/// Left click
|
||||
void OnLeftDown(wxMouseEvent& event);
|
||||
|
||||
/// Left double-click
|
||||
void OnLeftDoubleClick(wxMouseEvent& event);
|
||||
|
||||
/// Auto-select from style under caret in idle time
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
|
||||
#if 0
|
||||
virtual wxColour GetSelectedTextColour(const wxColour& colFg) const;
|
||||
virtual wxColour GetSelectedTextBgColour(const wxColour& colBg) const;
|
||||
#endif
|
||||
|
||||
/// Convert units in tends of a millimetre to device units
|
||||
int ConvertTenthsMMToPixels(wxDC& dc, int units) const;
|
||||
|
||||
@@ -297,6 +437,13 @@ public:
|
||||
void SetApplyOnSelection(bool applyOnSel) { m_applyOnSelection = applyOnSel; }
|
||||
bool GetApplyOnSelection() const { return m_applyOnSelection; }
|
||||
|
||||
/// Set the style type to display
|
||||
void SetStyleType(wxRichTextStyleType styleType) { m_styleType = styleType; UpdateStyles(); }
|
||||
wxRichTextStyleType GetStyleType() const { return m_styleType; }
|
||||
|
||||
/// Helper for listbox and combo control
|
||||
static wxString GetStyleToShowInIdleTime(wxRichTextCtrl* ctrl, wxRichTextStyleType styleType);
|
||||
|
||||
protected:
|
||||
/// Returns the HTML for this item
|
||||
virtual wxString OnGetItem(size_t n) const;
|
||||
@@ -306,6 +453,84 @@ private:
|
||||
wxRichTextStyleSheet* m_styleSheet;
|
||||
wxRichTextCtrl* m_richTextCtrl;
|
||||
bool m_applyOnSelection; // if true, applies style on selection
|
||||
wxRichTextStyleType m_styleType; // style type to display
|
||||
};
|
||||
|
||||
/*!
|
||||
* wxRichTextStyleListCtrl class declaration
|
||||
* This is a container for the list control plus a combobox to switch between
|
||||
* style types.
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_RICHTEXT wxRichTextStyleListCtrl: public wxControl
|
||||
{
|
||||
DECLARE_CLASS(wxRichTextStyleListCtrl)
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
public:
|
||||
|
||||
/// Constructors
|
||||
wxRichTextStyleListCtrl()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
wxRichTextStyleListCtrl(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0);
|
||||
|
||||
/// Constructors
|
||||
virtual ~wxRichTextStyleListCtrl();
|
||||
|
||||
/// Member initialisation
|
||||
void Init()
|
||||
{
|
||||
m_styleListBox = NULL;
|
||||
m_styleChoice = NULL;
|
||||
m_dontUpdate = false;
|
||||
}
|
||||
|
||||
/// Creates the windows
|
||||
bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0);
|
||||
|
||||
/// Associates the control with a style manager
|
||||
void SetStyleSheet(wxRichTextStyleSheet* styleSheet);
|
||||
wxRichTextStyleSheet* GetStyleSheet() const;
|
||||
|
||||
/// Associates the control with a wxRichTextCtrl
|
||||
void SetRichTextCtrl(wxRichTextCtrl* ctrl);
|
||||
wxRichTextCtrl* GetRichTextCtrl() const;
|
||||
|
||||
/// Updates the style list box
|
||||
void UpdateStyles();
|
||||
|
||||
/// Set/get the style type to display
|
||||
void SetStyleType(wxRichTextStyleListBox::wxRichTextStyleType styleType);
|
||||
wxRichTextStyleListBox::wxRichTextStyleType GetStyleType() const;
|
||||
|
||||
/// Get the choice index for style type
|
||||
int StyleTypeToIndex(wxRichTextStyleListBox::wxRichTextStyleType styleType);
|
||||
|
||||
/// Get the style type for choice index
|
||||
wxRichTextStyleListBox::wxRichTextStyleType StyleIndexToType(int i);
|
||||
|
||||
/// Get the listbox
|
||||
wxRichTextStyleListBox* GetStyleListBox() const { return m_styleListBox; }
|
||||
|
||||
/// Get the choice
|
||||
wxChoice* GetStyleChoice() const { return m_styleChoice; }
|
||||
|
||||
/// React to style type choice
|
||||
void OnChooseType(wxCommandEvent& event);
|
||||
|
||||
/// Lay out the controls
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
private:
|
||||
|
||||
wxRichTextStyleListBox* m_styleListBox;
|
||||
wxChoice* m_styleChoice;
|
||||
bool m_dontUpdate;
|
||||
};
|
||||
|
||||
#if wxUSE_COMBOCTRL
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: joystick.h
|
||||
// Name: wx/unix/joystick.h
|
||||
// Purpose: wxJoystick class
|
||||
// Author: Guilhem Lavaux
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Guilhem Lavaux
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __JOYSTICKH__
|
||||
@@ -92,5 +92,4 @@ protected:
|
||||
};
|
||||
|
||||
#endif
|
||||
// __JOYSTICKH__
|
||||
|
||||
// __JOYSTICKH__
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: sound.h
|
||||
// Name: wx/unix/sound.h
|
||||
// Purpose: wxSound class
|
||||
// Author: Julian Smart, Vaclav Slavik
|
||||
// Modified by:
|
||||
// Created: 25/10/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart, Vaclav Slavik
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_SOUND_H_
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
wxSoundData() : m_refCnt(1) {}
|
||||
void IncRef();
|
||||
void DecRef();
|
||||
|
||||
|
||||
// .wav header information:
|
||||
unsigned m_channels; // num of channels (mono:1, stereo:2)
|
||||
unsigned m_samplingRate;
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
// samples (wxUint8), if 16 then signed 16bit
|
||||
// (wxInt16)
|
||||
unsigned m_samples; // length in samples:
|
||||
|
||||
|
||||
// wave data:
|
||||
size_t m_dataBytes;
|
||||
wxUint8 *m_data; // m_dataBytes bytes of data
|
||||
@@ -69,23 +69,23 @@ public:
|
||||
bool Create(int size, const wxByte* data);
|
||||
|
||||
bool IsOk() const { return m_data != NULL; }
|
||||
|
||||
|
||||
// Stop playing any sound
|
||||
static void Stop();
|
||||
|
||||
// Returns true if a sound is being played
|
||||
static bool IsPlaying();
|
||||
|
||||
|
||||
// for internal use
|
||||
static void UnloadBackend();
|
||||
|
||||
|
||||
protected:
|
||||
bool DoPlay(unsigned flags) const;
|
||||
|
||||
static void EnsureBackend();
|
||||
void Free();
|
||||
bool LoadWAV(const wxUint8 *data, size_t length, bool copyData);
|
||||
|
||||
|
||||
static wxSoundBackend *ms_backend;
|
||||
#if wxUSE_LIBSDL && wxUSE_PLUGINS
|
||||
// FIXME - temporary, until we have plugins architecture
|
||||
@@ -98,7 +98,7 @@ private:
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxSoundBackend:
|
||||
// wxSoundBackend:
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// This is interface to sound playing implementation. There are multiple
|
||||
@@ -121,7 +121,7 @@ class WXDLLIMPEXP_ADV wxSoundBackend
|
||||
{
|
||||
public:
|
||||
virtual ~wxSoundBackend() {}
|
||||
|
||||
|
||||
// Returns the name of the backend (e.g. "Open Sound System")
|
||||
virtual wxString GetName() const = 0;
|
||||
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
// playback, otherwise it is left up to the backend (will usually be more
|
||||
// effective).
|
||||
virtual bool HasNativeAsyncPlayback() const = 0;
|
||||
|
||||
|
||||
// Plays the sound. flags are same flags as those passed to wxSound::Play.
|
||||
// The function should periodically check the value of
|
||||
// status->m_stopRequested and terminate if it is set to true (it may
|
||||
@@ -158,3 +158,4 @@ public:
|
||||
#endif // wxUSE_SOUND
|
||||
|
||||
#endif
|
||||
// _WX_SOUND_H_
|
@@ -29,7 +29,7 @@
|
||||
#define wxMAJOR_VERSION 2
|
||||
#define wxMINOR_VERSION 7
|
||||
#define wxRELEASE_NUMBER 1
|
||||
#define wxSUBRELEASE_NUMBER 0
|
||||
#define wxSUBRELEASE_NUMBER 1
|
||||
#define wxVERSION_STRING _T("wxWidgets 2.7.1")
|
||||
|
||||
/* nothing to update below this line when updating the version */
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: cursor.h
|
||||
// Name: wx/x11/cursor.h
|
||||
// Purpose: wxCursor class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CURSOR_H_
|
||||
@@ -50,4 +50,4 @@ private:
|
||||
|
||||
|
||||
#endif
|
||||
// _WX_CURSOR_H_
|
||||
// _WX_CURSOR_H_
|
||||
|
@@ -17,7 +17,7 @@
|
||||
class WXDLLIMPEXP_CORE wxMemoryDC : public wxWindowDC
|
||||
{
|
||||
public:
|
||||
wxMemoryDC();
|
||||
wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
|
||||
wxMemoryDC( wxDC *dc ); // Create compatible DC
|
||||
virtual ~wxMemoryDC();
|
||||
virtual void SelectObject( const wxBitmap& bitmap );
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user