IMMPlayerPanel is a device player panel that contains various buttons for
controlling the device. It can be constructed directly or inherited if finer device
control or more functionality is needed. The user is presented with a generic interface,
sufficient to control most multimedia devices. The following figure shows an IMMPlayerPanel
with device type of digital video.
Not only does it create the buttons and organize them, but it also makes the actual function call for the button. For example, the play button calls the play function on whatever device is currently set into the player panel. Also, there is some intelligent processing for disabling and enabling the buttons. For example, if the device is stopped, the stop and pause buttons are disabled. Or, if the device is playing and the user presses the pause button, the pause button stays pressed in the down (latched) state and the play button is unlatched. If the user then presses the pause button again, the pause button is unlatched and the play button is latched. The player panel automatically attaches an IMMPlayerPanelHandler object to provide default behavior. See IMMPlayerPanelHandler for more information on the default processing for each of the buttons and for how to change the default behavior.
If you create the IMMPlayerPanel without passing in a device type, you get the default buttons, which are rewind, stop, pause, play, and fast forward. If you pass in overlay, videoDisc animation, or digitalVideo, you also get step forward and step backward buttons.
IMMPlayerPanel is implemented using a set of buttons on an IMultiCellCanvas. The canvas is set up with all of the default behavior and styles of the multicell canvas, and none of the rows or columns is made expandable. The buttons are added to the multicell canvas in the following coordinates:
By knowing where the buttons are, you can easily extend this class by
using
addToCell
to add a vacant cell and to add a command handler to
your object of this class to process the new buttons.
Note:
You can construct and destruct objects of this class.
![]() |
public:
virtual ~IMMPlayerPanel()
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
IMMPlayerPanel( unsigned long identifier, IWindow* parent, IWindow* owner, unsigned long deviceType = IMMDevice::other, const IRectangle& initial = IRectangle ( ), const IMultiCellCanvas::Style& style = IMultiCellCanvas::defaultStyle ( ) )
You can construct objects of this class using the following parameters:
We recommend that you do one of the following:
Windows | OS/2 | AIX |
Yes | Yes | No |
The window identifier is limited to the range 0 through 65535.
The owner window is primarily used for routing notification events and unprocessed messages. The operating system also uses the owner window chain to inherit colors.
Use these members to access the buttons on the player panel.
![]() |
public:
IAnimatedButton* fastForwardButton() const
Returns a pointer to the fast forward animated button.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
IAnimatedButton* pauseButton() const
Returns a pointer to the pause animated button.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
IAnimatedButton* playButton() const
Returns a pointer to the play animated button.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
IAnimatedButton* rewindButton() const
Returns a pointer to the rewind animated button.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
IAnimatedButton* stepBackwardButton() const
Returns a pointer to the step backward animated button.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
IAnimatedButton* stepForwardButton() const
Returns a pointer to the step forward animated button.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
IAnimatedButton* stopButton() const
Returns a pointer to the stop animated button.
Windows | OS/2 | AIX |
Yes | Yes | No |
Use these members to query and set the device that the player panel is going to control and to query the type of device that is being controlled.
![]() |
public:
unsigned long deviceType() const
Returns the type of device this player panel was created for. See the valid device types in IMMDevice.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
IMMPlayableDevice* playableDevice() const
Returns a pointer to the IMMPlayableDevice the player is controlling. This allows the application to determine which device is set into the player panel.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
IMMPlayerPanel& setPlayableDevice( IMMPlayableDevice* device )
Sets a pointer to the IMMPlayableDevice that the player panel will control. This allows the player panel to control almost any device that the user wants. For example, you might want to control a digital video device. If so, you would create an IMMDigitalVideo device and pass it on this call. When the user presses the player panel buttons, such as play or pause, these functions would act upon that IMMDigitalVideo device.
Windows | OS/2 | AIX |
Yes | Yes | No |
virtual ~ICanvas()
virtual ICanvas& addBorder()
virtual IColor backgroundColor() const
virtual IColor borderColor() const
IText borderText() const
IPoint bottomRightLayoutOffset() const
virtual IFont font() const
virtual bool hasBorder() const
ICanvas( unsigned long windowIdentifier, IWindow* parent, IWindow* owner, const IRectangle& initial = IRectangle ( ), const Style& style = defaultStyle ( ) )
virtual bool isTabStop() const
virtual IWindowHandle matchForMnemonic( unsigned short character ) const
virtual ICanvas& removeBorder()
virtual ICanvas& resetBorderColor()
virtual ICanvas& resetFont()
virtual ICanvas& setBorderColor(const IColor& borderColor)
virtual ICanvas& setBorderText( const IText& borderText, bool showBorder = true )
virtual ICanvas& setBorderText( const IResourceId& borderText, bool showBorder = true )
virtual ICanvas& setFont(const IFont& font)
virtual ICanvas& setLayoutDistorted( unsigned long layoutAttributesOn, unsigned long layoutAttributesOff )
IPoint topLeftLayoutOffset() const
virtual ~IControl()
virtual ~IMultiCellCanvas()
virtual IMultiCellCanvas& addToCell( IWindow* childWindow, unsigned long startingColumn, unsigned long startingRow, unsigned long numberOfColumns = 1, unsigned long numberOfRows = 1 )
unsigned long columnWidth(unsigned long column) const
virtual unsigned long convertToGUIStyle( const IBitFlag& style, bool extendedOnly = false ) const
static ISize defaultCell()
static Style defaultStyle()
virtual IMultiCellCanvas& disableDragLines()
virtual IMultiCellCanvas& disableGridLines()
virtual IMultiCellCanvas& enableDragLines( bool enable = true )
virtual IMultiCellCanvas& enableGridLines( bool enable = true )
virtual bool hasChildrenToLayout() const
bool hasDragLines() const
bool hasGridLines() const
IMultiCellCanvas( unsigned long windowIdentifier, IWindow* parent, IWindow* owner, const IRectangle& initialSize = IRectangle ( ), const Style& style = defaultStyle ( ) )
bool isColumnExpandable(unsigned long column) const
bool isRowExpandable(unsigned long row) const
virtual IWindow* removeFromCell( unsigned long column, unsigned long row )
virtual IWindow* removeFromCell(IWindow* childWindow)
unsigned long rowHeight(unsigned long row) const
virtual IMultiCellCanvas& setColumnWidth( unsigned long column, unsigned long widthInPixels, bool expandable = false )
static void setDefaultCell(const ISize& widthAndHeight)
static void setDefaultStyle(const Style& style)
virtual IMultiCellCanvas& setLayoutDistorted( unsigned long layoutAttributesOn, unsigned long layoutAttributesOff )
virtual IMultiCellCanvas& setRowHeight( unsigned long row, unsigned long heightInPixels, bool expandable = false )
virtual IWindow* windowInCell( unsigned long startingColumn, unsigned long startingRow ) const
virtual ~INotifier()
virtual INotifier& disableNotification() = 0
virtual INotifier& enableNotification( bool enable = true ) = 0
INotifier()
virtual bool isEnabledForNotification() const = 0
virtual INotifier& notifyObservers( const INotificationEvent& event ) = 0
virtual INotifier& notifyObserversAsync( const INotificationEvent& event )
const IThreadId& threadId() const
virtual ~IWindow()
IAccelTblHandle acceleratorHandle() const
IAcceleratorTable acceleratorTable() const
virtual IColor activeColor() const
IWindow& addOrReplaceAttribute( const IAttributeName& name, const IAttribute& attribute )
IWindow& adoptWindowData( const DataHandle& typeToken, IWindowData* windowData )
virtual IString asDebugInfo() const
virtual IString asString() const
IAttributeName attributeNameAt( const AttributeCursor& cursor ) const
const IAttribute* attributeWithName( const IAttributeName& name, ESearchType search = kWindowOnly ) const
virtual IWindow& capturePointer(bool capture = true)
ISize characterSize() const
IWindowHandle childAt(const ChildCursor& cursor) const
IWindow* childWindowAt(const ChildCursor& cursor) const
virtual IArgList convertToArgList( const IBitFlag& style ) const
static DataHandle dataHandleWithKey( const char* dataKeyName )
virtual IWindowHandle defaultEmphasisButton() const
static SiblingOrder defaultOrdering()
static IWindow* desktopWindow()
virtual IWindow& disable()
virtual IColor disabledBackgroundColor() const
virtual IColor disabledForegroundColor() const
virtual IWindow& disableGroup()
IWindow& disableMinimumSizeCaching()
virtual IWindow& disableNotification()
virtual IWindow& disableTabStop()
virtual IWindow& disableUpdate()
bool dispatchRemainingHandlers( IEvent& event, bool callDefProc = true )
virtual IWindow& enable(bool enableWindow = true)
virtual IWindow& enableGroup(bool enable = true)
IWindow& enableMinimumSizeCaching( bool enableCaching = true )
virtual IWindow& enableNotification(bool enable = true)
virtual IWindow& enableTabStop(bool enable = true)
virtual IWindow& enableUpdate(bool enableWindow = true)
static IWindow::ExceptionFn* exceptionFunction()
virtual IColor foregroundColor() const
virtual IWindowHandle handle() const
virtual bool handleException( IException& dispatcherException, IEvent& exceptionEvent )
virtual IWindowHandle handleForChildCreation() const
static IWindowHandle handleWithParent( unsigned long identifier, const IWindowHandle& parent )
static IWindowHandle handleWithPointerCaptured()
virtual bool hasFocus() const
virtual bool hasPointerCaptured() const
unsigned long helpId() const
virtual IWindow& hide()
virtual IWindow& hideSourceEmphasis()
virtual IColor hiliteBackgroundColor() const
virtual IColor hiliteForegroundColor() const
virtual unsigned long id() const
virtual IColor inactiveColor() const
virtual IRectangle invalidatedRect() const
virtual IRegionHandle invalidatedRegion() const
bool isAutoDeleteObject() const
bool isAutoDestroyWindow() const
bool isEnabled() const
virtual bool isEnabledForNotification() const
virtual bool isFrameWindow() const
virtual bool isGroup() const
bool isHandling(const EventMask& events) const
virtual bool isLayoutDistorted( unsigned long layoutAttribute ) const
bool isMinimumSizeCachingEnabled() const
bool isShowing() const
bool isUpdateEnabled() const
virtual bool isValid() const
bool isVisible() const
static bool isWindowValid(const IWindow* window)
IDMItemProvider* itemProvider() const
IWindow(const IWindowHandle& handle)
IWindow(unsigned long identifier, IWindow* parent)
virtual IRectangle layoutAdjustment() const
static IPoint mapPoint( const IPoint& point, const IWindowHandle& from, const IWindowHandle& to )
IMessageQueueHandle messageQueue() const
ISize minimumSize(bool windowCalculatedSize = false) const
virtual IPointerHandle mousePointer() const
static void movePointerTo(const IPoint& position)
virtual IWindow& moveSizeTo( const IRectangle& newSizeAndPosition )
virtual IWindow& moveTo(const IPoint& newPosition)
virtual IRectangle nativeRect() const
virtual INotifierAddress notifierAddress() const
virtual IWindow& notifyObservers( const INotificationEvent& event )
virtual IWindow& notifyObserversAsync( const INotificationEvent& event )
static IWindow* objectWindow()
virtual IWindow* owner() const
IWindow* parent() const
virtual ISize parentSize() const
static ISize parentSize(const IWindowHandle& windowHandle)
static IPoint pointerPosition()
virtual IPoint position() const
virtual IWindow& positionBehindSibling( const IWindowHandle& siblingWindow )
virtual IWindow& positionBehindSiblings()
virtual IWindow& positionOnSiblings()
virtual const IWindow& postEvent( unsigned long eventId, const IEventParameter1& parm1 = 0, const IEventParameter2& parm2 = 0 ) const
virtual const IWindow& postEvent(const IEvent& event) const
virtual const IWindow& postEvent( EventType eventType, const IEventParameter1& parm1 = 0, const IEventParameter2& parm2 = 0 ) const
virtual IPresSpaceHandle presSpace() const
virtual IRectangle rect() const
virtual IWindow& refresh( const IRectangle& invalidRectangle, bool immediate = false )
virtual IWindow& refresh(RefreshType type = paintAll)
virtual IWindow& releasePointer()
virtual void releasePresSpace( const IPresSpaceHandle& presentationSpaceHandle ) const
IWindow& removeAllAttributes()
IWindow& removeAttribute(const IAttributeName& name)
virtual IWindow& resetActiveColor()
virtual IWindow& resetBackgroundColor()
virtual IWindow& resetDisabledBackgroundColor()
virtual IWindow& resetDisabledForegroundColor()
virtual IWindow& resetFont()
virtual IWindow& resetForegroundColor()
virtual IWindow& resetHiliteBackgroundColor()
virtual IWindow& resetHiliteForegroundColor()
virtual IWindow& resetInactiveColor()
IWindow& resetMinimumSize()
virtual IWindow& resetShadowColor()
virtual IEventResult sendEvent(const IEvent& event) const
virtual IEventResult sendEvent( unsigned long eventId, const IEventParameter1& parm1 = 0, const IEventParameter2& parm2 = 0 ) const
virtual IEventResult sendEvent( EventType eventType, const IEventParameter1& parm1 = 0, const IEventParameter2& parm2 = 0 ) const
IWindow& setAcceleratorHandle( const IAccelTblHandle& handle )
IWindow& setAcceleratorTable( const IAcceleratorTable* acceleratorTable )
virtual IWindow& setActiveColor(const IColor& color)
IWindow& setAutoDeleteObject(bool autoDelete = true)
IWindow& setAutoDestroyWindow(bool autoDestroy = false)
virtual IWindow& setBackgroundColor(const IColor& color)
static void setDefaultOrdering(SiblingOrder order)
virtual IWindow& setDisabledBackgroundColor( const IColor& color )
virtual IWindow& setDisabledForegroundColor( const IColor& color )
static IWindow::ExceptionFn* setExceptionFunction( IWindow::ExceptionFn* exceptionFunction )
virtual IWindow& setFocus()
virtual IWindow& setFont(const IFont& font)
virtual IWindow& setForegroundColor(const IColor& color)
IWindow& setHelpId(unsigned long helpTopicId)
virtual IWindow& setHiliteBackgroundColor( const IColor& color )
virtual IWindow& setHiliteForegroundColor( const IColor& color )
virtual IWindow& setId(unsigned long newIdentifier)
virtual IWindow& setInactiveColor(const IColor& color)
IWindow& setItemProvider(IDMItemProvider* dragProvider)
virtual IWindow& setLayoutDistorted( unsigned long layoutAttributesOn, unsigned long layoutAttributesOff )
IWindow& setMinimumSize(const ISize& size)
virtual IWindow& setMousePointer( const IPointerHandle& mousePointer )
virtual IWindow& setOwner(const IWindow* newOwner)
virtual IWindow& setParent(const IWindow* newParent)
virtual IWindow& setShadowColor(const IColor& color)
virtual IColor shadowColor() const
virtual IWindow& show(bool showWindow = true)
virtual IWindow& showSourceEmphasis(bool show = true)
virtual ISize size() const
virtual IWindow& sizeTo(const ISize& newSize)
IWindow& startHandling(const EventMask& events)
IWindow& stopHandling(const EventMask& events)
virtual IWindow& validateRect( const IRectangle& validatedRectangle )
virtual IWindow& validateRegion( const IRegionHandle& validatedRegion )
virtual IRectangle visibleRectangle() const
IWindowData* windowData(const DataHandle& typeToken) const
static IWindow* windowWithHandle( const IWindowHandle& windowHandle, bool allThreads = true )
static IWindow* windowWithOwner( unsigned long identifier, const IWindow* owner, bool allThreads = true )
static IWindow* windowWithParent( unsigned long identifier, const IWindow* parent, bool allThreads = true )
static INotificationId const activeColorId
static const EventMask allMouseMoves
static INotificationId const attributeAddReplaceId
static INotificationId const attributeRemoveId
static INotificationId const backgroundColorId
static INotificationId const borderColorId
static const Style clipChildren
static const Style clipSiblings
static const Style clipToParent
static INotificationId const commandId
static const Style disabled
static INotificationId const disabledBackgroundColorId
static INotificationId const disabledForegroundColorId
static INotificationId const enableId
static INotificationId const focusId
static INotificationId const fontId
static INotificationId const foregroundColorId
static const Style group
static INotificationId const hiliteBackgroundColorId
static INotificationId const hiliteForegroundColorId
static INotificationId const inactiveColorId
static const Style leftToRight
static const EventMask mouseEntersLeaves
static const Style noStyle
static INotificationId const positionId
static const Style rightToLeft
static const Style saveBits
static INotificationId const shadowColorId
static INotificationId const sizeId
static const EventMask someMouseMoves
static const Style synchPaint
static INotificationId const systemCommandId
static const Style tabStop
static const Style visible
static INotificationId const visibleId
static INotificationId const allChangesId
static INotificationId const deleteId
static const Style border
static INotificationId const textId
static const Style classDefaultStyle
static const Style dragLines
static const Style gridLines
static const Style spaceAddedToLast
IWindow& addHandler(IHandler* newHandler)
virtual IWindow& addObserver( IObserver& observer, const IInterest& interest )
static void addToWindowSet( IWindow* window, const IWindowHandle& windowHandle )
IWindow& bindMessageQueue(bool bindToMessageQueue = true)
IColor color(unsigned long colorArea) const
IColor color( unsigned long colorArea, const IColor& defaultColor ) const
virtual IWindowHandle create( unsigned long id, const char* text, unsigned long style, const char* windowClass, const IWindowHandle& parent, const IWindowHandle& owner, const IRectangle& initRect, const void* ctlData, const void* presParams, IWindow::SiblingOrder ordering = defaultOrdering ( ), unsigned long extendedStyle = 0 )
virtual IWindowHandle create( unsigned long id, const char* text, const IBitFlag& style, const char* windowClass, const IWindow* parent, const IWindow* owner, const IRectangle& initRect, const void* ctlData, const void* presParams, IWindow::SiblingOrder ordering = defaultOrdering ( ) )
virtual IWindowHandle create( unsigned long id, const char* text, unsigned long style, IXmCreateFunction createFunction, const IWindowHandle& parent, const IWindowHandle& owner, const IRectangle& initRect, const void* callerArgList, unsigned int callerNumberArguments, IWindow::SiblingOrder ordering = defaultOrdering ( ), unsigned long extendedStyle = 0 )
virtual IWindowHandle create( unsigned long id, const char* text, const IBitFlag& style, IXmCreateFunction createFunction, const IWindow* parent, const IWindow* owner, const IRectangle& initRect, IWindow::SiblingOrder ordering = defaultOrdering ( ) )
IWindow& defaultProcedure(IEvent& event)
bool deleteIsInProcess() const
bool dispatch(IEvent& event)
virtual unsigned long extendedStyle() const
bool isBoundToMessageQueue() const
virtual bool isDragStarting(IEvent& event)
bool isPrimaryWindow() const
bool isUserWindowWordReserved() const
IWindow()
IWindowNotifyHandler* notificationHandler() const
virtual IWindow& notifyObservers( const INotificationId& notification )
IObserverList& observerList( const IInterest* interest = 0 ) const
virtual IWindow& prepareForUse( const IWindowHandle& windowHandle )
virtual IWindow& removeAllObservers()
static void removeFromWindowSet(IWindow* window)
IWindow& removeHandler(IHandler* oldHandler)
virtual IWindow& removeObserver(IObserver& observer)
virtual IWindow& removeObserver( IObserver& observer, const IInterest& interest )
IWindow& reserveUserWindowWord(bool reserve = true)
virtual IWindow& resetColor(unsigned long colorArea)
ISize savedMinimumSize() const
IWindow& saveMinimumSize(const ISize& size)
virtual IWindow& setBidiSettings( const IBidiSettings& bidiSettings, bool childInherit, bool refresh )
virtual IWindow& setColor( unsigned long colorArea, const IColor& color )
virtual IWindow& setDefaultEmphasisButton( const IWindowHandle& defaultEmphasisButton, bool enable )
virtual IWindow& setDefaultPushButton( const IWindowHandle& defaultPushButton )
virtual IWindow& setExtendedStyle( unsigned long extendedStyle )
IWindow& setNotificationHandler( IWindowNotifyHandler* notifyHandler )
virtual IWindow& setStyle(unsigned long style)
IWindow& setWindowData( long index, unsigned short dataValue )
IWindow& setWindowData(long index, unsigned long dataValue)
IWindow& startHandlingEventsFor( unsigned long identifier, IWindow* parent )
IWindow& startHandlingEventsFor( const IWindowHandle& windowHandle )
virtual unsigned long style() const
IWindow& unbindMessageQueue()
unsigned long windowULong(long index) const
unsigned short windowUShort(long index) const
virtual INotifier& addObserver( IObserver& observer, const IInterest& interest )
virtual INotifier& notifyObservers( const INotificationId& id ) = 0
virtual IObserverList& observerList( const IInterest* anInterest = 0 ) const = 0
virtual INotifier& removeAllObservers() = 0
virtual INotifier& removeObserver( IObserver& observer, const IInterest& interest )
virtual INotifier& removeObserver(IObserver& observer) = 0
bool areChildrenReversed() const
virtual ISize calcMinimumSize() const
virtual IWindowPosBuffer fixupChildren()
ICanvas()
ICanvas& initialize( unsigned long windowIdentifier, IWindow* parent, IWindow* owner, const IRectangle& initialRect, unsigned long style, unsigned long extendedStyle )
virtual ICanvas& layout()
ISize layoutSize() const
virtual bool passEventToOwner(IEvent& event)
IRectangle rectangleInsideBorder( const ISize& sizeWithBorder ) const
virtual ICanvas& setBidiSettings( const IBidiSettings& bidiSettings, bool childInherit, bool refresh )
ICanvas& setLayoutSize(const ISize& size)
ISize sizeWithBorder(const ISize& sizeWithoutBorder) const
IControl()
virtual IMultiCellCanvas& layout()