⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 button.h

📁 这是VCF框架的代码
💻 H
字号:
#ifndef _VCF_BUTTON_H__#define _VCF_BUTTON_H__//Button.h/*Copyright 2000-2004 The VCF Project.Please see License.txt in the top level directorywhere you installed the VCF.*/#if _MSC_VER > 1000#   pragma once#endif/* Generated by Together */namespace VCF {class ButtonListener;enum ButtonCommandType{	BC_NONE=0,	BC_OK,	BC_CANCEL,	BC_YES,	BC_NO,	BC_MAYBE,	BC_HELP,	BC_IGNORE,	BC_RETRY,	BC_ABORT,};static String ButtonCommandTypeNames[] = { "BC_NONE",                                         "BC_OK",										 "BC_CANCEL",										 "BC_YES",										 "BC_NO",										 "BC_MAYBE",										 "BC_HELP",										 "BC_IGNORE",										 "BC_RETRY",										 "BC_ABORT"};/**\class Button Button.h "vcf/ApplicationKit/Button.h"*The Button interface represents a standard set of behaviours*for any control that wishes to act like a button. Currently the*basic behaviour is to fire click events when the click() method*is invoked.*/class APPLICATIONKIT_API Button {public:	virtual ~Button(){}		/**	*This represents the user pressing the button,	*which then invokes whatever command is associated	*with the button. It should be called in the implementing	*controls class whenever the control is "clicked" on	*(see Control::mouseClick() ), it can also be called	*programmatically as well.	*/	virtual void click() = 0;	/**	*sets this button as the default button. A default	*button will have it's click() event called whenever	*the enter key is hit.	*/	virtual void setDefault( const bool& defaultButton ) = 0;	virtual bool isDefault() = 0;	/**	*Adds a new EventHandler for button click events	*/	virtual void addButtonClickHandler( EventHandler* handler ) = 0;	/**	*Removes an EventHandler for button click events	*/	virtual void removeButtonClickHandler( EventHandler* handler ) = 0;};}; // namespace VCF/***CVS Log info*$Log$*Revision 1.4  2006/04/07 02:35:21  ddiego*initial checkin of merge from 0.6.9 dev branch.**Revision 1.3.2.2  2006/03/14 02:25:46  ddiego*large amounts of source docs updated.**Revision 1.3.2.1  2005/11/27 23:55:44  ddiego*more osx updates.**Revision 1.3  2005/07/09 23:14:51  ddiego*merging in changes from devmain-0-6-7 branch.**Revision 1.2.4.1  2005/06/26 01:27:53  marcelloptr*added images to a PushButton**Revision 1.2  2004/08/07 02:49:05  ddiego*merged in the devmain-0-6-5 branch to stable**Revision 1.1.2.3  2004/06/06 07:05:29  marcelloptr*changed macros, text reformatting, copyright sections**Revision 1.1.2.2  2004/04/29 03:43:12  marcelloptr*reformatting of source files: macros and csvlog and copyright sections**Revision 1.1.2.1  2004/04/28 00:28:14  ddiego*migration towards new directory structure**Revision 1.11.4.1  2004/04/26 21:58:18  marcelloptr*changes for dir reorganization: _VCF_MACRO_H__**Revision 1.11  2003/12/18 05:15:56  ddiego*merge from devmain-0-6-2 branch into the stable branch**Revision 1.10.4.2  2003/09/12 00:09:32  ddiego*added better tabbing behaviour - fixed an earlier bug.*Code is easier to understand and it simplified the implementation*a bit as well*Moved around the RTTI definitions for various Appkit classes to a*single inline and stripped them from the various class headers**Revision 1.10.4.1  2003/09/06 19:45:44  ddiego*changes to ensure that the destroy() is properly called.*Destructors were moved back to pbulic scope in case that was causing a bug.*Moving them all(all teh component derived classes) to private scope causes*a complete failure in hte VC6 compiler. Alas...*So destructors are present, and modal dialogs can still be created on the*stack, but almost any other component should be created on the heap, and*gotten rid of via free() NOT using operator delete directly.*also moved the vcs info to the end of the file for some of the headers*This will be an ongoing process.**Revision 1.10  2003/05/17 20:37:00  ddiego*this is the checkin for the 0.6.1 release - represents the merge over from*the devmain-0-6-0 branch plus a few minor bug fixes**Revision 1.9.2.1  2003/03/23 03:23:44  marcelloptr*3 empty lines at the end of the files**Revision 1.9  2003/02/26 04:30:36  ddiego*merge of code in the devmain-0-5-9 branch into the current tree.*most additions are in the area of the current linux port, but the major*addition to this release is the addition of a Condition class (currently*still under development) and the change over to using the Delegate class*exclusively from the older event handler macros.**Revision 1.8.20.4  2003/02/08 03:36:40  ddiego*X11Dialog::showMessage() methods are complete, as well as ensuring that*PushButton is now a heavyweight control.*Fixed a bug in the TabbedPages control that causing resize errors for the*scroll buttons*PushButton also now has most of the same methods as teh CommandButton*and can have a CommanedType value associated with the control, as*well as the auto-close behaviour if the button is clicked**Revision 1.8.20.3  2003/02/03 05:21:55  ddiego*added support for command types to the PuchButton class*added support for clicks in the PuchButton class to auto close a dialog*if it is parented to one, similar to the CommandButton. This is part of the*gradual phase out of the CommandButton class*Add supprt for drawing a focus rect in the PushButton class*plugged in tabbing bahaviour to the X11UIToolkit. It seems as though*"Shift" + "Tab" is not being picked up properly*Finished implementing the X11Dialog::showMessage(String,String) method*and also add some finishing touches to teh X11Dialog so it displays correctly*Add some finishing touches to the X11UIToolkit::runModalEventLoop() as well**Revision 1.8.20.2  2002/12/29 00:58:57  marcelloptr*Minor fixes**Revision 1.8.20.1  2002/12/25 22:06:14  ddiego*whole bunch of little changes to the header files used by the ApplicationKit*to get rid of no newline warnings by gcc.*fixes to various event handlers in the ApplicationKit to compile with gcc*since gcc does not like a member function pointer without the "&"*addressof operator.*Added initial file for the X11 UIToolkit implementation**Revision 1.8  2002/01/24 01:46:47  ddiego*added a cvs "log" comment to the top of all files in vcf/src and vcf/include*to facilitate change tracking**/#endif // _VCF_BUTTON_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -