Code

Add option to align & distribute dialog to treat the selection as a group (closes...
[inkscape.git] / src / ui / dialog / filedialogimpl-win32.h
index fd0d1c259a8c04175b8e6ecb6bd923ce1d73ef7f..3a0c3775bf4d276ebfcec5bde6ead81d73beaa22 100644 (file)
@@ -58,16 +58,7 @@ protected:
     /// The dialog type
     FileDialogType dialogType;
 
-    /// This mutex is used to ensure that the worker thread
-    /// that calls GetOpenFileName cannot collide with the
-    /// main Inkscape thread
-    Glib::Mutex *_mutex;
-
-    /// This flag is set true when the GetOpenFileName call
-    /// has returned
-    bool _finished;
-
-    /// A pointer to the GTK main-loop context object. This
+       /// A pointer to the GTK main-loop context object. This
     /// is used to keep the rest of the inkscape UI running
     /// while the file dialog is displayed
     GMainLoop *_main_loop;
@@ -95,8 +86,13 @@ protected:
     /// The filter string for GetOpenFileName in UTF-16
     wchar_t *_filter;
 
-    /// The index of the currently selected filter
-    int _filterIndex;
+    /// The index of the currently selected filter.
+       /// This value must be greater than or equal to 1,
+       /// and less than or equal to _filter_count.
+    unsigned int _filter_index;
+
+       /// The number of filters registered
+       unsigned int _filter_count;
 
     /// An array of the extensions associated with the
     /// file types of each filter. So the Nth entry of
@@ -105,7 +101,7 @@ protected:
     /// specified/
     Inkscape::Extension::Extension **_extension_map;
 
-    /// The currently selected extension. Valid after an [OK]
+       /// The currently selected extension. Valid after an [OK]
     Inkscape::Extension::Extension *_extension;
 };
 
@@ -214,6 +210,15 @@ private:
     /// This flag is set true if a file has been selected
     bool _file_selected;
 
+       /// This flag is set true when the GetOpenFileName call
+    /// has returned
+    bool _finished;
+
+    /// This mutex is used to ensure that the worker thread
+    /// that calls GetOpenFileName cannot collide with the
+    /// main Inkscape thread
+    Glib::Mutex *_mutex;
+
 
     /// The controller function for the thread which calls
     /// GetOpenFileName
@@ -270,6 +275,14 @@ private:
     /// @return Returns true if the image loaded successfully
     bool set_image_preview();
 
+    /// Loads the preview for a meta file
+    /// Main app thread only.
+    /// @return Returns true if the image loaded successfully
+    bool set_emf_preview();
+
+    /// This flag is set true when a meta file is previewed
+    bool _preview_emf_image;
+
     /// Renders the unshrunk preview image to a windows HTBITMAP
     /// which can be painted in the preview pain.
     /// Main app thread only.
@@ -296,7 +309,8 @@ public:
                        const Glib::ustring &dir,
                        FileDialogType fileTypes,
                        const char *title,
-                       const Glib::ustring &default_key);
+                       const Glib::ustring &default_key,
+                       const char *docTitle);
 
     /// Destructor
     virtual ~FileSaveDialogImplWin32();
@@ -320,13 +334,21 @@ public:
     virtual void setSelectionType( Inkscape::Extension::Extension *key );
 
 private:
+       /// A handle to the title label and edit box
+    HWND _title_label;
+    HWND _title_edit;
 
-    /**
-     *  Create a filter menu for this type of dialog
-     */
+    /// Create a filter menu for this type of dialog
     void createFilterMenu();
 
+    /// The controller function for the thread which calls
+    /// GetSaveFileName
     void GetSaveFileName_thread();
+
+    /// A message proc which is called by the standard dialog
+    /// proc
+    static UINT_PTR CALLBACK GetSaveFileName_hookproc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam);
+
 };