listitem.h
来自「这是VCF框架的代码」· C头文件 代码 · 共 248 行
H
248 行
#ifndef _VCF_LISTITEM_H__#define _VCF_LISTITEM_H__//ListItem.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{/** @interface */#define LISTITEM_CLASSID "ED88C0AB-26AB-11d4-B539-00C04F0196DA"#define LISTITEM_EVENT_SUBTITEM_ADDED CUSTOM_EVENT_TYPES + ITEM_CONST + 7#define LISTITEM_EVENT_SUBTITEM_DELETED CUSTOM_EVENT_TYPES + ITEM_CONST + 8#define LISTITEM_EVENT_SUBTITEM_CHANGED CUSTOM_EVENT_TYPES + ITEM_CONST + 9/**\class ListItem ListItem.h "vcf/ApplicationKit/ListItem.h"*/class APPLICATIONKIT_API ListItem : public Item {public: class APPLICATIONKIT_API SubItem : public Object { public: SubItem( ListItem* ownerItem ){ ownerItem_ = ownerItem; } virtual ~SubItem(){}; void* getData() { return data_; } void setData( void* data ) { data_ = data; ownerItem_->subItemChanged( this ); } String getCaption() { if ( ownerItem_->getUseLocaleStrings() ) { return System::getCurrentThreadLocale()->translate( caption_ ); } return caption_; } void setCaption( const String& caption ) { caption_ = caption; ownerItem_->subItemChanged( this ); } virtual bool canPaint() { return false; } virtual void paint( GraphicsContext* context, Rect* rect, const ulong32& column ){ } protected: String caption_; void* data_; ListItem* ownerItem_; }; DELEGATE(SubItemChanged); DELEGATE(SubItemAdded); DELEGATE(SubItemDeleted); ListItem(){ }; virtual ~ListItem(){}; /** @deprecated - these are here for backwards compatibility purposes only - they'll be going away in the next release. */ void addSubItemAddedHandler( EventHandler* handler ){ SubItemAdded += handler; } /** @deprecated - these are here for backwards compatibility purposes only - they'll be going away in the next release. */ void addSubItemDeletedHandler( EventHandler* handler ){ SubItemDeleted += handler; } /** @deprecated - these are here for backwards compatibility purposes only - they'll be going away in the next release. */ void addSubItemChangedHandler( EventHandler* handler ){ SubItemChanged += handler; } /** @deprecated - these are here for backwards compatibility purposes only - they'll be going away in the next release. */ void removeSubItemAddedHandler( EventHandler* handler ){ SubItemAdded -= handler; } /** @deprecated - these are here for backwards compatibility purposes only - they'll be going away in the next release. */ void removeSubItemDeletedHandler( EventHandler* handler ){ ItemDeleted -= handler; } /** @deprecated - these are here for backwards compatibility purposes only - they'll be going away in the next release. */ void removeSubItemChangedHandler( EventHandler* handler ) { SubItemChanged -= handler; } virtual String getCaption() = 0; virtual void setCaption( const String& caption ) = 0; virtual void addSubItem( const String& caption, void* data ) = 0; virtual void addSubItem( SubItem* subItem ) = 0; virtual void removeSubItem( const ulong32& index ) = 0; virtual Enumerator<SubItem*>* getSubItems() = 0; virtual SubItem* getSubItem( const ulong32& index ) = 0; virtual ulong32 getSubItemCount() = 0; virtual void subItemChanged( SubItem* item ) = 0;};};/***CVS Log info*$Log$*Revision 1.3 2006/04/07 02:35:24 ddiego*initial checkin of merge from 0.6.9 dev branch.**Revision 1.2.6.2 2006/03/14 02:25:47 ddiego*large amounts of source docs updated.**Revision 1.2.6.1 2006/03/05 02:28:04 ddiego*updated the Item interface and adjusted the other classes accordingly.**Revision 1.2 2004/08/07 02:49:08 ddiego*merged in the devmain-0-6-5 branch to stable**Revision 1.1.2.4 2004/07/09 18:48:05 ddiego*added locale translation support for most classes**Revision 1.1.2.3 2004/06/06 07:05:30 marcelloptr*changed macros, text reformatting, copyright sections**Revision 1.1.2.2 2004/04/29 03:43:14 marcelloptr*reformatting of source files: macros and csvlog and copyright sections**Revision 1.1.2.1 2004/04/28 00:28:18 ddiego*migration towards new directory structure**Revision 1.13.4.1 2004/04/26 21:58:20 marcelloptr*changes for dir reorganization: _VCF_MACRO_H__**Revision 1.13 2003/12/18 05:15:57 ddiego*merge from devmain-0-6-2 branch into the stable branch**Revision 1.12.4.1 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.12 2003/05/17 20:37:03 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.11.2.1 2003/03/12 03:09:35 ddiego*switched all member variable that used the "m_"<name> prefix to* <name>"_" suffix nameing standard.*Also changed all vcf builder files to accomadate this.*Changes were made to the Stream classes to NOT multiple inheritance and to*be a little more correct. Changes include breaking the FileStream into two*distinct classes, one for input and one for output.**Revision 1.11 2003/02/26 04:30:38 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.10.14.1 2002/12/25 22:38:00 ddiego*more stupid fixes to get rid of the damn gcc no newline warning...grrr...**Revision 1.10 2002/05/09 03:10:42 ddiego*merged over code from development branch devmain-0-5-1a into the main CVS trunk**Revision 1.9.4.1 2002/04/27 15:42:40 ddiego*removed ApplicationKit.h and optimized header includes as*well as adding better include guard support**Revision 1.9 2002/02/27 04:16:11 ddiego*add sub items to TreeItem class for teh tree list control*added fixes to the RemoteObject stuff**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_LISTITEM_H__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?