v2.25
IUI Interface Reference

Contains functions relating to the user interface. More...

Inheritance diagram for IUI:

Public Member Functions

HRESULT CreateAction ([out, retval] IAction **ppAction)
 Creates a new action object. More...
 
HRESULT CreateActionWithId ([in] GUID id, [out, retval] IAction **ppAction)
 Creates a new action object with the specified identifier. More...
 
HRESULT GetAction ([in] GUID id, [out, retval] IAction **ppAction)
 Returns an existing action by the given id. More...
 
HRESULT AddExtensionToPrimaryPanel ([in] IUIPanelExtension *pUIPanelExtension)
 Adds a UI panel extension to the primary application panel. More...
 
HRESULT AddExtensionToActionsPanel ([in] IUIPanelExtension *pUIPanelExtension, [in] enum ViewType viewType_)
 Adds a UI panel extension to the Actions application panel. More...
 
HRESULT AddToolButtonToActionsPanel ([in] IAction *pAction, [in] enum ViewType viewType_)
 Adds a tool button to the Actions application panel. More...
 
HRESULT CreateUIPanelExtension ([out, retval] IUIPanelExtension **ppUIPanelExtension)
 Creates an extension for a UI panel. More...
 
HRESULT CreateSplitButton ([in] IAction *pDefaultAction, [out, retval] ISplitButton **ppSplitButton)
 Creates a split button. More...
 
HRESULT CreateDropDownButton ([out, retval] IDropDownButton **ppDropDownButton)
 Creates a drop-down button. More...
 
HRESULT AddContextMenu ([in, ref] GUID *pId, [in] IContextMenu *pMmenu, [in] enum ViewType viewType_, [in] enum ContextMenuShowCase showCase_)
 Adds items and submenus to Renga context menus. More...
 
HRESULT ShowMessageBox ([in] enum MessageIcon icon_, [in] BSTR title_, [in] BSTR text_)
 Shows a modal message box with the given icon, title and text and the Close button. More...
 
HRESULT ShowSaveFileDialog ([in] BSTR title, [in] BSTR defaultPath, [in] BSTR filter, [out, retval] BSTR *pFileName)
 Shows the Save File dialog and returns the file name selected by user. More...
 
HRESULT ShowOpenFileDialog ([in] BSTR title_, [in] BSTR defaultPath, [in] BSTR filter, [out, retval] BSTR *pFileName)
 Shows the Open File dialog and returns the name of an existing file selected by user. More...
 
HRESULT CreateImage ([out, retval] IImage **ppImage)
 Creates an image. More...
 
HRESULT CreateContextMenu ([out, retval] IContextMenu **ppContextMenu)
 Creates a new context menu. More...
 
HRESULT AddExportAction ([in] IAction *pAction)
 Adds an action to the export drop-down menu of the application. More...
 
HRESULT AddContextMenuS ([in] BSTR uniqueId, [in] IContextMenu *pMmenu, [in] enum ViewType viewType_, [in] enum ContextMenuShowCase showCase_)
 Same as AddContextMenu, but accepting GUID as a string. More...
 

Detailed Description

Contains functions relating to the user interface.

This interface provides methods to manage custom user interface controls displayed in the application, such as tool buttons on the primary panel. There are several ways to extend Renga's user interface:

Besides, it provides methods to show messages and use the Open and Save File dialogs.

Member Function Documentation

◆ AddContextMenu()

HRESULT IUI::AddContextMenu ( [in, ref] GUID *  pId,
[in] IContextMenu pMmenu,
[in] enum ViewType  viewType_,
[in] enum ContextMenuShowCase  showCase_ 
)

Adds items and submenus to Renga context menus.

Parameters
[in]pIdThe unique identifier of added Renga context menu.
[in]pMmenuThe items to add.
[in]viewType_The type of the view whose context menu will contain the new items.
[in]showCase_The situation when the items should be shown.

◆ AddContextMenuS()

HRESULT IUI::AddContextMenuS ( [in] BSTR  uniqueId,
[in] IContextMenu pMmenu,
[in] enum ViewType  viewType_,
[in] enum ContextMenuShowCase  showCase_ 
)

Same as AddContextMenu, but accepting GUID as a string.

Parameters
[in]uniqueIdThe unique identifier of added Renga context menu.
[in]pMmenuThe items to add.
[in]viewType_The type of the view whose context menu will contain the new items.
[in]showCase_The situation when the items should be shown.

◆ AddExportAction()

HRESULT IUI::AddExportAction ( [in] IAction pAction)

Adds an action to the export drop-down menu of the application.

Parameters
[in]pActionThe action to add.
See also
AddContextMenu()

◆ AddExtensionToActionsPanel()

HRESULT IUI::AddExtensionToActionsPanel ( [in] IUIPanelExtension pUIPanelExtension,
[in] enum ViewType  viewType_ 
)

Adds a UI panel extension to the Actions application panel.

Parameters
[in]pUIPanelExtensionThe UI panel extension to add.
[in]viewType_The specific type of the view to show the extension on.

◆ AddExtensionToPrimaryPanel()

HRESULT IUI::AddExtensionToPrimaryPanel ( [in] IUIPanelExtension pUIPanelExtension)

Adds a UI panel extension to the primary application panel.

Parameters
[in]pUIPanelExtensionThe UI panel extension to add.

◆ AddToolButtonToActionsPanel()

HRESULT IUI::AddToolButtonToActionsPanel ( [in] IAction pAction,
[in] enum ViewType  viewType_ 
)

Adds a tool button to the Actions application panel.

Parameters
[in]pActionThe action to associate with the new button.
[in]viewType_The specific type of the view to add the button to.

◆ CreateAction()

HRESULT IUI::CreateAction ( [out, retval] IAction **  ppAction)

Creates a new action object.

Parameters
[out]ppActionThe action interface which references the new action.
See also
GetAction()

◆ CreateActionWithId()

HRESULT IUI::CreateActionWithId ( [in] GUID  id,
[out, retval] IAction **  ppAction 
)

Creates a new action object with the specified identifier.

Parameters
[in]idThe unique identifier of the action
[out]ppActionThe action interface which references the new action.
See also
GetAction()

◆ CreateContextMenu()

HRESULT IUI::CreateContextMenu ( [out, retval] IContextMenu **  ppContextMenu)

Creates a new context menu.

Parameters
[out]ppContextMenuThe new context menu.
See also
AddContextMenu()

◆ CreateDropDownButton()

HRESULT IUI::CreateDropDownButton ( [out, retval] IDropDownButton **  ppDropDownButton)

Creates a drop-down button.

Parameters
[out]ppDropDownButtonThe drop-down button interface which references the new drop-down button.

◆ CreateImage()

HRESULT IUI::CreateImage ( [out, retval] IImage **  ppImage)

Creates an image.

Parameters
[out]ppImageThe new image.
See also
IAction::Icon

◆ CreateSplitButton()

HRESULT IUI::CreateSplitButton ( [in] IAction pDefaultAction,
[out, retval] ISplitButton **  ppSplitButton 
)

Creates a split button.

Parameters
[in]pDefaultActionThe action to trigger when user clicks on the primary button
[out]ppSplitButtonThe split button interface which references the new split button.

◆ CreateUIPanelExtension()

HRESULT IUI::CreateUIPanelExtension ( [out, retval] IUIPanelExtension **  ppUIPanelExtension)

Creates an extension for a UI panel.

Parameters
[out]ppUIPanelExtensionThe action interface which references the new panel extension.

◆ GetAction()

HRESULT IUI::GetAction ( [in] GUID  id,
[out, retval] IAction **  ppAction 
)

Returns an existing action by the given id.

Parameters
[in]idThe unique identifier of the action.
[out]ppActionThe requested action interface if there exists one; nullptr otherwise.
See also
CreateAction(), CreateActionWithId()

◆ ShowMessageBox()

HRESULT IUI::ShowMessageBox ( [in] enum MessageIcon  icon_,
[in] BSTR  title_,
[in] BSTR  text_ 
)

Shows a modal message box with the given icon, title and text and the Close button.

When a message box is shown, users cannot interact with any other Renga's windows until the box is closed.

Note
This method should not be called from any threads other than the ones run by Renga.
Parameters
[in]icon_The message box icon.
[in]title_The message box title.
[in]text_The message text.

◆ ShowOpenFileDialog()

HRESULT IUI::ShowOpenFileDialog ( [in] BSTR  title_,
[in] BSTR  defaultPath,
[in] BSTR  filter,
[out, retval] BSTR *  pFileName 
)

Shows the Open File dialog and returns the name of an existing file selected by user.

Parameters
[in]title_The localized dialog title.
[in]defaultPathThe working directory of the dialog. If defaultPath includes a file name, the file will be selected initially. The defaultPath may be empty.
[in]filterFilters determine which files to show in the dialog. A filter consists of the filter name followed by a space-separated list of filename wildcard patterns, enclosed in parentheses. To supply multiple filters, separate them with two semicolons. For example:

"Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)"

To show all files, pass an empty string.
[out]pFileNameThe file name selected by user. If the user has pressed the Cancel or Close button instead, an empty string is returned.

◆ ShowSaveFileDialog()

HRESULT IUI::ShowSaveFileDialog ( [in] BSTR  title,
[in] BSTR  defaultPath,
[in] BSTR  filter,
[out, retval] BSTR *  pFileName 
)

Shows the Save File dialog and returns the file name selected by user.

Parameters
[in]titleThe localized dialog title.
[in]defaultPathThe working directory of the dialog. If defaultPath includes a file name, the file will be selected initially. The defaultPath may be empty.
[in]filterFilters determine which files to show in the dialog. A filter consists of the filter name followed by a space-separated list of filename wildcard patterns, enclosed in parentheses. To supply multiple filters, separate them with two semicolons. For example:

"Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)"

To show all files, pass an empty string.
[out]pFileNameThe file name selected by user; the file does not have to exist. If the user has pressed the Cancel or Close button instead, an empty string is returned.