rigImGui 0.1.1
RigKit pack API - rigImGui
Loading...
Searching...
No Matches
FileDialogs.h File Reference
#include <algorithm>
#include <cstdlib>
#include <filesystem>
#include <functional>
#include <string>
#include <vector>
#include <imgui.h>
#include <imfilebrowser.h>
#include "core/IMui.h"
#include "core/util/AppPaths.h"
#include "ImGuiPanel.h"
#include "ThumbnailCache.h"
#include "UiDpi.h"
Include dependency graph for FileDialogs.h:
This graph shows which files directly or indirectly include this file:

Classes

class  rigkit::FileDialogWindow
 Viewport-capable chrome for FileDialogs. More...
class  rigkit::FileDialogs
 Open/save browsers for Mui - keeps ImGui::FileBrowser out of IMui. More...

Functions

void rigkit::applyFileBrowserLayout (ImGui::FileBrowser &browser)
 DPI-scaled size for any ImGui::FileBrowser (Place / Open / Save / ...).
void rigkit::installFileBrowserQuickAccess (ImGui::FileBrowser &browser)
 App data / User data / Home / Desktop / Documents / Downloads shortcuts (left sidebar).
void rigkit::setFileBrowserFilters (ImGui::FileBrowser &browser, std::vector< std::string > filters)
 Apply extension filters and always offer an all-files choice in the combo.

Variables

constexpr int rigkit::kFileDialogDesignW = 1100
 Design (1x) size of the open/save browser - pass through uiPx at open.
constexpr float rigkit::kFileDialogQuickAccessDesignW = 160.f
 Quick-access sidebar width in 1x design units.

Function Documentation

◆ applyFileBrowserLayout()

void rigkit::applyFileBrowserLayout ( ImGui::FileBrowser & browser)
inline

DPI-scaled size for any ImGui::FileBrowser (Place / Open / Save / ...).

Sidebar width lives here. The ImGuiPanel host sets position and size on Begin. Call before Open() so Appearing size picks up the new layout.

◆ installFileBrowserQuickAccess()

void rigkit::installFileBrowserQuickAccess ( ImGui::FileBrowser & browser)
inline

App data / User data / Home / Desktop / Documents / Downloads shortcuts (left sidebar).

Call once per browser. AddQuickAccess stats each folder; Desktop / Documents / Downloads on OneDrive can stall the UI if this runs every Open.

◆ setFileBrowserFilters()

void rigkit::setFileBrowserFilters ( ImGui::FileBrowser & browser,
std::vector< std::string > filters )
inline

Apply extension filters and always offer an all-files choice in the combo.

imgui-filebrowser's any-extension token is not the Windows all-files glob. Callers pass preferred types first; all-files is appended when missing so the directory listing can still show everything.

Variable Documentation

◆ kFileDialogDesignW

int rigkit::kFileDialogDesignW = 1100
inlineconstexpr

Design (1x) size of the open/save browser - pass through uiPx at open.

Room for the quick-access sidebar plus a usable file list.