X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..9c34a216817028bc533e07873d047208a96b05a2:/include/wx/gtk/filectrl.h diff --git a/include/wx/gtk/filectrl.h b/include/wx/gtk/filectrl.h index e84fff83f4..4d11d7f59c 100644 --- a/include/wx/gtk/filectrl.h +++ b/include/wx/gtk/filectrl.h @@ -32,7 +32,7 @@ typedef struct _GtkFileChooser GtkFileChooser; class WXDLLIMPEXP_CORE wxGtkFileChooser { public: - wxGtkFileChooser() {} + wxGtkFileChooser() { m_ignoreNextFilterEvent = false; } void SetWidget(GtkFileChooser *w); @@ -48,6 +48,10 @@ public: void SetWildcard( const wxString& wildCard ); void SetFilterIndex( int filterIndex ); + bool HasFilterChoice() const; + + bool ShouldIgnoreNextFilterEvent() const { return m_ignoreNextFilterEvent; } + wxString GetCurrentWildCard() const { return m_wildcards[GetFilterIndex()]; } @@ -56,6 +60,10 @@ private: // First wildcard in filter, to be used when the user // saves a file without giving an extension. wxArrayString m_wildcards; + + // If true, ignore the next event because it was generated by us and not + // the user. + bool m_ignoreNextFilterEvent; }; #if wxUSE_FILECTRL @@ -80,9 +88,8 @@ public: Create( parent, id, defaultDirectory, defaultFilename, wildCard, style, pos, size, name ); } - virtual ~wxGtkFileCtrl() {}; + virtual ~wxGtkFileCtrl(); - void Init(); bool Create( wxWindow *parent, wxWindowID id, const wxString& defaultDirectory = wxEmptyString, @@ -110,6 +117,14 @@ public: virtual bool HasMultipleFileSelection() const { return HasFlag( wxFC_MULTIPLE ); } virtual void ShowHidden(bool show); + virtual bool HasFilterChoice() const + { return m_fc.HasFilterChoice(); } + + + // Implementation only from now on. + bool GTKShouldIgnoreNextFilterEvent() const + { return m_fc.ShouldIgnoreNextFilterEvent(); } + bool m_checkNextSelEvent; bool m_ignoreNextFolderChangeEvent; @@ -118,6 +133,9 @@ protected: wxGtkFileChooser m_fc; wxString m_wildCard; +private: + void Init(); + DECLARE_DYNAMIC_CLASS( wxGtkFileCtrl ) };