3D PLM Enterprise Architecture

User Interface - Dialogs

CATDlgPushButton

Executes commands
Quick Reference

CATDialog
  |
  +---CATDlgControl
        |
        +---CATDlgPushButton

The Push Button
CATDlgPushButton.jpg (4538 bytes) The push button is dedicated to execute a command when the user pushes, or clicks, it. As soon as the user pushes on the push button using the mouse key one, or sometimes the Enter key, a notification is sent that you can catch by means of the callback mechanism and trigger then the appropriate command. One or two different notifications can be sent whether the user simply clicks on the push button and releases it immediately, or keeps the push button pressed, if you specify it explicitly. This is expressed in the push button constructor. You can also request that a push button be displayed without a shadow around it.

Use push buttons whenever you propose to the end user an action to execute.


Styles
Name Description
default A CATDlgPushBActivateNotification is sent when the end user clicks on the push button.
CATDlgPusRepetitive In addition to the CATDlgPushBActivateNotification sent when the end user clicks on the push button, a CATDlgPushBRepetitiveNotification is sent repetitively as long as the end user maintains the push button pressed.
CATDlgPusNoShadow The push button is displayed without shadow.

[Top]


Events
Notification Method Sent when
CATDlgPushBActivateNotification GetPushBActivateNotification Whenever the push button is clicked
CATDlgPushBRepetitiveNotification GetPushBRepetitiveNotification As long as the push button is maintained pressed if its style is set to CATDlgPusRepetitive.

[Top]


Programmer's Guide

The push button is dedicated to executing a command when it is clicked.

[Top]

Constructing a Push Button

You can construct different kinds of push buttons:

[Top]

Setting a Callback on a Push Button

Set a callback on a push button for the click interaction as follows:

AddAnalyseNotificationCB(
  _pPushButton,                                   // push button 
  _pPushButton->GetPushBActivateNotification(),   // notification
  (CATCommand)&Container::MethodToExecute,        // method to execute 
  CATCommandClientData iUsefulData);              // useful data for this method 

[Top]

Setting a Title to a Push Button

The push button title should be set by the resource file using a key built with the identifier you declare as the second parameter of the push button constructor.

[Top]


History

Version: 1 [Jan 2000] Document created
[Top]

Copyright © 2000, Dassault Systèmes. All rights reserved.