Sharpdialogs Library
The purpose of the Sharpdialogs library is to provide often used popup menu and dialog functionality to the shell.
By using this library all parts of SharpE are able to easily use the same dialogs and menus.
Dll header file: svn\common\libraries\SharpDialogs\SharpDialogs.pas
Target/Link selection popup
The target selection popup menu is a menu designed to quickly select a target for any link. The menu is making use of the SharpE exec.service which makes it possible to select more than just links to files.
By using this menu you will get a popup menu with up to 5 menu items. In the popup menu you can select:
- Files (including recent/most used files)
- Drives
- Directories (including shell folders)
- Scripts
- SharpE actions
The syntax for using the popup menu is:
function TargetDialog(TargetItems : TTargetDialogSelectItems; PopupPoint : TPoint) : PChar;
By using the Targetitems parameter it is possible to change which items are visible in the menu.
The parameter can be a set of stiFile,stiRecentFiles,stiMostUsedFiles,stiDrive,stiDirectory,stiShellFolders,stiScript,stiAction.
To display all menu items use the constant STI_ALL_TARGETS as parameter.
With the Popuppoint parameter you can specify the on screen coordinates where to display the popup menu.
The return value of the function is the selected target.
example:
TargetDialog([stiFile,stiRecentFiles,stiMostUsedFiles,stiDrive], Point(100,100)); TargetDialog(STI_ALL_TARGETS,Point(0,0));
Icon selection popup
The Icon selection popup menu is a menu designed to quickly select an icon.
By using this menu you will get a popup menu with up to 3 menu items. In the popup menu you can select:
- Shell Icon
- SharpE Icon (lists all icons of the current SharpE icon set)
- Custom Icon
The syntax for using the popup menu is:
function IconDialog(pTarget : String; IconItems : TIconMenuSelectItems; PopupPoint : TPoint) : PChar;
The ptarget parameter only has to be used when selecting a shell icon is enabled. It will specify the target for which the shell icon will be displayed.
By using the Iconitems parameter it is possible to change which items are visible in the menu.
The parameter can be a set of smiShellIcon,smiCustomIcon,smiSharpEIcon.
To display all menu items use the constant SMI_ALL_ICONS as parameter.
With the Popuppoint parameter you can specify the on screen coordinates where to display the popup menu.
The return value of the function is a SharpE Icon String which can be converted to a bitmap by using the IconStringToIcon function.
example:
IconDialog('',[smiCustomIcon,smiSharpEIcon], Point(100,100)); IconDialog('C:\SharpE\SharpBar.exe',SMI_ALL_ICONS,Point(0,0));
