filedialogimpl-win32.h revision 17d7cf7240c5b90b57f47010b85069aae87431e5
5331N/A * @brief Implementation of native file dialogs for Win32 5331N/A * The Inkscape Organization 5331N/A * Copyright (C) 2004-2008 The Inkscape Organization 5331N/A * Released under GNU GPL, read the file 'COPYING' for more information 5331N/A // define WINVER high enough so we get the correct OPENFILENAMEW size 5954N/A/*######################################################################### 5331N/A### F I L E D I A L O G B A S E C L A S S 5331N/A#########################################################################*/ 5331N/A/// This class is the base implementation of a MS Windows /// @param parent The parent window for the dialog /// @param dir The directory to begin browing from /// @param title The title caption for the dialog in UTF-8 /// @param type The dialog type /// @param preferenceBase The preferences key /// Gets the currently selected extension. Valid after an [OK] /// @return Returns a pointer to the selected extension, or NULL /// if the selected filter requires an automatic type detection /// Get the path of the current directory /// 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 /// The result of the call to GetOpenFileName. If true /// the user clicked OK, if false the user clicked cancel /// The windows handle of the parent window /// The path of the directory that is currently being /// The title of the dialog in UTF-16 /// The path of the currently selected file in UTF-16 /// The filter string for GetOpenFileName in UTF-16 /// 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. /// The number of filters registered /// An array of the extensions associated with the /// file types of each filter. So the Nth entry of /// this array corresponds to the extension of the Nth /// filter in the list. NULL if no specific extension is /// The currently selected extension. Valid after an [OK] /*######################################################################### #########################################################################*/ /// An Inkscape compatible wrapper around MS Windows GetOpenFileName API /// @param parent The parent window for the dialog /// @param dir The directory to begin browing from /// @param title The title caption for the dialog in UTF-8 /// @param type The dialog type /// Shows the file dialog, and blocks until a file /// @return Returns true if the user selected a /// file, or false if the user pressed cancel. /// Gets a list of the selected file names /// @return Returns an STL vector filled with the /// GTK names of the selected files /// Get the path of the current directory /// Gets the currently selected extension. Valid after an [OK] /// @return Returns a pointer to the selected extension, or NULL /// if the selected filter requires an automatic type detection /// Add a custom file filter menu item /// @param name - Name of the filter (such as "Javscript") /// @param pattern - File filtering patter (such as "*.js") /// Use the FileDialogType::CUSTOM_TYPE in constructor to not include other file types /// Create filter menu for this type of dialog /// The handle of the preview pane window /// The handle of the file dialog window /// A pointer to the standard window proc of the /// The handle of the bitmap of the "show preview" /// The handle of the toolbar's window /// This flag is set true when the preview should be /// shown, or false when it should be hidden /// The current width of the preview pane in pixels /// The current height of the preview pane in pixels /// The handle of the windows to display within the /// preview pane, or NULL if no image should be displayed /// The windows shell icon for the selected file /// The size of the preview file in kilobytes /// The width of the document to be shown in the preview panel /// The width of the document to be shown in the preview panel /// The width of the rendered preview image in pixels /// The height of the rendered preview image in pixels /// A GDK Pixbuf of the rendered preview to be displayed /// This flag is set true if a file has been selected /// This flag is set true when the GetOpenFileName call /// This mutex is used to ensure that the worker thread /// that calls GetOpenFileName cannot collide with the /// The controller function for the thread which calls /// Registers the Windows Class of the preview panel window /// A message proc which is called by the standard dialog /// A message proc which wraps the standard dialog proc, /// but intercepts some calls /// The message proc for the preview panel window /// Lays out the controls in the file dialog given it's /// GetOpenFileName thread only. /// Enables or disables the file preview. /// GetOpenFileName thread only. /// This function is called in the App thread when a file had /// Loads and renders the unshrunk preview image. /// Main app thread only. /// Frees all the allocated objects associated with the file /// currently being previewed /// Main app thread only. /// Loads preview for an SVG or SVGZ file. /// Main app thread only. /// @return Returns true if the SVG loaded successfully /// A callback to allow this class to dispose of the /// memory block of the rendered SVG bitmap /// @buffer buffer The buffer to free /// Loads the preview for a raster image /// Main app thread only. /// @return Returns true if the image loaded successfully /// Loads the preview for a meta file /// Main app thread only. /// @return Returns true if the image loaded successfully /// This flag is set true when a meta file is previewed /// Renders the unshrunk preview image to a windows HTBITMAP /// which can be painted in the preview pain. /// Main app thread only. /// Formats the caption in UTF-16 for the preview image /// @param caption The buffer to format the caption string into /// @param caption_size The number of wchar_ts in the caption buffer /// @return Returns the number of characters in caption string /*######################################################################### #########################################################################*/ /// An Inkscape compatible wrapper around MS Windows GetSaveFileName API /// Shows the file dialog, and blocks until a file /// @return Returns true if the user selected a /// file, or false if the user pressed cancel. /// Get the path of the current directory /// Gets the currently selected extension. Valid after an [OK] /// @return Returns a pointer to the selected extension, or NULL /// if the selected filter requires an automatic type detection /// A handle to the title label and edit box /// Create a filter menu for this type of dialog /// The controller function for the thread which calls /// A message proc which is called by the standard dialog c-file-style:"stroustrup" c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :