| Version: 3.2.5

Public Member Functions | List of all members
wxTaskBarButton Class Reference
Class List by Category » Miscellaneous

`#include <wx/taskbarbutton.h>`

## Detailed Description

A taskbar button that associated with the window under Windows 7 or later.

It is used to access the functionality including thumbnail representations, thumbnail toolbars, notification and status overlays, and progress indicators.

Note
  This class is only created and initialized in the internal implementation of wxFrame by design. You can only get the pointer of the instance which associated with the frame by calling wxFrame::MSWGetTaskBarButton().

##

Library: wxCore
Category: Miscellaneous
Availability: only available for the wxMSW port.

See also
  wxFrame::MSWGetTaskBarButton()

Since
  3.1.0

## Public Member Functions

virtual void | SetProgressRange (int range)
| Starts showing a determinate progress indicator. More...
virtual void | SetProgressValue (int value)
| Update the progress indicator, setting the progress to the new value . More...
virtual void | PulseProgress ()
| Makes the progress indicator run in indeterminate mode. More...
virtual void | Show (bool show=true)
| Show in the taskbar. More...
virtual void | Hide ()
| Hide in the taskbar. More...
virtual void | SetThumbnailTooltip (const wxString &tooltip)
| Specifies or updates the text of the tooltip that is displayed when the mouse pointer rests on an individual preview thumbnail in a taskbar button flyout. More...
virtual void | SetProgressState (wxTaskBarButtonState state)
| Set the state of the progress indicator displayed on a taskbar button. More...
virtual void | SetOverlayIcon (const wxIcon &icon, const wxString &description=wxString())
| Set an overlay icon to indicate application status or a notification top the user. More...
virtual void | SetThumbnailClip (const wxRect &rect)
| Selects a portion of a window's client area to display as that window's thumbnail in the taskbar. More...
virtual void | SetThumbnailContents (const wxWindow *child)
| Selects the child window area to display as that window's thumbnail in the taskbar. More...
virtual bool | InsertThumbBarButton (size_t pos, wxThumbBarButton *button)
| Inserts the given button before the position pos to the taskbar thumbnail toolbar. More...
virtual bool | AppendThumbBarButton (wxThumbBarButton *button)
| Appends a button to the taskbar thumbnail toolbar. More...
virtual bool | AppendSeparatorInThumbBar ()
| Appends a separator to the taskbar thumbnail toolbar. More...
virtual wxThumbBarButton * | RemoveThumbBarButton (wxThumbBarButton *button)
| Removes the thumbnail toolbar button from the taskbar button but doesn't delete the associated c++ object. More...
virtual wxThumbBarButton * | RemoveThumbBarButton (int id)
| Removes the thumbnail toolbar button from the taskbar button but doesn't delete the associated c++ object. More...

## Member Function Documentation

## ◆ AppendSeparatorInThumbBar()

virtual bool wxTaskBarButton::AppendSeparatorInThumbBar | ( |  | ) |

virtual

Appends a separator to the taskbar thumbnail toolbar.

Note
  The number of buttons and separators is limited to 7.

See also
  AppendThumbBarButton(), InsertThumbBarButton()

## ◆ AppendThumbBarButton()

virtual bool wxTaskBarButton::AppendThumbBarButton | ( | wxThumbBarButton * | button | ) |

virtual

Appends a button to the taskbar thumbnail toolbar.

Note
  The number of buttons and separators is limited to 7.

See also
  InsertThumbBarButton(), AppendSeparatorInThumbBar()

## ◆ Hide()

virtual void wxTaskBarButton::Hide | ( |  | ) |

virtual

Hide in the taskbar.

## ◆ InsertThumbBarButton()

virtual bool wxTaskBarButton::InsertThumbBarButton | ( | size_t | pos,
|  | wxThumbBarButton * | button
| ) |  |

virtual

Inserts the given button before the position pos to the taskbar thumbnail toolbar.

Note
  The number of buttons and separators is limited to 7.

See also
  AppendThumbBarButton(), AppendSeparatorInThumbBar()

## ◆ PulseProgress()

virtual void wxTaskBarButton::PulseProgress | ( |  | ) |

virtual

Makes the progress indicator run in indeterminate mode.

The first call to this method starts showing the indeterminate progress indicator if it hadn't been shown yet.

Call SetProgressRange(0) to stop showing the progress indicator.

## ◆ RemoveThumbBarButton() [1/2]

virtual wxThumbBarButton* wxTaskBarButton::RemoveThumbBarButton | ( | int | id | ) |

virtual

Removes the thumbnail toolbar button from the taskbar button but doesn't delete the associated c++ object.

Parameters

  id | The identifier of the thumbnail toolbar button to remove.

Returns
  A pointer to the button which was detached from the taskbar button.

## ◆ RemoveThumbBarButton() [2/2]

virtual wxThumbBarButton* wxTaskBarButton::RemoveThumbBarButton | ( | wxThumbBarButton * | button | ) |

virtual

Removes the thumbnail toolbar button from the taskbar button but doesn't delete the associated c++ object.

Parameters

  button | The thumbnail toolbar button to remove.

Returns
  A pointer to the button which was detached from the taskbar button.

## ◆ SetOverlayIcon()

virtual void wxTaskBarButton::SetOverlayIcon | ( | const wxIcon & | icon,
|  | const wxString & | description = `wxString()`
| ) |  |

virtual

Set an overlay icon to indicate application status or a notification top the user.

Parameters

  icon | This should be a small icon, measuring 16x16 pixels at 96 dpi. If an overlay icon is already applied to the taskbar button, that existing overlay is replaced. Setting with wxNullIcon to remove.
  description | The property holds the description of the overlay for accessibility purposes.

## ◆ SetProgressRange()

virtual void wxTaskBarButton::SetProgressRange | ( | int | range | ) |

virtual

Starts showing a determinate progress indicator.

Call SetProgressValue() after this call to update the progress indicator.

If range is 0, the progress indicator is dismissed.

## ◆ SetProgressState()

virtual void wxTaskBarButton::SetProgressState | ( | wxTaskBarButtonState | state | ) |

virtual

Set the state of the progress indicator displayed on a taskbar button.

See also
  wxTaskBarButtonState

## ◆ SetProgressValue()

virtual void wxTaskBarButton::SetProgressValue | ( | int | value | ) |

virtual

Update the progress indicator, setting the progress to the new value .

Parameters

  value | Must be in the range from 0 to the argument to the last SetProgressRange() call. When it is equal to the range, the progress bar is dismissed.

## ◆ SetThumbnailClip()

virtual void wxTaskBarButton::SetThumbnailClip | ( | const wxRect & | rect | ) |

virtual

Selects a portion of a window's client area to display as that window's thumbnail in the taskbar.

Parameters

  rect | The portion inside of the window. Setting with an empty wxRect will restore the default display of the thumbnail.

## ◆ SetThumbnailContents()

virtual void wxTaskBarButton::SetThumbnailContents | ( | const wxWindow * | child | ) |

virtual

Selects the child window area to display as that window's thumbnail in the taskbar.

## ◆ SetThumbnailTooltip()

virtual void wxTaskBarButton::SetThumbnailTooltip | ( | const wxString & | tooltip | ) |

virtual

Specifies or updates the text of the tooltip that is displayed when the mouse pointer rests on an individual preview thumbnail in a taskbar button flyout.

## ◆ Show()

virtual void wxTaskBarButton::Show | ( | bool | show = `true` | ) |

virtual

Show in the taskbar.