File: programming/cocoa/

/* =============================================================================
	POJECT:		UKProgressPanel
	FILE:		UKProgressPanelTask.h
	AUTHORS:	M. Uli Kusterer (UK), (c) 2003, all rights reserved.
	REQUIRES:	UKProgressPanelTask.m
   ========================================================================== */
/**		A single "task" (i.e. progress bar and status text field) for our
		MT-Newswatcher/Finder-style progress window for keeping the user
		current on concurrently running tasks.
		Using the progress panel is very simple: Use +newProgressPanelTask
		and consorts to create a new task when you begin your lengthy
		operation, and release it when you have finished.
		The task will automatically take care of creating and showing the
		progress panel if needed, and will add itself to the shared
		progress panel instance.
		A task supports most of the methods of NSProgressIndicator to
		allow you to control the progress bar without any deep-reaching
		code changes. Use setTitle: to provide a general title indicating
		what action this is (e.g. "Emptying the trash"). The title will be
		displayed in bold above the progress bar. Use setStatus: to provide
		information about the step currently being executed, expected time
		to finish etc. - This will be displayed below the progress bar.
	\note   UKProgressPanel and UKProgressPanelTask are thread-safe.
/* -----------------------------------------------------------------------------
   -------------------------------------------------------------------------- */
#import <Cocoa/Cocoa.h>
/* -----------------------------------------------------------------------------
		A single operation in the progress panel.
   -------------------------------------------------------------------------- */// All member variables are *private*:
///< Progress bar we update.
///< View we display our stuff in.
///< Status field we display detailed in.
///< Title field that describes the general operation.
///< The "Stop" button for cancelling this task.
///< The delegate that is sent our "stop" message.
///< The selector to be called on the "stop delegate" when the user clicks the "stop" button. Defaults to stop:
///< Has this task been stopped by the user?
///< Lock used to determine whether this task is being used from some thread right now.
///< All top-level objects in our NIB.
/** Convenience constructor.
	The caller (i.e. you) is responsible for releasing this object once the
	operation is finished. *//** Controlling progress bar:
	\defgroup progressbar
	\@{ *//**< Keep animation going. I'm not letting you have automatic timer animation. This is for feedback, not for making the user dizzy. */
// Title/Status:
///< "Emptying trash", or whatever, above the progress bar in bold face.
///< "15 bytes of 1024 deleted" below the progress bar.
// Handling the "Stop" button:
///< Has the user requested this task to be stopped?
///< Delegate to be informed of clicks on "stop" button. Alternate approach to -stopped: Call an action on an object.
///< \see setStopDelegate:
///< Message to send to stopDelegate when "stop" button is clicked. Alternate approach to -stopped: Call an action on an object.
///< \see setStopAction:
// private:

This code uses the PclZip Zip File reading code, which is subject to the GNU LGPL. It also uses the GeSHi syntax highlighter, subject to the GPL. Ask if you want this for your own web site, it's free.