wxWidgets3: update to svn r70933

This commit is contained in:
Shawn Hoffman
2012-03-17 18:12:27 -07:00
parent 0ed8af2287
commit a648aca65c
906 changed files with 39468 additions and 17244 deletions

View File

@ -0,0 +1,59 @@
/////////////////////////////////////////////////////////////////////////////
// Name: anybutton.h
// Purpose: wxAnyButton class
// Author: Stefan Csomor
// Created: 1998-01-01 (extracted from button.h)
// RCS-ID: $Id: anybutton.h 67931 2011-06-14 13:00:42Z VZ $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OSX_ANYBUTTON_H_
#define _WX_OSX_ANYBUTTON_H_
// Any button
class WXDLLIMPEXP_CORE wxAnyButton : public wxAnyButtonBase
{
public:
wxAnyButton() {}
static wxSize GetDefaultSize();
virtual void SetLabel(const wxString& label);
protected:
virtual wxSize DoGetBestSize() const ;
void OnEnterWindow( wxMouseEvent& event);
void OnLeaveWindow( wxMouseEvent& event);
virtual wxBitmap DoGetBitmap(State which) const;
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
virtual void DoSetBitmapPosition(wxDirection dir);
virtual void DoSetBitmapMargins(int x, int y)
{
m_marginX = x;
m_marginY = y;
InvalidateBestSize();
}
#if wxUSE_MARKUP && wxOSX_USE_COCOA
virtual bool DoSetLabelMarkup(const wxString& markup);
#endif // wxUSE_MARKUP && wxOSX_USE_COCOA
// the margins around the bitmap
int m_marginX;
int m_marginY;
// the bitmaps for the different state of the buttons, all of them may be
// invalid and the button only shows a bitmap at all if State_Normal bitmap
// is valid
wxBitmap m_bitmaps[State_Max];
wxDECLARE_NO_COPY_CLASS(wxAnyButton);
DECLARE_EVENT_TABLE()
};
#endif // _WX_OSX_ANYBUTTON_H_

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: app.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: app.h 68617 2011-08-09 22:17:12Z DS $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -122,7 +122,10 @@ public:
virtual short MacHandleAEQuit(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAERApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
#endif
// in response of an open-document apple event
// in response of an openFiles message with Cocoa and an
// open-document apple event with Carbon
virtual void MacOpenFiles(const wxArrayString &fileNames) ;
// called by MacOpenFiles for each file.
virtual void MacOpenFile(const wxString &fileName) ;
// in response of a get-url apple event
virtual void MacOpenURL(const wxString &url) ;

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: button.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: button.h 67931 2011-06-14 13:00:42Z VZ $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -41,8 +41,6 @@ public:
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
static wxSize GetDefaultSize();
virtual void SetLabel(const wxString& label);
virtual wxWindow *SetDefault();
virtual void Command(wxCommandEvent& event);
@ -52,38 +50,7 @@ public:
virtual bool OSXHandleClicked( double timestampsec );
protected:
virtual wxSize DoGetBestSize() const ;
void OnEnterWindow( wxMouseEvent& event);
void OnLeaveWindow( wxMouseEvent& event);
virtual wxBitmap DoGetBitmap(State which) const;
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
virtual void DoSetBitmapPosition(wxDirection dir);
virtual void DoSetBitmapMargins(int x, int y)
{
m_marginX = x;
m_marginY = y;
InvalidateBestSize();
}
#if wxUSE_MARKUP && wxOSX_USE_COCOA
virtual bool DoSetLabelMarkup(const wxString& markup);
#endif // wxUSE_MARKUP && wxOSX_USE_COCOA
// the margins around the bitmap
int m_marginX;
int m_marginY;
// the bitmaps for the different state of the buttons, all of them may be
// invalid and the button only shows a bitmap at all if State_Normal bitmap
// is valid
wxBitmap m_bitmaps[State_Max];
DECLARE_DYNAMIC_CLASS(wxButton)
DECLARE_EVENT_TABLE()
};
// OS X specific class, not part of public wx API

View File

@ -406,6 +406,8 @@ public:
//
virtual wxDataViewItem GetCurrentItem() const;
virtual void SetCurrentItem(const wxDataViewItem& item);
virtual wxDataViewColumn *GetCurrentColumn() const;
virtual int GetSelectedItemsCount() const;
virtual int GetSelections(wxDataViewItemArray& sel) const;
virtual bool IsSelected (wxDataViewItem const& item) const;
virtual void Select (wxDataViewItem const& item);
@ -427,6 +429,8 @@ public:
virtual void SetRowHeight(wxDataViewItem const& item, unsigned int height);
virtual void OnSize ();
virtual void StartEditor( const wxDataViewItem & item, unsigned int column );
//
// other methods
//

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 2006-01-12
// RCS-ID: $Id: evtloop.h 65680 2010-09-30 11:44:45Z VZ $
// RCS-ID: $Id: evtloop.h 68302 2011-07-19 17:56:57Z SC $
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -20,6 +20,8 @@ class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxCFEventLoop
public:
wxGUIEventLoop();
virtual void WakeUp();
protected:
virtual int DoDispatchTimeout(unsigned long timeout);

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: region.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: region.h 69459 2011-10-18 21:56:40Z VZ $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -17,12 +17,13 @@
class WXDLLIMPEXP_CORE wxRegion : public wxRegionWithCombine
{
public:
wxRegion() { }
wxRegion(long x, long y, long w, long h);
wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight);
wxRegion(const wxRect& rect);
wxRegion( WXHRGN hRegion );
wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE );
wxRegion();
#if wxUSE_IMAGE
wxRegion(const wxBitmap& bmp)
{
Union(bmp);
@ -32,6 +33,7 @@ public:
{
Union(bmp, transColour, tolerance);
}
#endif
virtual ~wxRegion();

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: statbmp.h 67280 2011-03-22 14:17:38Z DS $
// RCS-ID: $Id: statbmp.h 70165 2011-12-29 14:42:13Z SN $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -39,8 +39,8 @@ class WXDLLIMPEXP_CORE wxStaticBitmap: public wxStaticBitmapBase
virtual void SetBitmap(const wxBitmap& bitmap);
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
virtual void Command(wxCommandEvent& WXUNUSED(event)) {}
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {}
void OnPaint( wxPaintEvent &event ) ;
wxBitmap GetBitmap() const { return m_bitmap; }

View File

@ -4,7 +4,7 @@
* Author: Vadim Zeitlin
* Modified by:
* Created: 2005-04-05 (extracted from wx/chkconf.h)
* RCS-ID: $Id: chkconf.h 66955 2011-02-18 18:44:43Z SC $
* RCS-ID: $Id: chkconf.h 67497 2011-04-15 19:18:34Z DS $
* Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwidgets.org>
* Licence: wxWindows licence
*/
@ -107,4 +107,4 @@
#include "wx/osx/cocoa/chkconf.h"
#endif
#endif // _WX_OSX_CHKCONF_H_
#endif /* _WX_OSX_CHKCONF_H_ */

View File

@ -474,6 +474,8 @@ public:
//
virtual wxDataViewItem GetCurrentItem() const;
virtual void SetCurrentItem(const wxDataViewItem& item);
virtual wxDataViewColumn *GetCurrentColumn() const;
virtual int GetSelectedItemsCount() const;
virtual int GetSelections(wxDataViewItemArray& sel) const;
virtual bool IsSelected(const wxDataViewItem& item) const;
virtual void Select(const wxDataViewItem& item);
@ -496,6 +498,8 @@ public:
wxDataViewColumn*& columnPtr) const;
virtual void SetRowHeight(const wxDataViewItem& item, unsigned int height);
virtual void OnSize();
virtual void StartEditor( const wxDataViewItem & item, unsigned int column );
// drag & drop helper methods
wxDataFormat GetDnDDataFormat(wxDataObjectComposite* dataObjects);

View File

@ -3,7 +3,7 @@
// Purpose: declaration of wxGUIEventLoop for wxOSX/Cocoa
// Author: Vadim Zeitlin
// Created: 2008-12-28
// RCS-ID: $Id: evtloop.h 67129 2011-03-05 12:21:20Z SC $
// RCS-ID: $Id: evtloop.h 68301 2011-07-19 16:17:44Z SC $
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -21,6 +21,8 @@ public:
void EndModalSession();
virtual void WakeUp();
protected:
virtual int DoDispatchTimeout(unsigned long timeout);
@ -31,7 +33,12 @@ protected:
virtual CFRunLoopRef CFGetCurrentRunLoop() const;
void* m_modalSession;
wxWindow* m_modalWindow;
WXWindow m_dummyWindow;
int m_modalNestedLevel;
};
#endif // _WX_OSX_COCOA_EVTLOOP_H_

View File

@ -6,7 +6,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: private.h 67233 2011-03-18 15:45:51Z SC $
// RCS-ID: $Id: private.h 70863 2012-03-10 13:13:51Z SC $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -145,13 +145,13 @@ public :
virtual unsigned int draggingUpdated(void* sender, WXWidget slf, void* _cmd);
virtual bool performDragOperation(void* sender, WXWidget slf, void* _cmd);
virtual void mouseEvent(WX_NSEvent event, WXWidget slf, void* _cmd);
virtual void cursorUpdate(WX_NSEvent event, WXWidget slf, void* _cmd);
virtual void keyEvent(WX_NSEvent event, WXWidget slf, void* _cmd);
virtual void insertText(NSString* text, WXWidget slf, void* _cmd);
virtual bool performKeyEquivalent(WX_NSEvent event, WXWidget slf, void* _cmd);
virtual bool acceptsFirstResponder(WXWidget slf, void* _cmd);
virtual bool becomeFirstResponder(WXWidget slf, void* _cmd);
virtual bool resignFirstResponder(WXWidget slf, void* _cmd);
virtual void resetCursorRects(WXWidget slf, void* _cmd);
virtual bool isFlipped(WXWidget slf, void* _cmd);
virtual void drawRect(void* rect, WXWidget slf, void* _cmd);
@ -239,6 +239,8 @@ public :
virtual void SetModified(bool modified);
virtual bool IsModified() const;
virtual void SetRepresentedFilename(const wxString& filename);
wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; }
CGWindowLevel GetWindowLevel() const { return m_macWindowLevel; }
@ -352,6 +354,21 @@ protected :
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo;
@end
// This interface must be exported in shared 64 bit multilib build but
// using WXEXPORT with Objective C interfaces doesn't work with old (4.0.1)
// gcc when using 10.4 SDK. It does work with newer gcc even in 32 bit
// builds but seems to be unnecessary there so to avoid the expense of a
// configure check verifying if this does work or not with the current
// compiler we just only use it for 64 bit builds where this is always
// supported.
//
// NB: Currently this is the only place where we need to export an
// interface but if we need to do it elsewhere we should define a
// WXEXPORT_OBJC macro once and reuse it in all places it's needed
// instead of duplicating this preprocessor check.
#ifdef __LP64__
WXEXPORT
#endif // 64 bit builds
@interface wxNSAppController : NSObject wxOSX_10_6_AND_LATER(<NSApplicationDelegate>)
{
}

View File

@ -0,0 +1,51 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/osx/cocoa/private/date.h
// Purpose: NSDate-related helpers
// Author: Vadim Zeitlin
// Created: 2011-12-19
// RCS-ID: $Id: date.h 70070 2011-12-20 21:27:09Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OSX_COCOA_PRIVATE_DATE_H_
#define _WX_OSX_COCOA_PRIVATE_DATE_H_
#include "wx/datetime.h"
namespace wxOSXImpl
{
// Functions to convert between NSDate and wxDateTime.
// Returns an NSDate corresponding to the given wxDateTime which can be invalid
// (in which case nil is returned).
inline NSDate* NSDateFromWX(const wxDateTime& dt)
{
if ( !dt.IsValid() )
return nil;
// Get the internal representation as a double used by NSDate.
double ticks = dt.GetValue().ToDouble();
// wxDateTime uses milliseconds while NSDate uses (fractional) seconds.
return [NSDate dateWithTimeIntervalSince1970:ticks/1000.];
}
// Returns wxDateTime corresponding to the given NSDate (which may be nil).
inline wxDateTime NSDateToWX(const NSDate* d)
{
if ( !d )
return wxDefaultDateTime;
// Reverse everything done above.
wxLongLong ll;
ll.Assign([d timeIntervalSince1970]*1000);
wxDateTime dt(ll);
return dt;
}
} // namespace wxOSXImpl
#endif // _WX_OSX_COCOA_PRIVATE_DATE_H_

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 03/02/99
// RCS-ID: $Id: textimpl.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: textimpl.h 70354 2012-01-15 15:53:56Z SC $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -28,6 +28,9 @@ public :
wxNSTextFieldControl( wxWindow *wxPeer, wxTextEntry *entry, WXWidget w );
virtual ~wxNSTextFieldControl();
virtual bool CanClipMaxLength() const { return true; }
virtual void SetMaxLength(unsigned long len);
virtual wxString GetStringValue() const ;
virtual void SetStringValue( const wxString &str) ;
virtual void Copy() ;
@ -105,6 +108,9 @@ public :
virtual wxString GetStringAtIndex(int pos) const;
virtual int FindString(const wxString& text) const;
virtual void Popup();
virtual void Dismiss();
private:
NSComboBox* m_comboBox;
};

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: combobox.h 66993 2011-02-22 13:25:38Z VZ $
// RCS-ID: $Id: combobox.h 69956 2011-12-08 14:47:37Z VZ $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -25,7 +25,14 @@ class wxComboBoxChoice;
class wxComboWidgetImpl;
// Combobox item
class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
class WXDLLIMPEXP_CORE wxComboBox :
public wxWindowWithItems<
#if wxOSX_USE_CARBON
wxNavigationEnabled<wxControl>,
#else
wxControl,
#endif
wxComboBoxBase>
{
DECLARE_DYNAMIC_CLASS(wxComboBox)
@ -42,7 +49,7 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
virtual void DelegateTextChanged( const wxString& value );
virtual void DelegateChoice( const wxString& value );
wxComboBox() { Init(); }
wxComboBox() { }
wxComboBox(wxWindow *parent, wxWindowID id,
const wxString& value = wxEmptyString,
@ -53,7 +60,6 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
{
Init();
Create(parent, id, value, pos, size, n, choices, style, validator, name);
}
@ -66,7 +72,6 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
{
Init();
Create(parent, id, value, pos, size, choices, style, validator, name);
}
@ -134,25 +139,20 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
virtual wxTextWidgetImpl* GetTextPeer() const;
#endif // wxOSX_USE_CARBON
#if wxOSX_USE_COCOA
virtual void Popup();
virtual void Dismiss();
#endif // wxOSX_USE_COCOA
// osx specific event handling common for all osx-ports
virtual bool OSXHandleClicked( double timestampsec );
#if wxOSX_USE_CARBON
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
WX_DECLARE_CONTROL_CONTAINER();
#endif
#if wxOSX_USE_COCOA
wxComboWidgetImpl* GetComboPeer() const;
#endif
protected:
// common part of all ctors
void Init();
// List functions
virtual void DoDeleteOneItem(unsigned int n);
virtual void DoClear();
@ -187,10 +187,6 @@ protected:
wxComboBoxChoice* m_choice;
wxComboBoxDataArray m_datas;
#if wxOSX_USE_CARBON
DECLARE_EVENT_TABLE()
#endif
};
#endif // _WX_COMBOBOX_H_

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 29.04.04
// RCS-ID: $Id: config_xcode.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: config_xcode.h 70021 2011-12-16 22:12:49Z VZ $
// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -133,9 +133,9 @@
#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.9.2"
#define PACKAGE_STRING "wxWidgets 2.9.4"
#define PACKAGE_TARNAME "wxwidgets"
#define PACKAGE_VERSION "2.9.2"
#define PACKAGE_VERSION "2.9.4"
// for regex
#define WX_NO_REGEX_ADVANCED 1

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: colour.h 67068 2011-02-27 12:48:42Z VZ $
// RCS-ID: $Id: colour.h 70165 2011-12-29 14:42:13Z SN $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -42,10 +42,10 @@ public:
bool operator != (const wxColour& colour) const { return !(*this == colour); }
CGColorRef GetPixel() const { return m_cgColour; };
CGColorRef GetPixel() const { return m_cgColour; }
CGColorRef GetCGColor() const { return m_cgColour; };
CGColorRef CreateCGColor() const { return wxCFRetain( (CGColorRef)m_cgColour ); };
CGColorRef GetCGColor() const { return m_cgColour; }
CGColorRef CreateCGColor() const { return wxCFRetain( (CGColorRef)m_cgColour ); }
#if wxOSX_USE_COCOA_OR_CARBON
void GetRGBColor( RGBColor *col ) const;

View File

@ -89,6 +89,9 @@ public:
virtual wxDataViewItem GetCurrentItem() const = 0;
virtual void SetCurrentItem(const wxDataViewItem& item) = 0;
virtual wxDataViewColumn *GetCurrentColumn() const = 0;
virtual int GetSelectedItemsCount() const = 0;
virtual int GetSelections(wxDataViewItemArray& sel) const = 0; // returns all selected items in the native control
virtual bool IsSelected (wxDataViewItem const& item) const = 0; // checks if the passed item is selected in the native control
virtual void Select (wxDataViewItem const& item) = 0; // selects the passed item in the native control
@ -109,6 +112,7 @@ public:
virtual void HitTest (wxPoint const& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const = 0; // return the item and column pointer that contains with the passed point
virtual void SetRowHeight(wxDataViewItem const& item, unsigned int height) = 0; // sets the height of the row containg the passed item in the native control
virtual void OnSize (void) = 0; // updates the layout of the native control after a size event
virtual void StartEditor( const wxDataViewItem & item, unsigned int column ) = 0; // starts editing the passed in item and column
};
#endif // _WX_DATAVIEWCTRL_CORE_H_

View File

@ -4,7 +4,7 @@
// Author: Neil Perkins
// Modified by:
// Created: 2010-05-15
// RCS-ID: $Id: mimetype.h 67232 2011-03-18 15:10:15Z DS $
// RCS-ID: $Id: mimetype.h 68563 2011-08-05 19:02:26Z VZ $
// Copyright: (C) 2010 Neil Perkins
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -56,6 +56,7 @@ private:
bool GetMimeTypes(const wxString& uti, wxArrayString& mimeTypes);
bool GetIcon(const wxString& uti, wxIconLocation *iconLoc);
bool GetDescription(const wxString& uti, wxString *desc);
bool GetApplication(const wxString& uti, wxString *command);
// Structure to represent file types
typedef struct FileTypeData
@ -63,6 +64,7 @@ private:
wxArrayString extensions;
wxArrayString mimeTypes;
wxIconLocation iconLoc;
wxString application;
wxString description;
}
FileTypeInfo;
@ -95,9 +97,9 @@ public:
bool GetMimeTypes(wxArrayString& mimeTypes) const ;
bool GetIcon(wxIconLocation *iconLoc) const ;
bool GetDescription(wxString *desc) const ;
bool GetOpenCommand(wxString *openCmd, const wxFileType::MessageParameters& params) const;
// These functions are only stubs on Mac OS X
bool GetOpenCommand(wxString *openCmd, const wxFileType::MessageParameters& params) const;
bool GetPrintCommand(wxString *printCmd, const wxFileType::MessageParameters& params) const;
size_t GetAllCommands(wxArrayString *verbs, wxArrayString *commands, const wxFileType::MessageParameters& params) const;
bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = TRUE);

View File

@ -6,7 +6,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: private.h 67233 2011-03-18 15:45:51Z SC $
// RCS-ID: $Id: private.h 70354 2012-01-15 15:53:56Z SC $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -32,7 +32,7 @@
#define wxOSX_10_6_AND_LATER(x)
#endif
#if !wxUSE_GUI || wxOSX_USE_COCOA_OR_CARBON
#if ( !wxUSE_GUI && !wxOSX_USE_IPHONE ) || wxOSX_USE_COCOA_OR_CARBON
// Carbon functions are currently still used in wxOSX/Cocoa too (including
// wxBase part of it).
@ -47,6 +47,11 @@ WXDLLIMPEXP_BASE wxString wxMacFSRefToPath( const FSRef *fsRef , CFStringRef add
WXDLLIMPEXP_BASE OSStatus wxMacPathToFSRef( const wxString&path , FSRef *fsRef );
WXDLLIMPEXP_BASE wxString wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname );
// keycode utils from app.cpp
WXDLLIMPEXP_BASE CGKeyCode wxCharCodeWXToOSX(wxKeyCode code);
WXDLLIMPEXP_BASE long wxMacTranslateKey(unsigned char key, unsigned char code);
#endif
#if wxUSE_GUI
@ -626,6 +631,9 @@ public :
virtual void GetSelection( long* from, long* to ) const = 0 ;
virtual void WriteText( const wxString& str ) = 0 ;
virtual bool CanClipMaxLength() const { return false; }
virtual void SetMaxLength(unsigned long WXUNUSED(len)) {}
virtual bool GetStyle( long position, wxTextAttr& style);
virtual void SetStyle( long start, long end, const wxTextAttr& style ) ;
virtual void Copy() ;
@ -675,16 +683,18 @@ public :
virtual ~wxComboWidgetImpl() {}
virtual int GetSelectedItem() const { return -1; };
virtual void SetSelectedItem(int WXUNUSED(item)) {};
virtual int GetSelectedItem() const { return -1; }
virtual void SetSelectedItem(int WXUNUSED(item)) {}
virtual int GetNumberOfItems() const { return -1; };
virtual int GetNumberOfItems() const { return -1; }
virtual void InsertItem(int WXUNUSED(pos), const wxString& WXUNUSED(item)) {}
virtual void RemoveItem(int WXUNUSED(pos)) {}
virtual void Clear() {}
virtual void Popup() {}
virtual void Dismiss() {}
virtual wxString GetStringAtIndex(int WXUNUSED(pos)) const { return wxEmptyString; }
@ -856,6 +866,8 @@ public :
virtual void SetModified(bool WXUNUSED(modified)) { }
virtual bool IsModified() const { return false; }
virtual void SetRepresentedFilename(const wxString& WXUNUSED(filename)) { }
#if wxOSX_USE_IPHONE
virtual CGFloat GetWindowLevel() const { return 0.0; }
#else

View File

@ -0,0 +1,71 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/osx/core/private/datetime.h
// Purpose:
// Author: Vadim Zeitlin
// Created: 2011-12-19
// RCS-ID: $Id: datetimectrl.h 70071 2011-12-20 21:27:14Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OSX_CORE_PRIVATE_DATETIMECTRL_H_
#define _WX_OSX_CORE_PRIVATE_DATETIMECTRL_H_
#if wxUSE_DATEPICKCTRL
#include "wx/osx/private.h"
#include "wx/datetime.h"
enum wxDateTimeWidgetKind
{
wxDateTimeWidget_YearMonthDay,
wxDateTimeWidget_HourMinuteSecond
};
// ----------------------------------------------------------------------------
// wxDateTimeWidgetImpl: peer class for wxDateTimePickerCtrl.
// ----------------------------------------------------------------------------
class wxDateTimeWidgetImpl
#if wxOSX_USE_COCOA
: public wxWidgetCocoaImpl
#elif wxOSX_USE_CARBON
: public wxMacControl
#else
#error "Unsupported platform"
#endif
{
public:
static wxDateTimeWidgetImpl*
CreateDateTimePicker(wxDateTimePickerCtrl* wxpeer,
const wxDateTime& dt,
const wxPoint& pos,
const wxSize& size,
long style,
wxDateTimeWidgetKind kind);
virtual void SetDateTime(const wxDateTime& dt) = 0;
virtual wxDateTime GetDateTime() const = 0;
virtual void SetDateRange(const wxDateTime& dt1, const wxDateTime& dt2) = 0;
virtual bool GetDateRange(wxDateTime* dt1, wxDateTime* dt2) = 0;
virtual ~wxDateTimeWidgetImpl() { }
protected:
#if wxOSX_USE_COCOA
wxDateTimeWidgetImpl(wxDateTimePickerCtrl* wxpeer, WXWidget view)
: wxWidgetCocoaImpl(wxpeer, view)
{
}
#elif wxOSX_USE_CARBON
// There is no Carbon implementation of this control yet so we don't need
// any ctor for it yet but it should be added here if Carbon version is
// written later.
#endif
};
#endif // wxUSE_DATEPICKCTRL
#endif // _WX_OSX_CORE_PRIVATE_DATETIMECTRL_H_

View File

@ -2,7 +2,7 @@
// Name: wx/osx/dataview.h
// Purpose: wxDataViewCtrl native implementation header for OSX
// Author:
// Id: $Id: dataview.h 66634 2011-01-07 18:26:58Z VS $
// Id: $Id: dataview.h 70496 2012-02-02 14:19:30Z VZ $
// Copyright: (c) 2009
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -60,12 +60,11 @@ public:
virtual void SetMaxWidth (int maxWidth);
virtual void SetMinWidth (int minWidth);
virtual void SetReorderable(bool reorderable);
virtual void SetResizeable (bool resizeable);
virtual void SetResizeable (bool resizable);
virtual void SetSortable (bool sortable);
virtual void SetSortOrder (bool ascending);
virtual void SetTitle (wxString const& title);
virtual void SetWidth (int width);
virtual void SetAsSortKey (bool sort = true);
// implementation only
wxDataViewColumnNativeData* GetNativeData() const
@ -151,7 +150,7 @@ public:
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxDataViewCtrlNameStr);
virtual wxControl* GetMainWindow() // not used for the native implementation
virtual wxWindow* GetMainWindow() // not used for the native implementation
{
return this;
}
@ -175,8 +174,9 @@ public:
virtual bool IsExpanded(const wxDataViewItem & item) const;
virtual unsigned int GetCount() const;
virtual wxRect GetItemRect(const wxDataViewItem& item, const wxDataViewColumn* columnPtr) const;
virtual wxDataViewItem GetSelection() const;
virtual wxRect GetItemRect(const wxDataViewItem& item,
const wxDataViewColumn* columnPtr = NULL) const;
virtual int GetSelectedItemsCount() const;
virtual int GetSelections(wxDataViewItemArray& sel) const;
virtual void HitTest(const wxPoint& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const;
@ -201,6 +201,8 @@ public:
// finishes editing of custom items; if no custom item is currently edited the method does nothing
void FinishCustomItemEditing();
virtual void EditItem(const wxDataViewItem& item, const wxDataViewColumn *column);
// returns the n-th pointer to a column;
// this method is different from GetColumn(unsigned int pos) because here 'n' is not a position in the control but the n-th
@ -255,6 +257,8 @@ public:
m_Deleting = deleting;
}
virtual wxDataViewColumn *GetCurrentColumn() const;
virtual wxVisualAttributes GetDefaultAttributes() const
{
return GetClassDefaultAttributes(GetWindowVariant());

View File

@ -0,0 +1,55 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/osx/datectrl.h
// Purpose: Declaration of wxOSX-specific wxDatePickerCtrl class.
// Author: Vadim Zeitlin
// Created: 2011-12-18
// RCS-ID: $Id: datectrl.h 70071 2011-12-20 21:27:14Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OSX_DATECTRL_H_
#define _WX_OSX_DATECTRL_H_
// ----------------------------------------------------------------------------
// wxDatePickerCtrl
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxDatePickerCtrl : public wxDatePickerCtrlBase
{
public:
// Constructors.
wxDatePickerCtrl() { }
wxDatePickerCtrl(wxWindow *parent,
wxWindowID id,
const wxDateTime& dt = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxDatePickerCtrlNameStr)
{
Create(parent, id, dt, pos, size, style, validator, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxDateTime& dt = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxDatePickerCtrlNameStr);
// Implement the base class pure virtuals.
virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2);
virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const;
virtual void OSXGenerateEvent(const wxDateTime& dt);
private:
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxDatePickerCtrl);
};
#endif // _WX_OSX_DATECTRL_H_

View File

@ -0,0 +1,34 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/osx/datetimectrl.h
// Purpose: Declaration of wxOSX-specific wxDateTimePickerCtrl class.
// Author: Vadim Zeitlin
// Created: 2011-12-18
// RCS-ID: $Id: datetimectrl.h 70071 2011-12-20 21:27:14Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OSX_DATETIMECTRL_H_
#define _WX_OSX_DATETIMECTRL_H_
class wxDateTimeWidgetImpl;
// ----------------------------------------------------------------------------
// wxDateTimePickerCtrl
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxDateTimePickerCtrl : public wxDateTimePickerCtrlBase
{
public:
// Implement the base class pure virtuals.
virtual void SetValue(const wxDateTime& dt);
virtual wxDateTime GetValue() const;
// Implementation only.
virtual void OSXGenerateEvent(const wxDateTime& dt) = 0;
protected:
wxDateTimeWidgetImpl* GetDateTimePeer() const;
};
#endif // _WX_OSX_DATETIMECTRL_H_

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: dirdlg.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: dirdlg.h 67896 2011-06-09 00:28:28Z SC $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -23,6 +23,10 @@ public:
const wxSize& size = wxDefaultSize,
const wxString& name = wxDirDialogNameStr);
#if wxOSX_USE_COCOA
~wxDirDialog();
#endif
virtual int ShowModal();
#if wxOSX_USE_COCOA
@ -33,6 +37,10 @@ public:
protected:
DECLARE_DYNAMIC_CLASS(wxDirDialog)
#if wxOSX_USE_COCOA
WX_NSObject m_sheetDelegate;
#endif
};
#endif

View File

@ -6,7 +6,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 2006-01-12
// RCS-ID: $Id: evtloop.h 65680 2010-09-30 11:44:45Z VZ $
// RCS-ID: $Id: evtloop.h 67724 2011-05-11 06:46:07Z SC $
// Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -53,9 +53,14 @@ public:
AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags);
#endif // wxUSE_EVENTLOOP_SOURCE
void ObserverCallBack(CFRunLoopObserverRef observer, int activity);
protected:
void CommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity);
void DefaultModeObserverCallBack(CFRunLoopObserverRef observer, int activity);
static void OSXCommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info);
static void OSXDefaultModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info);
// get the currently executing CFRunLoop
virtual CFRunLoopRef CFGetCurrentRunLoop() const;
@ -74,8 +79,11 @@ protected:
// cfrunloop
CFRunLoopRef m_runLoop;
// runloop observer
CFRunLoopObserverRef m_runLoopObserver;
// common modes runloop observer
CFRunLoopObserverRef m_commonModeRunLoopObserver;
// default mode runloop observer
CFRunLoopObserverRef m_defaultModeRunLoopObserver;
private:
// process all already pending events and dispatch a new one (blocking

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: filedlg.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: filedlg.h 67896 2011-06-09 00:28:28Z SC $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -41,6 +41,10 @@ public:
const wxSize& sz = wxDefaultSize,
const wxString& name = wxFileDialogNameStr);
#if wxOSX_USE_COCOA
~wxFileDialog();
#endif
virtual void GetPaths(wxArrayString& paths) const { paths = m_paths; }
virtual void GetFilenames(wxArrayString& files) const { files = m_fileNames ; }
@ -70,6 +74,7 @@ protected:
#if wxOSX_USE_COCOA
virtual wxWindow* CreateFilterPanel(wxWindow *extracontrol);
void DoOnFilterSelected(int index);
virtual void OnFilterSelected(wxCommandEvent &event);
wxArrayString m_filterExtensions;
@ -80,6 +85,7 @@ protected:
int m_firstFileTypeFilter;
wxArrayString m_currentExtensions;
WX_NSObject m_delegate;
WX_NSObject m_sheetDelegate;
#endif
};

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id: font.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: font.h 70445 2012-01-23 11:28:21Z VZ $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -79,6 +79,19 @@ public:
SetPixelSize(pixelSize);
}
wxFont(int pointSize,
wxFontFamily family,
int flags = wxFONTFLAG_DEFAULT,
const wxString& face = wxEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
{
Create(pointSize, family,
GetStyleFromFlags(flags),
GetWeightFromFlags(flags),
GetUnderlinedFromFlags(flags),
face, encoding);
}
bool Create(int size,
wxFontFamily family,
wxFontStyle style,

View File

@ -4,7 +4,7 @@
// Author: Ryan Norton
// Modified by:
// Created: 2004-09-25
// RCS-ID: $Id: fontdlg.h 66615 2011-01-07 05:26:57Z PC $
// RCS-ID: $Id: fontdlg.h 70497 2012-02-02 14:19:34Z VZ $
// Copyright: (c) Ryan Norton
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -35,9 +35,11 @@ class WXDLLIMPEXP_CORE wxFontDialog : public wxDialog
{
public:
wxFontDialog();
wxFontDialog(wxWindow *parent);
wxFontDialog(wxWindow *parent, const wxFontData& data);
virtual ~wxFontDialog();
bool Create(wxWindow *parent);
bool Create(wxWindow *parent, const wxFontData& data);
int ShowModal();

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: frame.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: frame.h 70765 2012-03-01 15:04:42Z JS $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -59,7 +59,6 @@ public:
// event handlers
void OnActivate(wxActivateEvent& event);
void OnSysColourChanged(wxSysColourChangedEvent& event);
void OnSize(wxSizeEvent& event);
// Toolbar
#if wxUSE_TOOLBAR
@ -84,6 +83,8 @@ public:
void PositionBars();
// internal response to size events
virtual void MacOnInternalSize() { PositionBars(); }
protected:
// common part of all ctors

View File

@ -4,7 +4,7 @@
* Author: Stefan Csomor
* Modified by:
* Created: 2008-07-30
* RCS-ID: $Id: chkconf.h 67232 2011-03-18 15:10:15Z DS $
* RCS-ID: $Id: chkconf.h 69818 2011-11-25 14:37:03Z SC $
* Copyright: (c) Stefan Csomor
* Licence: wxWindows licence
*/
@ -66,6 +66,11 @@
#define wxUSE_DATAVIEWCTRL 0
#endif
#if wxUSE_TREELISTCTRL
#undef wxUSE_TREELISTCTRL
#define wxUSE_TREELISTCTRL 0
#endif
#if wxUSE_DRAG_AND_DROP
#undef wxUSE_DRAG_AND_DROP
#define wxUSE_DRAG_AND_DROP 0
@ -348,6 +353,16 @@
#define wxUSE_RICHTEXT 0
#endif
#if wxUSE_TIMEPICKCTRL
#undef wxUSE_TIMEPICKCTRL
#define wxUSE_TIMEPICKCTRL 0
#endif
#if wxUSE_RICHTOOLTIP
#undef wxUSE_RICHTOOLTIP
#define wxUSE_RICHTOOLTIP 0
#endif
#endif
/* _WX_OSX_IPHONE_CHKCONF_H_ */

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: joystick.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: joystick.h 70165 2011-12-29 14:42:13Z SN $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -22,7 +22,7 @@ class WXDLLIMPEXP_ADV wxJoystick: public wxObject
* Public interface
*/
wxJoystick(int joystick = wxJOYSTICK1) { m_joystick = joystick; };
wxJoystick(int joystick = wxJOYSTICK1) { m_joystick = joystick; }
// Attributes
////////////////////////////////////////////////////////////////////////////

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: listctrl.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: listctrl.h 70290 2012-01-08 00:55:22Z VZ $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -23,7 +23,7 @@ class wxListCtrlRenameTimer;
WX_DECLARE_EXPORTED_LIST(wxListItem, wxColumnList);
class WXDLLIMPEXP_CORE wxListCtrl: public wxControl
class WXDLLIMPEXP_CORE wxListCtrl: public wxListCtrlBase
{
DECLARE_DYNAMIC_CLASS(wxListCtrl)
public:
@ -63,8 +63,7 @@ class WXDLLIMPEXP_CORE wxListCtrl: public wxControl
bool GetColumn(int col, wxListItem& item) const;
// Sets information about this column
// TODO: NOT const to be compatible with wxGenericListCtrl API
bool SetColumn(int col, wxListItem& item) ;
bool SetColumn(int col, const wxListItem& item) ;
// Gets the column width
int GetColumnWidth(int col) const;
@ -160,11 +159,6 @@ class WXDLLIMPEXP_CORE wxListCtrl: public wxControl
// list or report view
long GetTopItem() const ;
// are we in report mode?
bool InReportView() const { return HasFlag(wxLC_REPORT); }
bool IsVirtual() const { return HasFlag(wxLC_VIRTUAL); }
// Add or remove a single window style
void SetSingleStyle(long style, bool add = true) ;
@ -257,12 +251,6 @@ class WXDLLIMPEXP_CORE wxListCtrl: public wxControl
// Insert an image/string item
long InsertItem(long index, const wxString& label, int imageIndex);
// For list view mode (only), inserts a column.
long InsertColumn(long col, wxListItem& info);
long InsertColumn(long col, const wxString& heading, int format = wxLIST_FORMAT_LEFT,
int width = -1);
// Scrolls the list control. If in icon, small icon or report view mode,
// x specifies the number of pixels to scroll. If in list view mode, x
// specifies the number of columns to scroll.
@ -314,10 +302,10 @@ class WXDLLIMPEXP_CORE wxListCtrl: public wxControl
bool Update(long item);
*/
void Command(wxCommandEvent& event) { ProcessCommand(event); };
void Command(wxCommandEvent& event) { ProcessCommand(event); }
wxListCtrlCompare GetCompareFunc() { return m_compareFunc; };
wxIntPtr GetCompareFuncData() { return m_compareFuncData; };
wxListCtrlCompare GetCompareFunc() { return m_compareFunc; }
wxIntPtr GetCompareFuncData() { return m_compareFuncData; }
// public overrides needed for pimpl approach
@ -376,14 +364,14 @@ class WXDLLIMPEXP_CORE wxListCtrl: public wxControl
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
protected:
// Implement base class pure virtual methods.
long DoInsertColumn(long col, const wxListItem& info);
// protected overrides needed for pimpl approach
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual wxSize DoGetBestSize() const;
long m_current;
wxListCtrlTextCtrlWrapper *m_textctrlWrapper;
wxListCtrlRenameTimer *m_renameTimer;

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: menu.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: menu.h 70350 2012-01-15 13:41:17Z VZ $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -83,6 +83,10 @@ private:
// terminate the current radio group, if any
void EndRadioGroup();
// Common part of HandleMenu{Opened,Closed}().
void DoHandleMenuOpenedOrClosed(wxEventType evtType);
// if TRUE, insert a breal before appending the next item
bool m_doBreak;
@ -127,6 +131,7 @@ public:
virtual wxMenu *Remove(size_t pos);
virtual void EnableTop( size_t pos, bool flag );
virtual bool IsEnabledTop(size_t pos) const;
virtual void SetMenuLabel( size_t pos, const wxString& label );
virtual wxString GetMenuLabel( size_t pos ) const;
virtual bool Enable( bool enable = true );

View File

@ -6,7 +6,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: metafile.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: metafile.h 70710 2012-02-27 15:37:24Z SC $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -56,13 +56,6 @@ public:
// Implementation
WXHMETAFILE GetHMETAFILE() const ;
void SetHMETAFILE(WXHMETAFILE mf) ;
#if wxOSX_USE_COCOA_OR_CARBON && !defined( __LP64__ )
// Since the native metafile format is PDF for Quartz
// we need a call that allows setting PICT content for
// backwards compatibility
void SetPICT(void* pictHandle) ;
#endif
protected:
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
@ -145,7 +138,7 @@ class WXDLLIMPEXP_CORE wxMetafileDataObject : public wxDataObjectSimple
public:
// ctors
wxMetafileDataObject()
: wxDataObjectSimple(wxDF_METAFILE) { };
: wxDataObjectSimple(wxDF_METAFILE) { }
wxMetafileDataObject(const wxMetafile& metafile)
: wxDataObjectSimple(wxDF_METAFILE), m_metafile(metafile) { }

View File

@ -5,7 +5,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: msgdlg.h 65680 2010-09-30 11:44:45Z VZ $
// RCS-ID: $Id: msgdlg.h 68537 2011-08-04 22:53:42Z VZ $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -22,6 +22,10 @@ public:
long style = wxOK|wxCENTRE,
const wxPoint& pos = wxDefaultPosition);
#if wxOSX_USE_COCOA
~wxMessageDialog();
#endif
virtual int ShowModal();
#if wxOSX_USE_COCOA
@ -39,9 +43,12 @@ protected:
void* ConstructNSAlert();
#endif
int m_buttonId[3];
int m_buttonId[4];
int m_buttonCount;
#if wxOSX_USE_COCOA
WX_NSObject m_sheetDelegate;
#endif
DECLARE_DYNAMIC_CLASS(wxMessageDialog)
};

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 2008-03-24
// RCS-ID: $Id: nonownedwnd.h 67232 2011-03-18 15:10:15Z DS $
// RCS-ID: $Id: nonownedwnd.h 70488 2012-01-31 17:39:39Z SC $
// Copyright: (c) 2008 Stefan Csomor
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -14,6 +14,8 @@
#include "wx/window.h"
#include "wx/graphics.h"
#if wxUSE_SYSTEM_OPTIONS
#define wxMAC_WINDOW_PLAIN_TRANSITION wxT("mac.window-plain-transition")
#endif
@ -30,7 +32,7 @@
class wxNonOwnedWindowImpl;
class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxWindow
class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxNonOwnedWindowBase
{
public:
// constructors and such
@ -79,8 +81,11 @@ public:
// implementation from now on
// --------------------------
virtual bool DoSetShape(const wxRegion& region);
// These accessors are Mac-specific and don't exist in other ports.
const wxRegion& GetShape() const { return m_shape; }
#if wxUSE_GRAPHICS_CONTEXT
const wxGraphicsPath& GetShapePath() { return m_shapePath; }
#endif // wxUSE_GRAPHICS_CONTEXT
// activation hooks only necessary for MDI Implementation
static void MacDelayedDeactivation(long timestamp);
@ -109,6 +114,8 @@ public:
virtual void HandleResized( double timestampsec );
virtual void HandleMoved( double timestampsec );
virtual void HandleResizing( double timestampsec, wxRect* rect );
void WindowWasPainted();
virtual bool Destroy();
@ -125,6 +132,12 @@ protected:
wxShowEffect effect,
unsigned timeout);
virtual bool DoClearShape();
virtual bool DoSetRegionShape(const wxRegion& region);
#if wxUSE_GRAPHICS_CONTEXT
virtual bool DoSetPathShape(const wxGraphicsPath& path);
#endif // wxUSE_GRAPHICS_CONTEXT
virtual void WillBeDestroyed();
wxNonOwnedWindowImpl* m_nowpeer ;
@ -134,7 +147,12 @@ protected:
static wxNonOwnedWindow *s_macDeactivateWindow;
private :
static clock_t s_lastFlush;
wxRegion m_shape;
#if wxUSE_GRAPHICS_CONTEXT
wxGraphicsPath m_shapePath;
#endif // wxUSE_GRAPHICS_CONTEXT
};
// list of all frames and modeless dialogs

View File

@ -3,7 +3,7 @@
// Purpose: MSW/GTK compatible notebook (a.k.a. property sheet)
// Author: Stefan Csomor
// Modified by:
// RCS-ID: $Id: notebook.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: notebook.h 68810 2011-08-21 14:08:49Z VZ $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -95,7 +95,7 @@ public:
wxNotebookPage *pPage,
const wxString& strText,
bool bSelect = false,
int imageId = -1);
int imageId = NO_IMAGE);
// callbacks
// ---------

View File

@ -4,7 +4,7 @@
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id: pnghand.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: pnghand.h 70165 2011-12-29 14:42:13Z SN $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -25,7 +25,7 @@ public:
SetName(wxT("PNG bitmap file"));
SetExtension(wxT("bmp"));
SetType(wxBITMAP_TYPE_PNG);
};
}
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
int desiredWidth, int desiredHeight);

View File

@ -61,10 +61,10 @@ public:
bool ReadFile( char* ImageFileName=0 );
bool SaveFile( char* ImageFileName=0 );
bool SaveXPM(char *filename, char *name = 0);
int GetWidth( void ) const { return Width; };
int GetHeight( void ) const { return Height; };
int GetDepth( void ) const { return Depth; };
int GetColorType( void ) const { return ColorType; };
int GetWidth( void ) const { return Width; }
int GetHeight( void ) const { return Height; }
int GetDepth( void ) const { return Depth; }
int GetColorType( void ) const { return ColorType; }
int GetIndex(int x, int y);
bool GetRGB(int x, int y, byte* r, byte* g, byte* b);

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created:
// RCS-ID: $Id: popupwin.h 65680 2010-09-30 11:44:45Z VZ $
// RCS-ID: $Id: popupwin.h 70848 2012-03-09 05:50:58Z PC $
// Copyright: (c) 2006 Stefan Csomor
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -27,9 +27,8 @@ public:
bool Create(wxWindow *parent, int flags = wxBORDER_NONE);
virtual bool Show(bool show);
virtual bool Show(bool show = true);
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxPopupWindow)
};

View File

@ -6,7 +6,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: printdlg.h 64943 2010-07-13 13:29:58Z VZ $
// RCS-ID: $Id: printdlg.h 70636 2012-02-20 21:55:55Z VZ $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -58,16 +58,16 @@ private:
class WXDLLIMPEXP_CORE wxMacPageSetupDialog: public wxPageSetupDialogBase
{
public:
wxMacPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL);
wxMacPageSetupDialog(wxWindow *parent, wxPageSetupDialogData *data = NULL);
virtual ~wxMacPageSetupDialog();
virtual wxPageSetupData& GetPageSetupDialogData();
virtual wxPageSetupDialogData& GetPageSetupDialogData();
bool Create(wxWindow *parent, wxPageSetupData *data = NULL);
bool Create(wxWindow *parent, wxPageSetupDialogData *data = NULL);
virtual int ShowModal();
private:
wxPageSetupData m_pageSetupData;
wxPageSetupDialogData m_pageSetupData;
wxWindow* m_dialogParent;
private:
@ -85,14 +85,14 @@ class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
class WXDLLIMPEXP_CORE wxMacPageMarginsDialog : public wxDialog
{
public:
wxMacPageMarginsDialog(wxFrame* parent, wxPageSetupData* data);
wxMacPageMarginsDialog(wxFrame* parent, wxPageSetupDialogData* data);
bool TransferToWindow();
bool TransferDataFromWindow();
virtual wxPageSetupData& GetPageSetupDialogData() { return *m_pageSetupDialogData; }
virtual wxPageSetupDialogData& GetPageSetupDialogData() { return *m_pageSetupDialogData; }
private:
wxPageSetupData* m_pageSetupDialogData;
wxPageSetupDialogData* m_pageSetupDialogData;
wxPoint m_MinMarginTopLeft;
wxPoint m_MinMarginBottomRight;

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: radiobox.h 64943 2010-07-13 13:29:58Z VZ $
// RCS-ID: $Id: radiobox.h 69544 2011-10-26 05:39:18Z RD $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -89,6 +89,9 @@ public:
void OnRadioButton( wxCommandEvent& event ) ;
protected:
// resolve ambiguity in base classes
virtual wxBorder GetDefaultBorder() const { return wxRadioBoxBase::GetDefaultBorder(); }
wxRadioButton *m_radioButtonCycle;
unsigned int m_noItems;

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by: Stefan Csomor
// Created: 1998-01-01
// RCS-ID: $Id: setup0.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: setup0.h 70395 2012-01-19 08:55:41Z SC $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -202,15 +202,6 @@
// Recommended setting: 0 (this is still work in progress...)
#define wxUSE_EXTENDED_RTTI 0
// Set wxUSE_STL to 1 to derive wxList(Foo) and wxArray(Foo) from
// std::list<Foo*> and std::vector<Foo*>, with a compatibility interface,
// and for wxHashMap to be implemented with templates.
//
// Default is 0
//
// Recommended setting: YMMV
#define wxUSE_STL 0
// Support for message/error logging. This includes wxLogXXX() functions and
// wxLog and derived classes. Don't set this to 0 unless you really know what
// you are doing.
@ -262,44 +253,6 @@
// Recommended setting: 1 as setting it to 0 disables many other things
#define wxUSE_STREAMS 1
// This is not a real option but is used as the default value for
// wxUSE_STD_IOSTREAM and wxUSE_STD_STRING.
//
// Currently the Digital Mars and Watcom compilers come without standard C++
// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have
// them (e.g. from STLPort).
//
// VC++ 5.0 does include standard C++ library headers, however they produce
// many warnings that can't be turned off when compiled at warning level 4.
#if defined(__DMC__) || defined(__WATCOMC__) \
|| (defined(_MSC_VER) && _MSC_VER < 1200)
#define wxUSE_STD_DEFAULT 0
#else
#define wxUSE_STD_DEFAULT 1
#endif
// Use standard C++ streams if 1 instead of wx streams in some places. If
// disabled (default), wx streams are used everywhere and wxWidgets doesn't
// depend on the standard streams library.
//
// Notice that enabling this does not replace wx streams with std streams
// everywhere, in a lot of places wx streams are used no matter what.
//
// Default is 0
//
// Recommended setting: 1 if you use the standard streams anyhow and so
// dependency on the standard streams library is not a
// problem
#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT
// Enable conversion to standard C++ string if 1.
//
// Default is 1 for most compilers.
//
// Recommended setting: 1 unless you want to ensure your program doesn't use
// the standard C++ library at all.
#define wxUSE_STD_STRING wxUSE_STD_DEFAULT
// Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf.
// Note that if the system's implementation does not support positional
// parameters, setting this to 1 forces the use of the wxWidgets implementation
@ -315,6 +268,107 @@
// Recommended setting: 1 if you want to support multiple languages
#define wxUSE_PRINTF_POS_PARAMS 1
// ----------------------------------------------------------------------------
// Interoperability with the standard library.
// ----------------------------------------------------------------------------
// Set wxUSE_STL to 1 to enable maximal interoperability with the standard
// library, even at the cost of backwards compatibility.
//
// Default is 0
//
// Recommended setting: 0 as the options below already provide a relatively
// good level of interoperability and changing this option arguably isn't worth
// diverging from the official builds of the library.
#define wxUSE_STL 0
// This is not a real option but is used as the default value for
// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS.
//
// Currently the Digital Mars and Watcom compilers come without standard C++
// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have
// them (e.g. from STLPort).
//
// VC++ 5.0 does include standard C++ library headers, however they produce
// many warnings that can't be turned off when compiled at warning level 4.
#if defined(__DMC__) || defined(__WATCOMC__) \
|| (defined(_MSC_VER) && _MSC_VER < 1200)
#define wxUSE_STD_DEFAULT 0
#else
#define wxUSE_STD_DEFAULT 1
#endif
// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<>
// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but
// usually more limited) implementations are used which allows to avoid the
// dependency on the C++ run-time library.
//
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
// support using standard containers and that VC6 needs non-default options for
// such build to avoid getting "fatal error C1076: compiler limit : internal
// heap limit reached; use /Zm to specify a higher limit" in its own standard
// headers, so you need to ensure you do increase the heap size before enabling
// this option for this compiler.
//
// Default is 0 for compatibility reasons.
//
// Recommended setting: 1 unless compatibility with the official wxWidgets
// build and/or the existing code is a concern.
#define wxUSE_STD_CONTAINERS 0
// Use standard C++ streams if 1 instead of wx streams in some places. If
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
// standard streams library.
//
// Notice that enabling this does not replace wx streams with std streams
// everywhere, in a lot of places wx streams are used no matter what.
//
// Default is 1 if compiler supports it.
//
// Recommended setting: 1 if you use the standard streams anyhow and so
// dependency on the standard streams library is not a
// problem
#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT
// Enable minimal interoperability with the standard C++ string class if 1.
// "Minimal" means that wxString can be constructed from std::string or
// std::wstring but can't be implicitly converted to them. You need to enable
// the option below for the latter.
//
// Default is 1 for most compilers.
//
// Recommended setting: 1 unless you want to ensure your program doesn't use
// the standard C++ library at all.
#define wxUSE_STD_STRING wxUSE_STD_DEFAULT
// Make wxString as much interchangeable with std::[w]string as possible, in
// particular allow implicit conversion of wxString to either of these classes.
// This comes at a price (or a benefit, depending on your point of view) of not
// allowing implicit conversion to "const char *" and "const wchar_t *".
//
// Because a lot of existing code relies on these conversions, this option is
// disabled by default but can be enabled for your build if you don't care
// about compatibility.
//
// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled.
//
// Recommended setting: 0 to remain compatible with the official builds of
// wxWidgets.
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
//
// Note that newer compilers (including VC++ 7.1 and later) don't support
// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow.
//
// Default is 0.
//
// Recommended setting: 0, only set to 1 if you use a really old compiler
#define wxUSE_IOSTREAMH 0
// ----------------------------------------------------------------------------
// non GUI features selection
// ----------------------------------------------------------------------------
@ -652,6 +706,34 @@
// Recommended setting: 1
#define wxUSE_STC 1
// Use wxWidget's web viewing classes
//
// Default is 1
//
// Recommended setting: 1
#define wxUSE_WEBVIEW 1
// Use the IE wxWebView backend
//
// Default is 1 on MSW
//
// Recommended setting: 1
#ifdef __WXMSW__
#define wxUSE_WEBVIEW_IE 1
#else
#define wxUSE_WEBVIEW_IE 0
#endif
// Use the WebKit wxWebView backend
//
// Default is 1 on GTK and OSX
//
// Recommended setting: 1
#if defined(__WXGTK__) || defined(__WXOSX__)
#define wxUSE_WEBVIEW_WEBKIT 1
#else
#define wxUSE_WEBVIEW_WEBKIT 0
#endif
// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced
// 2D drawing API. (Still somewhat experimental)
@ -750,6 +832,7 @@
//
// Recommended setting: 1
#define wxUSE_ANIMATIONCTRL 1 // wxAnimationCtrl
#define wxUSE_BANNERWINDOW 1 // wxBannerWindow
#define wxUSE_BUTTON 1 // wxButton
#define wxUSE_BMPBUTTON 1 // wxBitmapButton
#define wxUSE_CALENDARCTRL 1 // wxCalendarCtrl
@ -785,8 +868,10 @@
#define wxUSE_STATTEXT 1 // wxStaticText
#define wxUSE_STATBMP 1 // wxStaticBitmap
#define wxUSE_TEXTCTRL 1 // wxTextCtrl
#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl
#define wxUSE_TOGGLEBTN 1 // requires wxButton
#define wxUSE_TREECTRL 1 // wxTreeCtrl
#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl
// Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR
// below either wxStatusBar95 or a generic wxStatusBar will be used.
@ -1003,6 +1088,14 @@
// Recommended setting: 1
#define wxUSE_NOTIFICATION_MESSAGE 1
// wxRichToolTip is a customizable tooltip class which has more functionality
// than the stock (but native, unlike this class) wxToolTip.
//
// Default is 1.
//
// Recommended setting: 1 (but can be safely set to 0 if you don't need it)
#define wxUSE_RICHTOOLTIP 1
// Use wxSashWindow class.
//
// Default is 1.
@ -1308,28 +1401,15 @@
// to create files in SVG (Scalable Vector Graphics) format.
#define wxUSE_SVG 1
// ----------------------------------------------------------------------------
// other compiler (mis)features
// ----------------------------------------------------------------------------
// Set this to 0 if your compiler can't cope with omission of prototype
// parameters.
// Should wxDC provide SetTransformMatrix() and related methods?
//
// Default is 1.
// Default is 1 but can be set to 0 if this functionality is not used. Notice
// that currently only wxMSW supports this so setting this to 0 doesn't change
// much for non-MSW platforms (although it will still save a few bytes
// probably).
//
// Recommended setting: 1 (should never need to set this to 0)
#define REMOVE_UNUSED_ARG 1
// VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix
// them. Set this option to 1 to use <iostream.h>, 0 to use <iostream>.
//
// Note that newer compilers (including VC++ 7.1 and later) don't support
// wxUSE_IOSTREAMH == 1 and so <iostream> will be used anyhow.
//
// Default is 0.
//
// Recommended setting: 0, only set to 1 if you use a really old compiler
#define wxUSE_IOSTREAMH 0
// Recommended setting: 1.
#define wxUSE_DC_TRANSFORM_MATRIX 1
// ----------------------------------------------------------------------------
// image format support
@ -1397,6 +1477,26 @@
/* --- end common options --- */
// ----------------------------------------------------------------------------
// Unix-specific options settings
// ----------------------------------------------------------------------------
// use wxSelectDispatcher class
#define wxUSE_SELECT_DISPATCHER 1
// use wxEpollDispatcher class (Linux only)
#define wxUSE_EPOLL_DISPATCHER 0
/*
Use GStreamer for Unix.
Default is 0 as this requires a lot of dependencies which might not be
available.
Recommended setting: 1 (wxMediaCtrl won't work by default without it).
*/
#define wxUSE_GSTREAMER 0
// ----------------------------------------------------------------------------
// Mac-specific settings
// ----------------------------------------------------------------------------

View File

@ -5,7 +5,7 @@
// Author: Ryan Norton, Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: sound.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: sound.h 69178 2011-09-21 15:08:02Z VZ $
// Copyright: (c) Ryan Norton, Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -49,13 +49,13 @@ class WXDLLIMPEXP_ADV wxSound : public wxSoundBase
public:
wxSound();
wxSound(const wxString& fileName, bool isResource = false);
wxSound(int size, const wxByte* data);
wxSound(size_t size, const void* data);
virtual ~wxSound();
// Create from resource or file
bool Create(const wxString& fileName, bool isResource = false);
// Create from data
bool Create(int size, const wxByte* data);
bool Create(size_t size, const void* data);
bool IsOk() const { return m_data != NULL; }

View File

@ -4,7 +4,7 @@
// Author: Vadim Zeitlin
// Modified by:
// Created: 28.10.99
// RCS-ID: $Id: spinctrl.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: spinctrl.h 68366 2011-07-24 22:19:33Z VZ $
// Copyright: (c) Vadim Zeitlin
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -33,7 +33,7 @@ class WXDLLIMPEXP_FWD_CORE wxSpinCtrlButton;
// wxSpinCtrl is a combination of wxTextCtrl and wxSpinButton
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxSpinCtrl : public wxControl
class WXDLLIMPEXP_CORE wxSpinCtrl : public wxNavigationEnabled<wxControl>
{
public:
wxSpinCtrl() { Init(); }
@ -93,8 +93,6 @@ public:
// number is out of range
bool GetTextValue(int *val) const;
WX_DECLARE_CONTROL_CONTAINER();
protected:
// override the base class virtuals involved into geometry calculations
virtual wxSize DoGetBestSize() const;
@ -113,7 +111,6 @@ private:
int m_oldValue;
private:
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxSpinCtrl)
};

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: statbox.h 67254 2011-03-20 00:14:35Z DS $
// RCS-ID: $Id: statbox.h 70165 2011-12-29 14:42:13Z SN $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -38,8 +38,8 @@ class WXDLLIMPEXP_CORE wxStaticBox: public wxControl
long style = 0,
const wxString& name = wxStaticBoxNameStr);
virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
virtual void Command(wxCommandEvent& WXUNUSED(event)) {}
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {}
virtual void GetBordersForSizer(int *borderTop, int *borderOther) const;

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: textctrl.h 66770 2011-01-26 15:51:39Z SC $
// RCS-ID: $Id: textctrl.h 70355 2012-01-15 15:54:53Z SC $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -75,10 +75,6 @@ public:
virtual void MarkDirty();
virtual void DiscardEdits();
// set the max number of characters which may be entered
// in a single line text control
virtual void SetMaxLength(unsigned long len);
// set the grayed out hint text
virtual bool SetHint(const wxString& hint);
virtual wxString GetHint() const;

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by: Kevin Ollivier
// Created: 1998-01-01
// RCS-ID: $Id: textentry.h 67232 2011-03-18 15:10:15Z DS $
// RCS-ID: $Id: textentry.h 67526 2011-04-17 23:14:15Z VZ $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -32,12 +32,8 @@ class WXDLLIMPEXP_CORE wxTextEntry: public wxTextEntryBase
{
public:
wxTextEntry()
: m_editable(true),
m_maxLength(0)
{ }
virtual ~wxTextEntry() {};
wxTextEntry();
virtual ~wxTextEntry();
virtual bool IsEditable() const;
@ -88,10 +84,18 @@ public:
// --------------
virtual wxTextWidgetImpl * GetTextPeer() const;
wxTextCompleter *OSXGetCompleter() const { return m_completer; }
protected:
virtual wxString DoGetValue() const;
virtual bool DoAutoCompleteStrings(const wxArrayString& choices);
virtual bool DoAutoCompleteCustom(wxTextCompleter *completer);
// The object providing auto-completions or NULL if none.
wxTextCompleter *m_completer;
bool m_editable;
// need to make this public because of the current implementation via callbacks

View File

@ -5,7 +5,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 08.02.01
// RCS-ID: $Id: tglbtn.h 66992 2011-02-22 13:25:30Z VZ $
// RCS-ID: $Id: tglbtn.h 67949 2011-06-16 00:43:22Z RD $
// Copyright: (c) 2004 Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -13,53 +13,6 @@
#ifndef _WX_TOGGLEBUTTON_H_
#define _WX_TOGGLEBUTTON_H_
class WXDLLIMPEXP_CORE wxBitmapToggleButton : public wxToggleButtonBase
{
public:
wxBitmapToggleButton() {}
wxBitmapToggleButton(wxWindow *parent,
wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
virtual void SetValue(bool value);
virtual bool GetValue() const ;
virtual bool OSXHandleClicked( double timestampsec );
virtual void Command(wxCommandEvent& event);
private:
wxBitmap m_bitmap;
int m_marginX,
m_marginY;
protected:
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
virtual wxSize DoGetBestSize() const;
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapToggleButton)
};
class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase
{
public:
@ -94,11 +47,40 @@ public:
protected:
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
virtual wxSize DoGetBestSize() const;
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton)
};
class WXDLLIMPEXP_CORE wxBitmapToggleButton : public wxToggleButton
{
public:
wxBitmapToggleButton() {}
wxBitmapToggleButton(wxWindow *parent,
wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxBitmap& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapToggleButton)
};
#endif // _WX_TOGGLEBUTTON_H_

View File

@ -0,0 +1,51 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/osx/timectrl.h
// Purpose: Declaration of wxOSX-specific wxTimePickerCtrl class.
// Author: Vadim Zeitlin
// Created: 2011-12-18
// RCS-ID: $Id: timectrl.h 70071 2011-12-20 21:27:14Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OSX_TIMECTRL_H_
#define _WX_OSX_TIMECTRL_H_
// ----------------------------------------------------------------------------
// wxTimePickerCtrl
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxTimePickerCtrl : public wxTimePickerCtrlBase
{
public:
// Constructors.
wxTimePickerCtrl() { }
wxTimePickerCtrl(wxWindow *parent,
wxWindowID id,
const wxDateTime& dt = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTP_DEFAULT,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTimePickerCtrlNameStr)
{
Create(parent, id, dt, pos, size, style, validator, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxDateTime& dt = wxDefaultDateTime,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTP_DEFAULT,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTimePickerCtrlNameStr);
virtual void OSXGenerateEvent(const wxDateTime& dt);
private:
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTimePickerCtrl);
};
#endif // _WX_OSX_TIMECTRL_H_

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: toolbar.h 66993 2011-02-22 13:25:38Z VZ $
// RCS-ID: $Id: toolbar.h 70854 2012-03-10 00:01:09Z RD $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -77,6 +77,18 @@ class WXDLLIMPEXP_CORE wxToolBar: public wxToolBarBase
bool MacWantsNativeToolbar();
bool MacTopLevelHasNativeToolbar(bool *ownToolbarInstalled) const;
#endif
virtual wxToolBarToolBase *CreateTool(int id,
const wxString& label,
const wxBitmap& bmpNormal,
const wxBitmap& bmpDisabled = wxNullBitmap,
wxItemKind kind = wxITEM_NORMAL,
wxObject *clientData = NULL,
const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString);
virtual wxToolBarToolBase *CreateTool(wxControl *control,
const wxString& label);
protected:
// common part of all ctors
void Init();
@ -86,8 +98,11 @@ protected:
void DoSetSize(int x, int y, int width, int height, int sizeFlags);
#ifndef __WXOSX_IPHONE__
virtual void DoGetSize(int *width, int *height) const;
virtual void DoGetSize(int *width, int *height) const;
virtual wxSize DoGetBestSize() const;
#endif
#ifdef __WXOSX_COCOA__
virtual void DoGetPosition(int*x, int *y) const;
#endif
virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
@ -96,17 +111,6 @@ protected:
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,
const wxBitmap& bmpDisabled,
wxItemKind kind,
wxObject *clientData,
const wxString& shortHelp,
const wxString& longHelp);
virtual wxToolBarToolBase *CreateTool(wxControl *control,
const wxString& label);
DECLARE_EVENT_TABLE()
#if wxOSX_USE_NATIVE_TOOLBAR
bool m_macUsesNativeToolbar ;

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 20.09.01
// RCS-ID: $Id: toplevel.h 65680 2010-09-30 11:44:45Z VZ $
// RCS-ID: $Id: toplevel.h 70295 2012-01-08 14:52:47Z VZ $
// Copyright: (c) 2001 Stefan Csomor
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
@ -51,9 +51,6 @@ public:
virtual wxPoint GetClientAreaOrigin() const;
virtual bool SetShape(const wxRegion& region)
{ return DoSetShape(region); }
// Attracts the users attention to this window if the application is
// inactive (should be called when a background event occurs)
virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
@ -80,6 +77,8 @@ public:
virtual void OSXSetModified(bool modified);
virtual bool OSXIsModified() const;
virtual void SetRepresentedFilename(const wxString& filename);
protected:
// common part of all ctors
void Init();

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: treectrl.h 64943 2010-07-13 13:29:58Z VZ $
// RCS-ID: $Id: treectrl.h 70165 2011-12-29 14:42:13Z SN $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -225,7 +225,7 @@ public:
bool SortChildren(long item);
bool EnsureVisible(long item);
void Command(wxCommandEvent& event) { ProcessCommand(event); };
void Command(wxCommandEvent& event) { ProcessCommand(event); }
protected:
wxTextCtrl* m_textCtrl;

View File

@ -0,0 +1,163 @@
/////////////////////////////////////////////////////////////////////////////
// Name: include/wx/osx/webkit.h
// Purpose: wxWebViewWebKit - embeddable web kit control,
// OS X implementation of web view component
// Author: Jethro Grassie / Kevin Ollivier / Marianne Gagnon
// Modified by:
// Created: 2004-4-16
// RCS-ID: $Id: webview_webkit.h 69074 2011-09-12 18:35:39Z SJL $
// Copyright: (c) Jethro Grassie / Kevin Ollivier / Marianne Gagnon
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_WEBKIT_H
#define _WX_WEBKIT_H
#include "wx/setup.h"
#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \
|| defined(__WXOSX_CARBON__))
#include "wx/control.h"
#include "wx/webview.h"
// ----------------------------------------------------------------------------
// Web Kit Control
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_WEBVIEW wxWebViewWebKit : public wxWebView
{
public:
wxDECLARE_DYNAMIC_CLASS(wxWebViewWebKit);
wxWebViewWebKit() {}
wxWebViewWebKit(wxWindow *parent,
wxWindowID winID = wxID_ANY,
const wxString& strURL = wxWebViewDefaultURLStr,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxWebViewNameStr)
{
Create(parent, winID, strURL, pos, size, style, name);
}
bool Create(wxWindow *parent,
wxWindowID winID = wxID_ANY,
const wxString& strURL = wxWebViewDefaultURLStr,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxWebViewNameStr);
virtual ~wxWebViewWebKit();
virtual bool CanGoBack() const;
virtual bool CanGoForward() const;
virtual void GoBack();
virtual void GoForward();
virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT);
virtual void Stop();
virtual wxString GetPageSource() const;
virtual wxString GetPageText() const;
//We do not want to hide the other overloads
using wxWebView::SetPage;
virtual void SetPage(const wxString& html, const wxString& baseUrl);
virtual void Print();
virtual void LoadURL(const wxString& url);
virtual wxString GetCurrentURL() const;
virtual wxString GetCurrentTitle() const;
virtual wxWebViewZoom GetZoom() const;
virtual void SetZoom(wxWebViewZoom zoom);
virtual void SetZoomType(wxWebViewZoomType zoomType);
virtual wxWebViewZoomType GetZoomType() const;
virtual bool CanSetZoomType(wxWebViewZoomType type) const;
virtual bool IsBusy() const { return m_busy; }
//History functions
virtual void ClearHistory();
virtual void EnableHistory(bool enable = true);
virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetBackwardHistory();
virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetForwardHistory();
virtual void LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item);
//Undo / redo functionality
virtual bool CanUndo() const;
virtual bool CanRedo() const;
virtual void Undo();
virtual void Redo();
//Clipboard functions
virtual bool CanCut() const { return true; }
virtual bool CanCopy() const { return true; }
virtual bool CanPaste() const { return true; }
virtual void Cut();
virtual void Copy();
virtual void Paste();
//Editing functions
virtual void SetEditable(bool enable = true);
virtual bool IsEditable() const;
//Selection
virtual void DeleteSelection();
virtual bool HasSelection() const;
virtual void SelectAll();
virtual wxString GetSelectedText() const;
virtual wxString GetSelectedSource() const;
virtual void ClearSelection();
void RunScript(const wxString& javascript);
//Virtual Filesystem Support
virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler);
// ---- methods not from the parent (common) interface
bool CanGetPageSource() const;
void SetScrollPos(int pos);
int GetScrollPos();
bool CanIncreaseTextSize() const;
void IncreaseTextSize();
bool CanDecreaseTextSize() const;
void DecreaseTextSize();
float GetWebkitZoom() const;
void SetWebkitZoom(float zoom);
// don't hide base class virtuals
virtual void SetScrollPos( int orient, int pos, bool refresh = true )
{ return wxControl::SetScrollPos(orient, pos, refresh); }
virtual int GetScrollPos( int orient ) const
{ return wxControl::GetScrollPos(orient); }
//we need to resize the webview when the control size changes
void OnSize(wxSizeEvent &event);
void OnMove(wxMoveEvent &event);
void OnMouseEvents(wxMouseEvent &event);
bool m_busy;
protected:
DECLARE_EVENT_TABLE()
void MacVisibilityChanged();
private:
wxWindow *m_parent;
wxWindowID m_windowID;
wxString m_pageTitle;
struct objc_object *m_webView;
// we may use this later to setup our own mouse events,
// so leave it in for now.
void* m_webKitCtrlEventHandler;
//It should be WebView*, but WebView is an Objective-C class
//TODO: look into using DECLARE_WXCOCOA_OBJC_CLASS rather than this.
};
#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT
#endif // _WX_WEBKIT_H_

View File

@ -0,0 +1,35 @@
/////////////////////////////////////////////////////////////////////////////
// Name: include/wx/osx/webviewhistoryitem.h
// Purpose: wxWebViewHistoryItem header for OSX
// Author: Steven Lamerton
// Id: $Id: webviewhistoryitem_webkit.h 69074 2011-09-12 18:35:39Z SJL $
// Copyright: (c) 2011 Steven Lamerton
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_OSX_WEBVIEWHISTORYITEM_H_
#define _WX_OSX_WEBVIEWHISTORYITEM_H_
#include "wx/setup.h"
#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \
|| defined(__WXOSX_CARBON__))
class WXDLLIMPEXP_WEBVIEW wxWebViewHistoryItem
{
public:
wxWebViewHistoryItem(const wxString& url, const wxString& title) :
m_url(url), m_title(title) {}
wxString GetUrl() { return m_url; }
wxString GetTitle() { return m_title; }
friend class wxWebViewWebKit;
private:
wxString m_url, m_title;
struct objc_object *m_histItem;
};
#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT
#endif // _WX_OSX_WEBVIEWHISTORYITEM_H_

View File

@ -4,7 +4,7 @@
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id: window.h 67280 2011-03-22 14:17:38Z DS $
// RCS-ID: $Id: window.h 70765 2012-03-01 15:04:42Z JS $
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -114,6 +114,14 @@ public:
virtual bool Reparent( wxWindowBase *newParent );
#if wxUSE_HOTKEY && wxOSX_USE_COCOA_OR_CARBON
// hot keys (system wide accelerators)
// -----------------------------------
virtual bool RegisterHotKey(int hotkeyId, int modifiers, int keycode);
virtual bool UnregisterHotKey(int hotkeyId);
#endif // wxUSE_HOTKEY
#if wxUSE_DRAG_AND_DROP
virtual void SetDropTarget( wxDropTarget *dropTarget );
#endif
@ -280,6 +288,9 @@ public:
float GetContentScaleFactor() const ;
// internal response to size events
virtual void MacOnInternalSize() {}
protected:
// For controls like radio buttons which are genuinely composite
wxList m_subControls;