Hoogle Search
Within LTS Haskell 24.70 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
fileChooserSetFilename :: (HasCallStack, MonadIO m, IsFileChooser a) => a -> [Char] -> m Boolgi-gtk3 GI.Gtk.Interfaces.FileChooser Sets filename as the current filename for the file chooser, by changing to the file’s parent folder and actually selecting the file in list; all other files will be unselected. If the chooser is in FileChooserActionSave mode, the file’s base name will also appear in the dialog’s file name entry. Note that the file must exist, or nothing will be done except for the directory change. You should use this function only when implementing a save dialog for which you already have a file name to which the user may save. For example, when the user opens an existing file and then does Save As... to save a copy or a modified version. If you don’t have a file name already — for example, if the user just created a new file and is saving it for the first time, do not call this function. Instead, use something similar to this:
C code
if (document_is_new) { // the user just created a new document gtk_file_chooser_set_current_name (chooser, "Untitled document"); } else { // the user edited an existing document gtk_file_chooser_set_filename (chooser, existing_filename); }In the first case, the file chooser will present the user with useful suggestions as to where to save his new file. In the second case, the file’s existing location is already known, so the file chooser will use it. Since: 2.4fileChooserSetFilter :: (HasCallStack, MonadIO m, IsFileChooser a, IsFileFilter b) => a -> b -> m ()gi-gtk3 GI.Gtk.Interfaces.FileChooser Sets the current filter; only the files that pass the filter will be displayed. If the user-selectable list of filters is non-empty, then the filter should be one of the filters in that list. Setting the current filter when the list of filters is empty is useful if you want to restrict the displayed set of files without letting the user change it. Since: 2.4
fileChooserSetLocalOnly :: (HasCallStack, MonadIO m, IsFileChooser a) => a -> Bool -> m ()gi-gtk3 GI.Gtk.Interfaces.FileChooser Sets whether only local files can be selected in the file selector. If localOnly is True (the default), then the selected file or files are guaranteed to be accessible through the operating systems native file system and therefore the application only needs to worry about the filename functions in FileChooser, like fileChooserGetFilename, rather than the URI functions like fileChooserGetUri, On some systems non-native files may still be available using the native filesystem via a userspace filesystem (FUSE). Since: 2.4
-
gi-gtk3 GI.Gtk.Interfaces.FileChooser Sets an application-supplied widget to use to display a custom preview of the currently selected file. To implement a preview, after setting the preview widget, you connect to the FileChooser::updatePreview signal, and call fileChooserGetPreviewFilename or fileChooserGetPreviewUri on each change. If you can display a preview of the new file, update your widget and set the preview active using fileChooserSetPreviewWidgetActive. Otherwise, set the preview inactive. When there is no application-supplied preview widget, or the application-supplied preview widget is not active, the file chooser will display no preview at all. Since: 2.4
fileChooserSetPreviewWidgetActive :: (HasCallStack, MonadIO m, IsFileChooser a) => a -> Bool -> m ()gi-gtk3 GI.Gtk.Interfaces.FileChooser Sets whether the preview widget set by fileChooserSetPreviewWidget should be shown for the current filename. When active is set to false, the file chooser may display an internally generated preview of the current file or it may display no preview at all. See fileChooserSetPreviewWidget for more details. Since: 2.4
fileChooserSetSelectMultiple :: (HasCallStack, MonadIO m, IsFileChooser a) => a -> Bool -> m ()gi-gtk3 GI.Gtk.Interfaces.FileChooser Sets whether multiple files can be selected in the file selector. This is only relevant if the action is set to be FileChooserActionOpen or FileChooserActionSelectFolder. Since: 2.4
fileChooserSetShowHidden :: (HasCallStack, MonadIO m, IsFileChooser a) => a -> Bool -> m ()gi-gtk3 GI.Gtk.Interfaces.FileChooser Sets whether hidden files and folders are displayed in the file selector. Since: 2.6
fileChooserSetUri :: (HasCallStack, MonadIO m, IsFileChooser a) => a -> Text -> m Boolgi-gtk3 GI.Gtk.Interfaces.FileChooser Sets the file referred to by uri as the current file for the file chooser, by changing to the URI’s parent folder and actually selecting the URI in the list. If the chooser is FileChooserActionSave mode, the URI’s base name will also appear in the dialog’s file name entry. Note that the URI must exist, or nothing will be done except for the directory change. You should use this function only when implementing a save dialog for which you already have a file name to which the user may save. For example, when the user opens an existing file and then does Save As... to save a copy or a modified version. If you don’t have a file name already — for example, if the user just created a new file and is saving it for the first time, do not call this function. Instead, use something similar to this:
C code
if (document_is_new) { // the user just created a new document gtk_file_chooser_set_current_name (chooser, "Untitled document"); } else { // the user edited an existing document gtk_file_chooser_set_uri (chooser, existing_uri); }In the first case, the file chooser will present the user with useful suggestions as to where to save his new file. In the second case, the file’s existing location is already known, so the file chooser will use it. Since: 2.4fileChooserSetUsePreviewLabel :: (HasCallStack, MonadIO m, IsFileChooser a) => a -> Bool -> m ()gi-gtk3 GI.Gtk.Interfaces.FileChooser Sets whether the file chooser should display a stock label with the name of the file that is being previewed; the default is True. Applications that want to draw the whole preview area themselves should set this to False and display the name themselves in their preview widget. See also: fileChooserSetPreviewWidget Since: 2.4
-
gi-gtk3 GI.Gtk.Interfaces.FontChooser Adds a filter function that decides which fonts to display in the font chooser. Since: 3.2