X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/20380343684f83760933a77c826c2a371da5d375..a516284f67e1910fc6dc5364b289340332d0d35f:/include/wx/gtk/filectrl.h diff --git a/include/wx/gtk/filectrl.h b/include/wx/gtk/filectrl.h index e194bfc49f..d5c3848e76 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()]; } @@ -55,7 +59,11 @@ private: GtkFileChooser *m_widget; // First wildcard in filter, to be used when the user // saves a file without giving an extension. - wxArrayString m_wildcards; + 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 @@ -110,6 +118,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;