X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df22f86063643de23dd02c2a77217d07b1918be1..e5ee4c908b9dbcf07f0441aa74d8635b7343be4d:/include/wx/filename.h?ds=inline diff --git a/include/wx/filename.h b/include/wx/filename.h index 4128075623..ceb0fc820e 100644 --- a/include/wx/filename.h +++ b/include/wx/filename.h @@ -196,6 +196,16 @@ public: return dtMod; } +#ifdef __WXMAC__ + bool MacSetTypeAndCreator( wxUint32 type , wxUint32 creator ) ; + bool MacGetTypeAndCreator( wxUint32 *type , wxUint32 *creator ) ; + // gets the 'common' type and creator for a certain extension + static bool MacFindDefaultTypeAndCreator( const wxString& ext , wxUint32 *type , wxUint32 *creator ) ; + // registers application defined extensions and their default type and creator + static void MacRegisterDefaultTypeAndCreator( const wxString& ext , wxUint32 type , wxUint32 creator ) ; + // looks up the appropriate type and creator from the registration and then sets + bool MacSetDefaultTypeAndCreator() ; +#endif // various file/dir operations // retrieve the value of the current working directory @@ -232,7 +242,7 @@ public: // variables will be expanded in it // // this may be done using another (than current) value of cwd - bool Normalize(wxPathNormalize flags = wxPATH_NORM_ALL, + bool Normalize(int flags = wxPATH_NORM_ALL, const wxString& cwd = wxEmptyString, wxPathFormat format = wxPATH_NATIVE); @@ -259,8 +269,6 @@ public: bool operator==(const wxString& filename) { return *this == wxFileName(filename); } - // Tests - // are the file names of this type cases sensitive? static bool IsCaseSensitive( wxPathFormat format = wxPATH_NATIVE ); @@ -271,6 +279,12 @@ public: // is this filename relative? bool IsRelative() const { return m_relative; } + + // forcibly set the flag + void SetAbsolute() + { m_relative = FALSE; } + void SetRelative() + { m_relative = TRUE; } // Information about path format @@ -315,6 +329,8 @@ public: // Construct path only - possibly with the trailing separator wxString GetPath( bool add_separator = FALSE, wxPathFormat format = wxPATH_NATIVE ) const; + // Replace current path with this one + void SetPath( const wxString &path, wxPathFormat format = wxPATH_NATIVE ); // more readable synonym wxString GetPathWithSep(wxPathFormat format = wxPATH_NATIVE ) const