The IDMTBarButtonItem class represents tool-bar-button-specific items in a direct manipulation. Tool bars create objects of the IDMTBarButtonItem class when one of the following occurs:
This class provides virtual functions that implement direct manipulation support for tool bar buttons. You can derive item classes to support the direct manipulation of tool bar button items if the default Open Class Library support does not meet your requirements.
You can construct and destruct objects of this class.
![]() |
public:
virtual ~IDMTBarButtonItem()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IDMTBarButtonItem(const IDMItem::Handle& dragItem)
Use this constructor to construct IDMToolBarButtonItem objects for the target of a direct manipulation. It is called by the member function, IDMItemProviderFor::provideTargetItemFor, of the tool bar button's item provider for the tool bar button item class.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IDMTBarButtonItem(IDMSourceOperation* sourceOperation)
Use this constructor to construct IDMToolBarButtonItem objects for the source of a direct manipulation. It is called by the member function, IDMTBarButtonItem::generateSourceItems.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members during the drop operation of a direct manipulation.
![]() |
public:
virtual bool targetDrop(IDMTargetDropEvent& event)
Implements tool-bar-button-item-specific rendering when the drag item that represents a tool bar button object, a menu item object, or a bitmap file object is dropped on a tool bar button. This function processes the drop in one of the following ways:
Derived classes should override this function if the default support
does not meet your requirements.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members for tool bar button deletion when a tool bar button item is dropped on the system shredder.
![]() |
public:
virtual bool sourceDiscard(IDMSourceDiscardEvent& event)
Implements tool-bar-button-item-specific rendering when the operating system issues a discard request.
Derived classes should override this function when the default support does not meet your requirements.
Windows | OS/2 | AIX |
Ignored | Yes | Ignored |
This function deletes the tool bar button object that is dropped on the Workplace Shell shredder object.
Use these members to query the source and target tool bar and the tool bar buttons.
![]() |
public:
virtual IToolBar* sourceToolBar() const
Returns the tool bar that contains the source tool bar button.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IToolBarButton* sourceToolBarButton() const
Returns the source tool bar button where the direct manipulation started.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IToolBar* targetToolBar() const
Returns the tool bar that contains the target tool bar button.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IToolBarButton* targetToolBarButton() const
Returns the target tool bar button where the drop occurred.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to access and manipulate source items involved in a direct manipulation.
![]() |
public:
static bool generateSourceItems( IDMSourceOperation* sourceOperation )
Generates a tool bar button item that represents a tool bar button item object.
This function is called by the tool bar button's implementation of IDMItemProvider::provideSourceItems in the template class IDMItemProviderFor.
The default implementation of this function in this class creates IDMTBarButtonItem objects and adds them to the source operation. If you use the IDMItemProviderFor template class and you have defined a derived item class, you must implement IDMTBarButtonItem::generateSourceItems in your derived tool bar button item class. In your implementation, create an object of your derived tool bar button item class and call IDMOperation::addItem to add the objects to the source operation.
The default drag operation for tool bar button items is
IDMItem::moveable.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set the supported direct manipulation operations for this class.
![]() |
public:
virtual unsigned long supportedOperationsFor( const IString& selectedRMFs ) const
Returns IDMItem::moveable as the only operation the tool bar button item supports.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
virtual ~IDMItem()
virtual IDMItem& addRMF( const IString& rm, const IString& rf )
virtual IDMItem& addRMF(const IString& rmf)
virtual IDMItem& addType(const char* aType)
static void appendRMF(IString& rmfs, const IString& rmf)
virtual unsigned long attributes() const
virtual bool canBeCopied() const
virtual bool canBeLinked() const
virtual bool canBeMoved() const
static IString compressedRMFs(const IString& rmfs)
virtual IString containerName() const
virtual IString contents() const
virtual unsigned long contentsSize() const
static void deleteRMF(IString& rmfs, const IString& rmf)
DropIndicator dropStatus() const
virtual IDMItem& enableCopy(bool copyable = true)
virtual IDMItem& enableLink(bool linkable = true)
virtual IDMItem& enableMove(bool moveable = true)
bool hasImage() const
virtual bool hasType(const char* aType) const
IDMItem( IDMTargetOperation* targetOperation, _DRAGITEM* dragItem )
IDMItem(const IDMItem& dragItem)
IDMItem(const Handle& item)
IDMItem( IDMSourceOperation* sourceOperation, const IString& types, const unsigned long supportedOperations = unknown, const unsigned long attributes = none )
virtual IDMImage& image()
virtual ISize imageOffset() const
virtual bool isContainer() const
virtual bool isGroup() const
virtual bool isOnRemovableMedia() const
virtual bool isOpen() const
virtual bool isReference() const
bool isTargetTheSource() const
static IString matchingRMFs( const IString& rmfs1, const IString& rmfs2, bool firstOnly = false )
virtual IString nativeRF() const
virtual IString nativeRM() const
virtual IString nativeRMF() const
virtual void* object() const
IDMItem& operator =(const IDMItem& item)
Handle operator =(const Handle& item)
virtual IDMItem& removeRMF( const IString& rm, const IString& rf )
virtual IDMItem& removeRMF(const IString& rmf)
virtual IDMItem& removeType(const char* aType)
unsigned renderer() const
virtual bool requiresPreparation() const
static IString rfForThisProcess()
static IString rfFrom(const IString& rmf)
static IString rmfFrom( const IString& rm, const IString& rf )
static IString rmFrom(const IString& rmf)
virtual IString rmfs() const
static IString rmfsFrom(const IString& rmfs)
static IString rmfsFrom( const IString& rm, const IString& rf )
IString selectedRMF() const
virtual IDMItem& setContainer(bool container = true)
IDMItem& setContainerName(const char* containerName)
virtual bool setContents(const IString& data)
IDMItem& setDropStatus(DropIndicator status)
virtual IDMItem& setGroup(bool group = true)
virtual IDMItem& setImage(IDMImage& image)
virtual IDMItem& setNativeRMF(const IString& rmf)
virtual IDMItem& setNativeRMF( const IString& rm, const IString& rf )
virtual IDMItem& setObject(void* pointerToObject)
virtual IDMItem& setOnRemovableMedia( bool onRemovableMedia = true )
virtual IDMItem& setOpen(bool open = true)
virtual IDMItem& setReference(bool reference = true)
IDMItem& setRenderer(unsigned position)
virtual IDMItem& setRequiresPreparation( bool requiresPrep = true )
virtual IDMItem& setRMFs(const IString& rmfs)
IDMItem& setSelectedRMF(const IString& rmf)
IDMItem& setSourceName(const char* sourceName)
IDMItem& setSourceWindowHandle(IWindowHandle window)
IDMItem& setTargetName(const char* targetName)
virtual IDMItem& setTrueType(const char* aType)
virtual IDMItem& setTypes(const char* types)
virtual bool sourceEnd(IDMSourceEndEvent& event)
static Handle sourceItemFor(const Handle& targetItem)
virtual IString sourceName() const
virtual IDMSourceOperation* sourceOperation()
virtual bool sourcePrepare(IDMSourcePrepareEvent& event)
virtual bool sourcePrint(IDMSourcePrintEvent& event)
virtual bool sourceRender(IDMSourceRenderEvent& event)
virtual IWindow* sourceWindow() const
virtual IWindowHandle sourceWindowHandle() const
virtual unsigned long supportedOperations() const
virtual bool supportsRMF( const IString& rm, const IString& rf )
virtual bool supportsRMF(const IString& rmf)
virtual bool targetEnd(IDMTargetEndEvent& event)
virtual IString targetName() const
virtual IDMTargetOperation* targetOperation()
unsigned long tokenForWPSObject() const
virtual IString trueType() const
virtual IString types() const
void addRef()
unsigned long count() const
void removeRef()
static const unsigned long container
static const unsigned long copyable
static const unsigned long group
static const unsigned long linkable
static const unsigned long moveable
static const unsigned long none
static const unsigned long open
static const unsigned long prepare
static const unsigned long reference
static const unsigned long removableMedia
static const unsigned long unknown
virtual ~IMRefCounted()
IMRefCounted(const IMRefCounted&)
IMRefCounted()
IMRefCounted& operator =(const IMRefCounted&)
IString generateSourceName()
IString strContents