VkInterruptDialog man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



VkInterruptDialog(3x)					 VkInterruptDialog(3x)

NAME
     VkInterruptDialog - A dialog manager that support interrupts

INHERITS FROM
     VkBusyDialog : VkDialogManager : VkComponent : VkCallbackObject

HEADER FILE
     #include <Vk/VkInterruptDialog.h>

PUBLIC PROTOCOL SUMMARY
   Constructor/Destructor
	   VkInterruptDialog(const char* name);
	   virtual void ~VkInterruptDialog(void);

   Checking for Interrupts
	   Boolean wasInterupted(void);

CLASS DESCRIPTION
	  This class supports applications that need to perform a lengthy task
	  and allow the task to be interrupted. To use the dialog,
	  applications must use the VkApp::setBusyDialog() method to install
	  an instance of VkInterruptDialog as the application's current busy
	  dialog, and then call VkApp::busy() Applications must periodically
	  check to see if the application has been interrupted. The period of
	  time between checks is up to the application, which must weigh
	  responsiveness against time spent checking.

	  Note that checking for interrupts involves entering a secondary
	  event loop for a short time, so the application must beware of re-
	  entrancy problems in any callbacks that could be invoked.

FUNCTION DESCRIPTIONS
   VkInterruptDialog()
	   VkInterruptDialog(const char* name);

	  Initialize a VkInterruptDialog object. Normally, applications can
	  use the globally instantiated theInterruptDialog.

   ~VkInterruptDialog()
	   virtual void ~VkInterruptDialog(void);

	  Free the memory associated with a VkInterruptDialog object.

   wasInterupted()

									Page 1

VkInterruptDialog(3x)					 VkInterruptDialog(3x)

	   Boolean wasInterupted(void);

	  Check to see if the user has pushed the dialog's "cancel" button
	  since the last time this function was called.

DATA MEMBER DESCRIPTIONS
   const char* const interruptedCallback;
	   static const char *const interruptedCallback;

	  This callback list allows objects to register a member function to
	  be called when the user selects the "Cancel" button of a
	  VkInterruptDialog dialog. This callback can only be called if the
	  application calls wasInterrupted(). Normally, the application will
	  test the return value of this function, but the callback may be
	  useful in other situations.

EXAMPLE
	  The following code segment installs the interrupt dialog, and
	  performs a simulated lengthy task, checking for interrupts
	  periodically.

	   int i, j, k = 0;

	    // Install the interruptible dialog as the
	    // dialog to post when busy

	    theApplication->setBusyDialog(theInterruptDialog);

	    // Start being "busy"

	    theApplication->busy("Very Busy",
				 (BusyWindow *) clientData);

	    k = 0;

	    for(i=0; i<10000; i++)
	    {
		 // Every so often, see if the task
		 // was interrupted

		  if(theInterruptDialog->wasInterupted())
		  {
		      break;  // kick out of current
			      // task if user interrupts
		  }

		  sleep(1);
	      }

									Page 2

VkInterruptDialog(3x)					 VkInterruptDialog(3x)

	      // Task done, so we're not busy anymore

	      theApplication->notBusy();

	      // Restore the application's busy dialog
	      // as the default

	      theApplication->setBusyDialog(NULL);

INHERITED MEMBER FUNCTIONS
   Inherited from VkDialogManager
	  show(), hide(), className(), clearCache(), prepost(), ok(),
	  cancel(), apply(), setTitle(), setButtonLabels(), unpost(),
	  unpostAll(), centerOnScreen(), lastPosted(), post(), postModal(),
	  postBlocked(), postAndWait(), post(), _action, _showOK, _showCancel,
	  _showApply, _allowMultipleDialogs, _minimizeMultipleDialogs,
	  prepostCallback

   Inherited from VkComponent
	  installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
	  setDefaultResources(), getResources(), manage(), unmanage(),
	  baseWidget(), okToQuit(), _name, _baseWidget, _w, deleteCallback

   Inherited from VkCallbackObject
	  callCallbacks(), addCallback(), removeCallback(),
	  removeAllCallbacks()

VIEWKIT 2.1 CHANGES
     In multi-screen enabled applications or components, references to
     theInterruptDialog will only be valid for the default screen in the
     application.  The following new function API will return the
     VkInterruptDialog associated with the appropriate screen and should be
     used instead of theInterruptDialog;

	   VkInterruptDialog *getAppInterruptDialog(VkComponent *comp);

CLASSES USED BY THIS CLASS
     VkApp

SEE ALSO
     VkBusyDialog, VkDialogManager, VkComponent, VkApp
     ViewKit Programmer's Guide
     The X Window System, DEC Press, Bob Sheifler and Jim Gettys
     The X Window System Toolkit, DEC Press, Paul Asente and Ralph Swick
     The OSF/Motif Programmers Reference, Prentice Hall, OSF

									Page 3

VkInterruptDialog(3x)					 VkInterruptDialog(3x)

									Page 4

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net