% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/App.R
\name{App}
\alias{App}
\title{Create and launch a native desktop application window from R.}
\description{
Provides bidirectional native pipe communication between R and the UI.
}
\examples{
# Safe logical check (unwrapped)
app_dir <- system.file("templates/hello", package = "RDesk")
if (nzchar(app_dir)) {
  message("Built-in app directory: ", app_dir)
}

if (interactive()) {
  app <- App$new(title = "Car Visualizer", width = 1200, height = 800)
  
  app$on_ready(function() {
    message("App is ready!")
  })
  
  # Handle messages from UI
  app$on_message("get_data", function(payload) {
    list(cars = mtcars[1:5, ])
  })
  
  # Start the app
  app$run()
}
}
\section{Methods}{
\subsection{Public methods}{
\itemize{
\item \href{#method-App-new}{\code{App$new()}}
\item \href{#method-App-on_ready}{\code{App$on_ready()}}
\item \href{#method-App-on_close}{\code{App$on_close()}}
\item \href{#method-App-check_update}{\code{App$check_update()}}
\item \href{#method-App-register_hotkey}{\code{App$register_hotkey()}}
\item \href{#method-App-set_tray_menu}{\code{App$set_tray_menu()}}
\item \href{#method-App-clipboard_write}{\code{App$clipboard_write()}}
\item \href{#method-App-clipboard_read}{\code{App$clipboard_read()}}
\item \href{#method-App-on_message}{\code{App$on_message()}}
\item \href{#method-App-send}{\code{App$send()}}
\item \href{#method-App-load_ui}{\code{App$load_ui()}}
\item \href{#method-App-set_size}{\code{App$set_size()}}
\item \href{#method-App-set_position}{\code{App$set_position()}}
\item \href{#method-App-set_title}{\code{App$set_title()}}
\item \href{#method-App-minimize}{\code{App$minimize()}}
\item \href{#method-App-maximize}{\code{App$maximize()}}
\item \href{#method-App-restore}{\code{App$restore()}}
\item \href{#method-App-fullscreen}{\code{App$fullscreen()}}
\item \href{#method-App-always_on_top}{\code{App$always_on_top()}}
\item \href{#method-App-set_menu}{\code{App$set_menu()}}
\item \href{#method-App-dialog_open}{\code{App$dialog_open()}}
\item \href{#method-App-dialog_save}{\code{App$dialog_save()}}
\item \href{#method-App-dialog_folder}{\code{App$dialog_folder()}}
\item \href{#method-App-message_box}{\code{App$message_box()}}
\item \href{#method-App-dialog_color}{\code{App$dialog_color()}}
\item \href{#method-App-notify}{\code{App$notify()}}
\item \href{#method-App-loading_start}{\code{App$loading_start()}}
\item \href{#method-App-loading_progress}{\code{App$loading_progress()}}
\item \href{#method-App-loading_done}{\code{App$loading_done()}}
\item \href{#method-App-toast}{\code{App$toast()}}
\item \href{#method-App-set_tray}{\code{App$set_tray()}}
\item \href{#method-App-remove_tray}{\code{App$remove_tray()}}
\item \href{#method-App-service}{\code{App$service()}}
\item \href{#method-App-quit}{\code{App$quit()}}
\item \href{#method-App-get_dir}{\code{App$get_dir()}}
\item \href{#method-App-run}{\code{App$run()}}
\item \href{#method-App-clone}{\code{App$clone()}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-new"></a>}}
\if{latex}{\out{\hypertarget{method-App-new}{}}}
\subsection{Method \code{new()}}{
Create a new RDesk application
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$new(title, width = 1200L, height = 800L, www = NULL, icon = NULL)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{title}}{Window title string}

\item{\code{width}}{Window width in pixels (default 1200)}

\item{\code{height}}{Window height in pixels (default 800)}

\item{\code{www}}{Directory containing HTML/CSS/JS assets (default: built-in template)}

\item{\code{icon}}{Path to window icon file}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
A new App instance
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-on_ready"></a>}}
\if{latex}{\out{\hypertarget{method-App-on_ready}{}}}
\subsection{Method \code{on_ready()}}{
Register a callback to fire when the window is ready
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$on_ready(fn)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{fn}}{A zero-argument function called after the server starts and window opens}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-on_close"></a>}}
\if{latex}{\out{\hypertarget{method-App-on_close}{}}}
\subsection{Method \code{on_close()}}{
Register a callback to fire when the user attempts to close the window
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$on_close(fn)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{fn}}{A zero-argument function. Should return TRUE to allow closing, FALSE to cancel.}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-check_update"></a>}}
\if{latex}{\out{\hypertarget{method-App-check_update}{}}}
\subsection{Method \code{check_update()}}{
Check for application updates from a remote URL
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$check_update(version_url, current_version = NULL)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{version_url}}{URL to a JSON metadata file (e.g. \verb{\{"version": "1.1.0", "url": "http://..."\}})}

\item{\code{current_version}}{Optional version string to compare against. Defaults to app description version.}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
A list with update status and metadata
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-register_hotkey"></a>}}
\if{latex}{\out{\hypertarget{method-App-register_hotkey}{}}}
\subsection{Method \code{register_hotkey()}}{
Register a global keyboard shortcut (hotkey)
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$register_hotkey(keys, fn)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{keys}}{Character string representing the key combination (e.g., "Ctrl+Shift+A")}

\item{\code{fn}}{A zero-argument function to be called when the hotkey is pressed}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-set_tray_menu"></a>}}
\if{latex}{\out{\hypertarget{method-App-set_tray_menu}{}}}
\subsection{Method \code{set_tray_menu()}}{
Set the native system tray menu
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$set_tray_menu(items)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{items}}{A named list of lists defining the menu structure}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-clipboard_write"></a>}}
\if{latex}{\out{\hypertarget{method-App-clipboard_write}{}}}
\subsection{Method \code{clipboard_write()}}{
Write text to the system clipboard
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$clipboard_write(text)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{text}}{Character string to copy}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-clipboard_read"></a>}}
\if{latex}{\out{\hypertarget{method-App-clipboard_read}{}}}
\subsection{Method \code{clipboard_read()}}{
Read text from the system clipboard
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$clipboard_read()}\if{html}{\out{</div>}}
}

\subsection{Returns}{
Character string from clipboard or NULL
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-on_message"></a>}}
\if{latex}{\out{\hypertarget{method-App-on_message}{}}}
\subsection{Method \code{on_message()}}{
Register a handler for a UI -> R message type
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$on_message(type, fn)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{type}}{Unique message identifier string}

\item{\code{fn}}{A function(payload) called when this message type arrives}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-send"></a>}}
\if{latex}{\out{\hypertarget{method-App-send}{}}}
\subsection{Method \code{send()}}{
Send a message from R to the UI
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$send(type, payload = list())}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{type}}{Character string message type (received by rdesk.on() in JS)}

\item{\code{payload}}{A list or data.frame to serialise as JSON payload}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-load_ui"></a>}}
\if{latex}{\out{\hypertarget{method-App-load_ui}{}}}
\subsection{Method \code{load_ui()}}{
Load an HTML file into the window
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$load_ui(path = "index.html")}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{path}}{Path relative to the www directory (e.g. "index.html")}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-set_size"></a>}}
\if{latex}{\out{\hypertarget{method-App-set_size}{}}}
\subsection{Method \code{set_size()}}{
Set the window size dynamically
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$set_size(width, height)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{width}}{New width (pixels)}

\item{\code{height}}{New height (pixels)}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-set_position"></a>}}
\if{latex}{\out{\hypertarget{method-App-set_position}{}}}
\subsection{Method \code{set_position()}}{
Set the window position dynamically
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$set_position(x, y)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{x}}{Horizontal position from left (pixels)}

\item{\code{y}}{Vertical position from top (pixels)}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-set_title"></a>}}
\if{latex}{\out{\hypertarget{method-App-set_title}{}}}
\subsection{Method \code{set_title()}}{
Set the window title dynamically
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$set_title(title)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{title}}{New title}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-minimize"></a>}}
\if{latex}{\out{\hypertarget{method-App-minimize}{}}}
\subsection{Method \code{minimize()}}{
Minimize the window to the taskbar
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$minimize()}\if{html}{\out{</div>}}
}

\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-maximize"></a>}}
\if{latex}{\out{\hypertarget{method-App-maximize}{}}}
\subsection{Method \code{maximize()}}{
Maximize the window to fill the screen
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$maximize()}\if{html}{\out{</div>}}
}

\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-restore"></a>}}
\if{latex}{\out{\hypertarget{method-App-restore}{}}}
\subsection{Method \code{restore()}}{
Restore the window from minimize/maximize
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$restore()}\if{html}{\out{</div>}}
}

\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-fullscreen"></a>}}
\if{latex}{\out{\hypertarget{method-App-fullscreen}{}}}
\subsection{Method \code{fullscreen()}}{
Toggle fullscreen mode
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$fullscreen(enabled = TRUE)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{enabled}}{If TRUE, enters fullscreen. If FALSE, exits.}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-always_on_top"></a>}}
\if{latex}{\out{\hypertarget{method-App-always_on_top}{}}}
\subsection{Method \code{always_on_top()}}{
Set the window to stay always on top of others
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$always_on_top(enabled = TRUE)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{enabled}}{If TRUE, always on top.}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-set_menu"></a>}}
\if{latex}{\out{\hypertarget{method-App-set_menu}{}}}
\subsection{Method \code{set_menu()}}{
Set the native window menu
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$set_menu(items)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{items}}{A named list of lists defining the menu structure}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-dialog_open"></a>}}
\if{latex}{\out{\hypertarget{method-App-dialog_open}{}}}
\subsection{Method \code{dialog_open()}}{
Open a native file-open dialog
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$dialog_open(title = "Open File", filters = NULL)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{title}}{Dialog title}

\item{\code{filters}}{List of file filters, e.g. list("CSV files" = "*.csv")}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
Selected file path (character) or NULL if cancelled
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-dialog_save"></a>}}
\if{latex}{\out{\hypertarget{method-App-dialog_save}{}}}
\subsection{Method \code{dialog_save()}}{
Open a native file-save dialog
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$dialog_save(title = "Save File", default_name = "", filters = NULL)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{title}}{Dialog title}

\item{\code{default_name}}{Initial filename}

\item{\code{filters}}{List of file filters}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
Selected file path (character) or NULL if cancelled
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-dialog_folder"></a>}}
\if{latex}{\out{\hypertarget{method-App-dialog_folder}{}}}
\subsection{Method \code{dialog_folder()}}{
Open a native folder selection dialog
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$dialog_folder(title = "Select Folder")}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{title}}{Dialog title}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
Selected directory path (character) or NULL if cancelled
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-message_box"></a>}}
\if{latex}{\out{\hypertarget{method-App-message_box}{}}}
\subsection{Method \code{message_box()}}{
Show a native message box / alert
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$message_box(message, title = "RDesk", type = "ok", icon = "info")}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{message}}{The message text}

\item{\code{title}}{The dialog title}

\item{\code{type}}{One of "ok", "okcancel", "yesno", "yesnocancel"}

\item{\code{icon}}{One of "info", "warning", "error", "question"}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The button pressed (character: "ok", "cancel", "yes", "no")
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-dialog_color"></a>}}
\if{latex}{\out{\hypertarget{method-App-dialog_color}{}}}
\subsection{Method \code{dialog_color()}}{
Open a native color selection dialog
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$dialog_color(initial_color = "#FFFFFF")}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{initial_color}}{Optional hex color to start with (e.g. "#FF0000")}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
Selected hex color code or NULL if cancelled
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-notify"></a>}}
\if{latex}{\out{\hypertarget{method-App-notify}{}}}
\subsection{Method \code{notify()}}{
Send a native desktop notification
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$notify(title, body = "")}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{title}}{Notification title}

\item{\code{body}}{Notification body text}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-loading_start"></a>}}
\if{latex}{\out{\hypertarget{method-App-loading_start}{}}}
\subsection{Method \code{loading_start()}}{
Show a loading state in the UI
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$loading_start(
  message = "Loading...",
  progress = NULL,
  cancellable = FALSE,
  job_id = NULL
)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{message}}{Text shown under the spinner}

\item{\code{progress}}{Optional numeric 0-100 for a progress bar}

\item{\code{cancellable}}{If TRUE, shows a cancel button in the UI}

\item{\code{job_id}}{Optional job_id from rdesk_async() to wire cancel button}
}
\if{html}{\out{</div>}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-loading_progress"></a>}}
\if{latex}{\out{\hypertarget{method-App-loading_progress}{}}}
\subsection{Method \code{loading_progress()}}{
Update progress on an active loading state
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$loading_progress(value, message = NULL)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{value}}{Numeric 0-100}

\item{\code{message}}{Optional updated message}
}
\if{html}{\out{</div>}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-loading_done"></a>}}
\if{latex}{\out{\hypertarget{method-App-loading_done}{}}}
\subsection{Method \code{loading_done()}}{
Hide the loading state in the UI
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$loading_done()}\if{html}{\out{</div>}}
}

}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-toast"></a>}}
\if{latex}{\out{\hypertarget{method-App-toast}{}}}
\subsection{Method \code{toast()}}{
Show a non-blocking toast notification in the UI
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$toast(message, type = "info", duration_ms = 3000L)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{message}}{Text to show}

\item{\code{type}}{One of "info", "success", "warning", "error"}

\item{\code{duration_ms}}{How long to show it (default 3000ms)}
}
\if{html}{\out{</div>}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-set_tray"></a>}}
\if{latex}{\out{\hypertarget{method-App-set_tray}{}}}
\subsection{Method \code{set_tray()}}{
Set or update the system tray icon
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$set_tray(label = "RDesk App", icon = NULL, on_click = NULL)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{label}}{Tooltip text for the tray icon}

\item{\code{icon}}{Path to .ico file (optional)}

\item{\code{on_click}}{Character "left" or "right" or callback function(button)}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-remove_tray"></a>}}
\if{latex}{\out{\hypertarget{method-App-remove_tray}{}}}
\subsection{Method \code{remove_tray()}}{
Remove the system tray icon
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$remove_tray()}\if{html}{\out{</div>}}
}

\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-service"></a>}}
\if{latex}{\out{\hypertarget{method-App-service}{}}}
\subsection{Method \code{service()}}{
Service this app's pending native events
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$service()}\if{html}{\out{</div>}}
}

\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-quit"></a>}}
\if{latex}{\out{\hypertarget{method-App-quit}{}}}
\subsection{Method \code{quit()}}{
Close the window and stop the app's event loop.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$quit()}\if{html}{\out{</div>}}
}

\subsection{Returns}{
The App instance (invisible)
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-get_dir"></a>}}
\if{latex}{\out{\hypertarget{method-App-get_dir}{}}}
\subsection{Method \code{get_dir()}}{
Get the application root directory (where www/ and R/ are located).
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$get_dir()}\if{html}{\out{</div>}}
}

\subsection{Returns}{
Character string path.
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-run"></a>}}
\if{latex}{\out{\hypertarget{method-App-run}{}}}
\subsection{Method \code{run()}}{
Start the application - opens the window
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$run(block = TRUE)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{block}}{If TRUE (default), blocks with an event loop until the window is closed.}
}
\if{html}{\out{</div>}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-App-clone"></a>}}
\if{latex}{\out{\hypertarget{method-App-clone}{}}}
\subsection{Method \code{clone()}}{
The objects of this class are cloneable with this method.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{App$clone(deep = FALSE)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{deep}}{Whether to make a deep clone.}
}
\if{html}{\out{</div>}}
}
}
}
