com.esri.arcgis.controls
Interface IToolbarControl2

All Superinterfaces:
IToolbarControl, Serializable
All Known Implementing Classes:
IToolbarControl2Proxy, ToolbarControl

public interface IToolbarControl2
extends IToolbarControl, Serializable

Provides access to members that control the ToolbarControl.

Description

The IToolbarControl2 interface provides additional members for tasks related to the ToolbarControl, such as setting appearance properties, showing any hidden items on a hidden items menu, and saving and loading the contents of the ToolbarControl.

Product Availability

Available with ArcGIS Engine.


Method Summary
 int getBackColor()
          Background color of the ToolbarControl.
 int getFadeColor()
          Background fade color of the ToolbarControl.
 int getFillDirection()
          The fill direction of the ToolbarControl background color.
 int getIconSize()
          The size in pixels of icons displayed on the ToolbarControl.
 int getOrientation()
          Indicates if the ToolbarControl is horizontally or vertically aligned.
 boolean isAlignLeft()
          Indicates if the ToolbarControl displays menu and palette items aligned to the left or right.
 boolean isShowHiddenItems()
          Indicates if the ToolbarControl has a hidden items menu containing items currently not visible.
 boolean isThemedDrawing()
          Indicates if the ToolbarControl uses themed drawing.
 boolean isTransparent()
          Indicates if the ToolbarControl has a transparent background.
 void loadItems(IStream pStream)
          Loads items into the ToolbarControl from a previously saved stream.
 void saveItems(IStream pStream)
          Saves the ToolbarControl items into a stream.
 void setAlignLeft(boolean pVal)
          Indicates if the ToolbarControl displays menu and palette items aligned to the left or right.
 void setBackColor(int pclr)
          Background color of the ToolbarControl.
 void setFadeColor(int pVal)
          Background fade color of the ToolbarControl.
 void setFillDirection(int pVal)
          The fill direction of the ToolbarControl background color.
 void setIconSize(int pVal)
          The size in pixels of icons displayed on the ToolbarControl.
 void setOrientation(int pVal)
          Indicates if the ToolbarControl is horizontally or vertically aligned.
 void setShowHiddenItems(boolean pVal)
          Indicates if the ToolbarControl has a hidden items menu containing items currently not visible.
 void setThemedDrawing(boolean pVal)
          Indicates if the ToolbarControl uses themed drawing.
 void setTransparent(boolean pVal)
          Indicates if the ToolbarControl has a transparent background.
 
Methods inherited from interface com.esri.arcgis.controls.IToolbarControl
aboutBox, addItem, addMenuItem, addToolbarDef, esri_isEnabled, esri_setEnabled, find, getAppearance, getBorderStyle, getBuddy, getCommandPool, getCount, getCurrentTool, getCustomProperty, getHWnd, getItem, getItemAppearance, getItemRect, getKeyIntercept, getMouseIcon, getMousePointer, getObject, getOperationStack, getTextAlignment, getUpdateInterval, hitTest, isCustomize, isLargeIcons, isMenuTracking, isToolTips, moveItem, remove, removeAll, setAppearance, setBorderStyle, setBuddyControl, setCommandPoolByRef, setCurrentToolByRef, setCustomize, setCustomProperty, setItemAppearance, setKeyIntercept, setLargeIcons, setMenuTracking, setMouseIconByRef, setMousePointer, setOperationStackByRef, setTextAlignment, setToolTips, setUpdateInterval, update
 

Method Detail

setBackColor

void setBackColor(int pclr)
                  throws IOException,
                         AutomationException
Background color of the ToolbarControl.

Product Availability

Available with ArcGIS Engine.

Parameters:
pclr - The pclr (A COM typedef) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBackColor

int getBackColor()
                 throws IOException,
                        AutomationException
Background color of the ToolbarControl.

Description

Returns or sets the background color of the ToolbarControl. By default BackColor is set to the Windows System '3D Objects' color. Internally the OLE_Color is stored as a long integer where the value may be calculated for any RGB combination as follows:

OLE_Color = (Red) + (Green * 256) + (Blue * 256 * 256)

Where Red, Green and Blue are Long Integers within the range 0 - 255.

If the BackColor is different to the FadeColor the ToolbarControl background will be shaded between the BackColor and FadeColor by the FillDirection.

Remarks

The BackColor, FadeColor and FillDirection properties do not affect the visual appearance of the ToolbarControl when Transparent is set to true.

When ThemedDrawing is false the background color of any items on the ToolbarControl is an alpha blend of the BackColor and the Windows System '3D Highlight' color. When ThemedDrawing is true the system controls the background color.

Product Availability

Available with ArcGIS Engine.

Returns:
The pclr (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOrientation

int getOrientation()
                   throws IOException,
                          AutomationException
Indicates if the ToolbarControl is horizontally or vertically aligned.

Description

Returns or sets the orientation of a ToolbarControl. By default the orientation is horizontal.

Remarks

When a ToolControl is added to a ToolbarControl with a vertical orientation, the ToolControl displays as a button. Clicking the button displays the ToolControl in a seperate window. The ToolControl window can be closed interactively by the end user, or programmatically using the ICompletionNotify::SetComplete method.

Product Availability

Available with ArcGIS Engine.

Returns:
A com.esri.arcgis.controls.esriToolbarOrientation constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setOrientation

void setOrientation(int pVal)
                    throws IOException,
                           AutomationException
Indicates if the ToolbarControl is horizontally or vertically aligned.

Product Availability

Available with ArcGIS Engine.

Parameters:
pVal - A com.esri.arcgis.controls.esriToolbarOrientation constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isThemedDrawing

boolean isThemedDrawing()
                        throws IOException,
                               AutomationException
Indicates if the ToolbarControl uses themed drawing.

Description

Determines whether items on the ToolbarControl display themselves using the current Windows XP theme. This property is false by default, and items display themselves on the ToolbarControl with the Windows Classic look.

Product Availability

Available with ArcGIS Engine.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setThemedDrawing

void setThemedDrawing(boolean pVal)
                      throws IOException,
                             AutomationException
Indicates if the ToolbarControl uses themed drawing.

Product Availability

Available with ArcGIS Engine.

Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFadeColor

int getFadeColor()
                 throws IOException,
                        AutomationException
Background fade color of the ToolbarControl.

Description

Returns or sets the fade color of the ToolbarControl. By default FadeColor is set to the Windows System '3D Objects' color. Internally the OLE_Color is stored as a long integer where the value may be calculated for any RGB combination as follows:

OLE_Color = (Red) + (Green * 256) + (Blue * 256 * 256)

Where Red, Green and Blue are Long Integers within the range 0 - 255.

If the FadeColor is different to the BackColor the ToolbarControl background will be shaded between the BackColor and FadeColor by the FillDirection.

Remarks

The BackColor, FadeColor and FillDirection properties do not affect the visual appearance of the ToolbarControl when Transparent is set to true.

When ThemedDrawing is false the background color of any items on the ToolbarControl is an alpha blend of the BackColor and the Windows System '3D Highlight' color. When ThemedDrawing is true the system controls the background color.

Product Availability

Available with ArcGIS Engine.

Returns:
The pVal (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFadeColor

void setFadeColor(int pVal)
                  throws IOException,
                         AutomationException
Background fade color of the ToolbarControl.

Product Availability

Available with ArcGIS Engine.

Parameters:
pVal - The pVal (A COM typedef) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFillDirection

int getFillDirection()
                     throws IOException,
                            AutomationException
The fill direction of the ToolbarControl background color.

Description

Returns or sets the fill direction used to shade the background color of the ToolbarControl between the BackColor and FadeColor. By default a horizontal fill direction will be set.

Remarks

The BackColor, FadeColor and FillDirection properties do not affect the visual appearance of the ToolbarControl when Transparent is set to true.

When ThemedDrawing is false the background color of any items on the ToolbarControl is an alpha blend of the BackColor and the Windows System '3D Highlight' color. When ThemedDrawing is true the system controls the background color.

Product Availability

Available with ArcGIS Engine.

Returns:
A com.esri.arcgis.controls.esriToolbarFillDirection constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFillDirection

void setFillDirection(int pVal)
                      throws IOException,
                             AutomationException
The fill direction of the ToolbarControl background color.

Product Availability

Available with ArcGIS Engine.

Parameters:
pVal - A com.esri.arcgis.controls.esriToolbarFillDirection constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isTransparent

boolean isTransparent()
                      throws IOException,
                             AutomationException
Indicates if the ToolbarControl has a transparent background.

Description

Determines whether the background of the ToolbarControl is transparent. This property is false by default.

When Transparent is true, the parent window containing the ToolbarControl must not clip children windows for transparency to work. This ensures the area of the window under the ToolbarControl gets painted.

Remarks

The BackColor, FadeColor and FillDirection properties do not affect the visual appearance of the ToolbarControl when Transparent is set to true.

Product Availability

Available with ArcGIS Engine.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTransparent

void setTransparent(boolean pVal)
                    throws IOException,
                           AutomationException
Indicates if the ToolbarControl has a transparent background.

Product Availability

Available with ArcGIS Engine.

Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isShowHiddenItems

boolean isShowHiddenItems()
                          throws IOException,
                                 AutomationException
Indicates if the ToolbarControl has a hidden items menu containing items currently not visible.

Description

Determines whether any hidden items on the ToolbarControl are visible on a 'hidden items menu' when the button containing two chevrons is clicked by the end user. By default this property is false.

When ShowHiddenItems is false, the last visible item on the ToolbarControl may be partially visible only (and all subsequent items will be inaccessible) depending on the size of the ToolbarControl .

Remarks

The 'hidden items menu' can only be displayed at runtime, when the ToolbarControl is not in Customize mode.

Product Availability

Available with ArcGIS Engine.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setShowHiddenItems

void setShowHiddenItems(boolean pVal)
                        throws IOException,
                               AutomationException
Indicates if the ToolbarControl has a hidden items menu containing items currently not visible.

Product Availability

Available with ArcGIS Engine.

Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getIconSize

int getIconSize()
                throws IOException,
                       AutomationException
The size in pixels of icons displayed on the ToolbarControl.

Description

The size in pixels that each item on the ToolbarControl will display the ICommand::Bitmap property. By default bitmaps are stretched to a size of 16 x 16 pixels. The minimum IconSize allowed is 8.

Remarks

IconSize may not affect the size of an item on the ToolbarControl that contains an object implementing IToolControl. Whether the ToolControl responds to the resize depends on its implementation.

Product Availability

Available with ArcGIS Engine.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setIconSize

void setIconSize(int pVal)
                 throws IOException,
                        AutomationException
The size in pixels of icons displayed on the ToolbarControl.

Product Availability

Available with ArcGIS Engine.

Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isAlignLeft

boolean isAlignLeft()
                    throws IOException,
                           AutomationException
Indicates if the ToolbarControl displays menu and palette items aligned to the left or right.

Description

Determines whether ToolbarMenu and ToolbarPalette items (and any sub menus they contain) on the ToolbarControl popup in a position aligned to the left of the ToolbarControl. This property is true by default.

Remarks

If a ToolbarMenu or ToolbarPalette is to popup in a position so close to edge of a screen display, that it will not be fully visible, the AlignLeft property will be ignored. The ToolbarMenu or ToolbarPalette will popup aligned in a direction that will ensure it is fully visible.

AlignLeft does not affect the alignment of an ICommand::Caption, IToolbarMenu::Caption or IToolbarPalette::Caption displayed on a ToolbarItem. In order to change the direction text is displayed the RTL (right to left) display environment variable need changing. The AlignLeft property will override any RTL (right to left) display environment variables that affect the position of drop downs.

Product Availability

Available with ArcGIS Engine.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAlignLeft

void setAlignLeft(boolean pVal)
                  throws IOException,
                         AutomationException
Indicates if the ToolbarControl displays menu and palette items aligned to the left or right.

Product Availability

Available with ArcGIS Engine.

Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

loadItems

void loadItems(IStream pStream)
               throws IOException,
                      AutomationException
Loads items into the ToolbarControl from a previously saved stream.

Description

Loads the specified items into the ToolbarControl. Any items on the ToolbarControl before the LoadItems method is used, will be removed and replaced by the contents of the stream.

Use the LoadItems method in conjunction with the IBlobStream::LoadFromFile method to load any previously saved customizations made to the ToolbarControl by a user with the CustomizeDialog. The stream can be saved into a users profile using the SaveItems method, when an application exits, and the items loaded back into the ToolbarControl when the application is restarted using the LoadItems method.

Product Availability

Available with ArcGIS Engine.

Parameters:
pStream - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

saveItems

void saveItems(IStream pStream)
               throws IOException,
                      AutomationException
Saves the ToolbarControl items into a stream.

Description

Persists the any items on the ToolbarControl out as a MemoryBlobStream.

Use the SaveItems method in conjunction with the IBlobStream::SaveToFile method to save any customizations made to the ToolbarControl by a user with the CustomizeDialog. The stream can be saved into a users profile, when an application exits, and the items loaded back into the ToolbarControl when the application is restarted using the LoadItems method.

Product Availability

Available with ArcGIS Engine.

Parameters:
pStream - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.