making cocoa build again
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
9804d5404a
commit
747592e7cb
@ -61,7 +61,21 @@ public:
|
||||
|
||||
// Set() functions
|
||||
void Set( WX_NSColor aColor );
|
||||
|
||||
|
||||
// reroute the inherited ones
|
||||
void Set(unsigned char red, unsigned char green, unsigned char blue)
|
||||
{ wxColourBase::Set(red,green,blue); }
|
||||
|
||||
// implemented in colourcmn.cpp
|
||||
bool Set(const wxChar *str)
|
||||
{ return wxColourBase::Set(str); }
|
||||
|
||||
bool Set(const wxString &str)
|
||||
{ return wxColourBase::Set(str); }
|
||||
|
||||
void Set(unsigned long colRGB)
|
||||
{ wxColourBase::Set(colRGB); }
|
||||
|
||||
protected:
|
||||
// puts the object in an invalid, uninitialized state
|
||||
void Init();
|
||||
|
@ -56,7 +56,8 @@ wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message,
|
||||
wxTopLevelWindows.Append(this);
|
||||
|
||||
m_message = message;
|
||||
m_dialogStyle = style;
|
||||
|
||||
SetWindowStyle(style);
|
||||
m_parent = parent;
|
||||
m_path = defaultPath;
|
||||
|
||||
@ -70,7 +71,7 @@ wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message,
|
||||
|
||||
//If the user requests to save - use a NSSavePanel
|
||||
//else use a NSOpenPanel
|
||||
if (m_dialogStyle & wxFD_SAVE)
|
||||
if (HasFlag(wxFD_SAVE))
|
||||
{
|
||||
SetNSPanel([NSSavePanel savePanel]);
|
||||
|
||||
@ -91,7 +92,7 @@ wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message,
|
||||
[GetNSSavePanel() setPrompt:@"Open"];
|
||||
}
|
||||
|
||||
if (m_dialogStyle & wxDD_NEW_DIR_BUTTON) //m_dialogStyle & wxDD_NEW_DIR_BUTTON
|
||||
if (HasFlag(wxDD_NEW_DIR_BUTTON)) //m_dialogStyle & wxDD_NEW_DIR_BUTTON
|
||||
{
|
||||
[(NSOpenPanel*)m_cocoaNSWindow setCanCreateDirectories:YES];
|
||||
}
|
||||
@ -109,7 +110,7 @@ int wxDirDialog::ShowModal()
|
||||
|
||||
int nResult;
|
||||
|
||||
if (m_dialogStyle & wxFD_SAVE)
|
||||
if (HasFlag(wxFD_SAVE))
|
||||
{
|
||||
nResult = [GetNSSavePanel()
|
||||
runModalForDirectory:wxNSStringWithWxString(m_dir)
|
||||
|
@ -48,11 +48,17 @@ IMPLEMENT_CLASS(wxCocoaFileDialog, wxFileDialogBase)
|
||||
// wxFileDialog
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
|
||||
const wxString& defaultDir, const wxString& defaultFileName,
|
||||
const wxString& wildCard, long style, const wxPoint& pos)
|
||||
: wxFileDialogBase(parent, message, defaultDir, defaultFileName,
|
||||
wildCard, style, pos)
|
||||
wxFileDialog::wxFileDialog(wxWindow *parent,
|
||||
const wxString& message,
|
||||
const wxString& defaultDir,
|
||||
const wxString& defaultFileName,
|
||||
const wxString& wildCard,
|
||||
long style,
|
||||
const wxPoint& pos,
|
||||
const wxSize& sz,
|
||||
const wxString& name)
|
||||
: wxFileDialogBase(parent, message, defaultDir, defaultFileName,
|
||||
wildCard, style, pos, sz, name)
|
||||
{
|
||||
wxTopLevelWindows.Append(this);
|
||||
|
||||
@ -69,7 +75,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
|
||||
|
||||
//If the user requests to save - use a NSSavePanel
|
||||
//else use a NSOpenPanel
|
||||
if (m_dialogStyle & wxFD_SAVE)
|
||||
if (HasFlag(wxFD_SAVE))
|
||||
{
|
||||
SetNSPanel([NSSavePanel savePanel]);
|
||||
|
||||
@ -93,7 +99,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
|
||||
SetNSPanel([NSOpenPanel openPanel]);
|
||||
[m_cocoaNSWindow setTitle:wxNSStringWithWxString(message)];
|
||||
|
||||
[(NSOpenPanel*)m_cocoaNSWindow setAllowsMultipleSelection:(m_dialogStyle & wxFD_MULTIPLE)];
|
||||
[(NSOpenPanel*)m_cocoaNSWindow setAllowsMultipleSelection:(HasFlag(wxFD_MULTIPLE))];
|
||||
[(NSOpenPanel*)m_cocoaNSWindow setResolvesAliases:YES];
|
||||
[(NSOpenPanel*)m_cocoaNSWindow setCanChooseFiles:YES];
|
||||
[(NSOpenPanel*)m_cocoaNSWindow setCanChooseDirectories:NO];
|
||||
@ -196,7 +202,7 @@ int wxFileDialog::ShowModal()
|
||||
|
||||
int nResult;
|
||||
|
||||
if (m_dialogStyle & wxFD_SAVE)
|
||||
if (HasFlag(wxFD_SAVE))
|
||||
{
|
||||
nResult = [GetNSSavePanel()
|
||||
runModalForDirectory:wxNSStringWithWxString(m_dir)
|
||||
|
@ -109,6 +109,7 @@ wxString wxStandardPathsCF::GetFromFunc(wxCFURLRef (*func)(wxCFBundleRef)) const
|
||||
|
||||
wxString wxStandardPathsCF::GetDocumentsDir() const
|
||||
{
|
||||
#ifdef __WXMAC__
|
||||
return wxMacFindFolderNoSeparator
|
||||
(
|
||||
#if TARGET_API_MAC_OSX
|
||||
@ -119,6 +120,9 @@ wxString wxStandardPathsCF::GetDocumentsDir() const
|
||||
kDocumentsFolderType,
|
||||
kCreateFolder
|
||||
);
|
||||
#else
|
||||
return wxFileName::GetHomeDir() + wxT("/Documents");
|
||||
#endif
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user