11 #include <RADCore/RADCore.h>
12 #include <RADUi/RADWidgets.h>
58 const std::vector<DockPanel>&
panels()
const;
68 bool setSize(
const std::string&
id,
double size);
75 std::vector<DockPanel> panels_;
102 const std::vector<DocumentTab>&
tabs()
const;
121 std::vector<DocumentTab> tabs_;
122 std::string activeId_;
162 std::vector<Command> commands_;
215 uint64_t nextId_ = 1;
216 std::vector<Notification> notifications_;
243 const std::vector<TableColumn>&
columns()
const;
245 void setRows(std::vector<std::vector<std::string>> rows);
255 std::string
value(
size_t row,
size_t column)
const;
270 std::vector<TableColumn> columns_;
271 std::vector<std::vector<std::string>> rows_;
273 std::optional<size_t> selectedRow_;
310 const std::vector<FileBrowserEntry>&
entries()
const;
319 std::string directory_;
320 bool showHidden_ =
false;
321 std::vector<FileBrowserEntry> entries_;
322 std::optional<size_t> selectedIndex_;
374 std::vector<LogEntry> entries_;
375 size_t maxEntries_ = 5000;
397 bool caseSensitive_ =
false;
425 double minimum_ = 0.0;
426 double maximum_ = 1.0;
#define RAD_EVENT(Name, Signature)
Declares a typed RADCore event; example: RAD_EVENT(done, (int)).
Definition: RADCore.h:97
#define RADEvents
Marks a public event declaration block in RADObject-derived classes.
Definition: RADCore.h:75
JSON value supporting null, bool, number, string, array, and object.
Definition: RADCore.h:541
Base class for event receivers, senders, and thread-affinity aware objects.
Definition: RADCore.h:963
High-level application shell state.
Definition: RADAppKit.h:432
MenuBarModel & menuBar()
Returns menu model.
DocumentWorkspaceModel & workspace()
Returns document workspace model.
void setTitle(std::string title)
Sets application title.
CommandPaletteModel & commandPalette()
Returns command palette model.
RADCore::Event< void() > changed
Raised when shell state changes.
Definition: RADAppKit.h:436
ToolBarModel & toolBar()
Returns toolbar model.
DockLayoutModel & dockLayout()
Returns dock layout model.
const std::string & title() const
Returns application title.
NotificationModel & notifications()
Returns notification model.
StatusBarModel & statusBar()
Returns status model.
Searchable command palette model.
Definition: RADAppKit.h:140
std::vector< Command > filteredCommands() const
Returns filtered commands.
const std::string & filter() const
Returns filter text.
RADCore::Event< void(std::string) > triggered
Raised when a command is triggered.
Definition: RADAppKit.h:146
void setCommands(std::vector< Command > commands)
Replaces commands.
void setFilter(std::string filter)
Sets filter text.
RADCore::Event< void() > changed
Raised when commands or filter text changes.
Definition: RADAppKit.h:144
const std::vector< Command > & commands() const
Returns all commands.
bool trigger(const std::string &id)
Triggers an enabled command by id.
Dock layout model for IDE-style tools.
Definition: RADAppKit.h:51
const std::vector< DockPanel > & panels() const
Returns panel descriptors.
void fromJson(const RADCore::RADJsonValue &value)
Restores panel layout.
void addPanel(DockPanel panel)
Adds one panel.
RADCore::RADJsonValue toJson() const
Serializes panel layout.
bool setSize(const std::string &id, double size)
Sets preferred panel size by id.
bool select(const std::string &id)
Selects panel by id and deselects siblings in the same area.
bool setVisible(const std::string &id, bool visible)
Shows or hides panel by id.
RADCore::Event< void() > changed
Raised when panel state changes.
Definition: RADAppKit.h:55
void setPanels(std::vector< DockPanel > panels)
Replaces panel descriptors.
Document workspace model for tabbed editors and browsers.
Definition: RADAppKit.h:93
void upsertTab(DocumentTab tab)
Adds or replaces a tab.
const std::string & activeId() const
Returns active tab id.
RADCore::Event< void() > changed
Raised when tabs or active tab changes.
Definition: RADAppKit.h:97
bool removeTab(const std::string &id)
Removes tab by id.
bool hasModifiedTabs() const
Returns true when any tab is modified.
void clear()
Clears all tabs.
bool setActive(std::string id)
Sets active tab id.
bool setModified(const std::string &id, bool modified)
Marks a tab modified or clean.
RADCore::Event< void(std::string) > closeRequested
Raised when a tab close is requested.
Definition: RADAppKit.h:99
bool requestClose(const std::string &id)
Emits closeRequested for a closeable tab.
const std::vector< DocumentTab > & tabs() const
Returns all tabs.
File browser/navigation model.
Definition: RADAppKit.h:289
bool showHidden() const
Returns hidden-file visibility.
bool activate(size_t index)
Activates entry by index.
void setSelectedIndex(std::optional< size_t > index)
Sets selected entry index.
const std::vector< FileBrowserEntry > & entries() const
Returns entries.
RADCore::Event< void() > changed
Raised when directory, entries, or selection changes.
Definition: RADAppKit.h:293
bool goUp()
Navigates to parent directory.
const std::string & directory() const
Returns current directory.
std::optional< size_t > selectedIndex() const
Returns selected entry index.
bool refresh()
Refreshes entries from current directory.
RADCore::Event< void(std::string) > fileActivated
Raised when a file is activated.
Definition: RADAppKit.h:295
bool setDirectory(std::string directory)
Sets current directory and refreshes entries.
void setShowHidden(bool showHidden)
Sets hidden-file visibility.
Filterable log view model.
Definition: RADAppKit.h:352
void setMaxEntries(size_t maxEntries)
Sets maximum retained entries.
void append(LogEntry entry)
Appends one entry.
const std::string & filter() const
Returns text filter.
void setFilter(std::string filter)
Sets text filter.
const std::vector< LogEntry > & entries() const
Returns all entries.
void clear()
Clears entries.
RADCore::Event< void() > changed
Raised when log entries or filter changes.
Definition: RADAppKit.h:356
std::vector< LogEntry > filteredEntries() const
Returns filtered entries.
Notification collection model.
Definition: RADAppKit.h:195
RADCore::Event< void(uint64_t, std::string) > actionTriggered
Raised when a notification action is triggered.
Definition: RADAppKit.h:201
uint64_t push(Notification notification)
Adds a notification and returns assigned id.
bool dismiss(uint64_t id)
Removes a notification by id.
const std::vector< Notification > & notifications() const
Returns notifications.
bool triggerAction(uint64_t id)
Triggers notification action.
RADCore::Event< void() > changed
Raised when notifications change.
Definition: RADAppKit.h:199
void clear()
Clears all notifications.
Progress state model.
Definition: RADAppKit.h:401
void setRange(double minimum, double maximum)
Sets range.
bool busy() const
Returns true when busy.
void setBusy(bool busy)
Sets busy/indeterminate state.
RADCore::Event< void() > changed
Raised when progress changes.
Definition: RADAppKit.h:405
void setValue(double value)
Sets current value.
double minimum() const
Returns minimum.
double normalized() const
Returns normalized 0..1 progress.
double value() const
Returns value.
double maximum() const
Returns maximum.
Search box model.
Definition: RADAppKit.h:380
RADCore::Event< void() > changed
Raised when search state changes.
Definition: RADAppKit.h:384
bool caseSensitive() const
Returns case sensitivity.
const std::string & query() const
Returns query text.
void setCaseSensitive(bool caseSensitive)
Sets case sensitivity.
void setQuery(std::string query)
Sets query text.
Status bar text item model.
Definition: RADWidgets.h:620
Virtual string table with columns, filter, and selected row.
Definition: RADAppKit.h:232
bool activateRow(size_t row)
Activates source row.
const std::vector< TableColumn > & columns() const
Returns columns.
size_t rowCount() const
Returns unfiltered row count.
void appendRow(std::vector< std::string > row)
Appends one row.
std::optional< size_t > selectedRow() const
Returns selected source row.
void setRows(std::vector< std::vector< std::string >> rows)
Sets all rows.
std::vector< size_t > filteredIndexes() const
Returns filtered row indexes.
void setSelectedRow(std::optional< size_t > row)
Sets selected source row.
void setFilter(std::string filter)
Sets filter text.
const std::string & filter() const
Returns filter text.
std::string value(size_t row, size_t column) const
Returns value by source row and column.
size_t columnCount() const
Returns column count.
RADCore::Event< void() > changed
Raised when table state changes.
Definition: RADAppKit.h:236
RADCore::Event< void(size_t) > rowActivated
Raised when a row is activated.
Definition: RADAppKit.h:238
void clear()
Removes all rows.
void setColumns(std::vector< TableColumn > columns)
Sets column descriptors.
Definition: RADAppKit.h:20
DockArea
Dock area for app panels.
Definition: RADAppKit.h:23
@ Bottom
Bottom panel area.
@ Right
Right side panel area.
@ Left
Left side panel area.
@ Floating
Floating panel area.
LogLevel
Log severity level.
Definition: RADAppKit.h:326
@ Warning
Warning message.
@ Info
Informational message.
NotificationSeverity
Notification severity.
Definition: RADAppKit.h:167
@ Warning
Warning notification.
@ Info
Informational notification.
@ Success
Success notification.
@ Error
Error notification.
Command palette command descriptor.
Definition: RADAppKit.h:126
std::string title
Display title.
Definition: RADAppKit.h:130
std::string id
Stable id.
Definition: RADAppKit.h:128
std::string category
Category label.
Definition: RADAppKit.h:132
std::string shortcut
Shortcut display text.
Definition: RADAppKit.h:134
bool enabled
Whether command can run.
Definition: RADAppKit.h:136
Dockable panel descriptor.
Definition: RADAppKit.h:35
std::string id
Stable id.
Definition: RADAppKit.h:37
bool selected
Whether the panel is selected in its area.
Definition: RADAppKit.h:45
bool visible
Whether the panel is visible.
Definition: RADAppKit.h:43
std::string title
Display title.
Definition: RADAppKit.h:39
double size
Preferred size in logical pixels.
Definition: RADAppKit.h:47
DockArea area
Dock area.
Definition: RADAppKit.h:41
Open document tab.
Definition: RADAppKit.h:79
bool closeable
Whether tab can be closed.
Definition: RADAppKit.h:89
bool modified
Whether content has unsaved changes.
Definition: RADAppKit.h:87
std::string fileName
File path when present.
Definition: RADAppKit.h:85
std::string id
Stable tab id.
Definition: RADAppKit.h:81
std::string title
Display title.
Definition: RADAppKit.h:83
File browser entry.
Definition: RADAppKit.h:277
bool directory
True for directories.
Definition: RADAppKit.h:283
std::string name
Display name.
Definition: RADAppKit.h:279
uintmax_t size
File size in bytes when known.
Definition: RADAppKit.h:285
std::string path
Full path.
Definition: RADAppKit.h:281
One log view entry.
Definition: RADAppKit.h:340
int64_t unixMs
Unix timestamp in milliseconds.
Definition: RADAppKit.h:348
std::string message
Message text.
Definition: RADAppKit.h:346
std::string category
Category label.
Definition: RADAppKit.h:344
LogLevel level
Severity.
Definition: RADAppKit.h:342
Toast/status notification.
Definition: RADAppKit.h:179
std::string message
Body text.
Definition: RADAppKit.h:187
int timeoutMs
Timeout in milliseconds; 0 means persistent.
Definition: RADAppKit.h:191
NotificationSeverity severity
Severity.
Definition: RADAppKit.h:183
std::string title
Title text.
Definition: RADAppKit.h:185
std::string actionId
Optional action id.
Definition: RADAppKit.h:189
Table column descriptor.
Definition: RADAppKit.h:220
std::string id
Stable id.
Definition: RADAppKit.h:222
bool sortable
Whether sort is allowed.
Definition: RADAppKit.h:228
std::string title
Display title.
Definition: RADAppKit.h:224
double width
Width in logical pixels.
Definition: RADAppKit.h:226