gadget.h

Go to the documentation of this file.
00001 // $Id: gadget.h 1282 2006-06-09 09:46:49Z alex $
00002 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
00003 ================================XARAHEADERSTART===========================
00004  
00005                Xara LX, a vector drawing and manipulation program.
00006                     Copyright (C) 1993-2006 Xara Group Ltd.
00007        Copyright on certain contributions may be held in joint with their
00008               respective authors. See AUTHORS file for details.
00009 
00010 LICENSE TO USE AND MODIFY SOFTWARE
00011 ----------------------------------
00012 
00013 This file is part of Xara LX.
00014 
00015 Xara LX is free software; you can redistribute it and/or modify it
00016 under the terms of the GNU General Public License version 2 as published
00017 by the Free Software Foundation.
00018 
00019 Xara LX and its component source files are distributed in the hope
00020 that it will be useful, but WITHOUT ANY WARRANTY; without even the
00021 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00022 See the GNU General Public License for more details.
00023 
00024 You should have received a copy of the GNU General Public License along
00025 with Xara LX (see the file GPL in the root directory of the
00026 distribution); if not, write to the Free Software Foundation, Inc., 51
00027 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00028 
00029 
00030 ADDITIONAL RIGHTS
00031 -----------------
00032 
00033 Conditional upon your continuing compliance with the GNU General Public
00034 License described above, Xara Group Ltd grants to you certain additional
00035 rights. 
00036 
00037 The additional rights are to use, modify, and distribute the software
00038 together with the wxWidgets library, the wxXtra library, and the "CDraw"
00039 library and any other such library that any version of Xara LX relased
00040 by Xara Group Ltd requires in order to compile and execute, including
00041 the static linking of that library to XaraLX. In the case of the
00042 "CDraw" library, you may satisfy obligation under the GNU General Public
00043 License to provide source code by providing a binary copy of the library
00044 concerned and a copy of the license accompanying it.
00045 
00046 Nothing in this section restricts any of the rights you have under
00047 the GNU General Public License.
00048 
00049 
00050 SCOPE OF LICENSE
00051 ----------------
00052 
00053 This license applies to this program (XaraLX) and its constituent source
00054 files only, and does not necessarily apply to other Xara products which may
00055 in part share the same code base, and are subject to their own licensing
00056 terms.
00057 
00058 This license does not apply to files in the wxXtra directory, which
00059 are built into a separate library, and are subject to the wxWindows
00060 license contained within that directory in the file "WXXTRA-LICENSE".
00061 
00062 This license does not apply to the binary libraries (if any) within
00063 the "libs" directory, which are subject to a separate license contained
00064 within that directory in the file "LIBS-LICENSE".
00065 
00066 
00067 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS
00068 ----------------------------------------------
00069 
00070 Subject to the terms of the GNU Public License (see above), you are
00071 free to do whatever you like with your modifications. However, you may
00072 (at your option) wish contribute them to Xara's source tree. You can
00073 find details of how to do this at:
00074   http://www.xaraxtreme.org/developers/
00075 
00076 Prior to contributing your modifications, you will need to complete our
00077 contributor agreement. This can be found at:
00078   http://www.xaraxtreme.org/developers/contribute/
00079 
00080 Please note that Xara will not accept modifications which modify any of
00081 the text between the start and end of this header (marked
00082 XARAHEADERSTART and XARAHEADEREND).
00083 
00084 
00085 MARKS
00086 -----
00087 
00088 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara
00089 designs are registered or unregistered trademarks, design-marks, and/or
00090 service marks of Xara Group Ltd. All rights in these marks are reserved.
00091 
00092 
00093       Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
00094                         http://www.xara.com/
00095 
00096 =================================XARAHEADEREND============================
00097  */
00098 //
00099 
00100 #ifndef INC_GADGET
00101 #define INC_GADGET
00102 
00103 //#include "dialogop.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00104 
00105 #ifndef ENSURE_NOT_NULL
00106 #define ENSURE_NOT_NULL(p)  ERROR2IF(p == NULL, 0, "NULL Args");
00107 #endif
00108 #ifndef VOID_ENSURE_NOT_NULL
00109 #define VOID_ENSURE_NOT_NULL(p)     if (p == NULL) {    ERROR2RAW("NULL Args"); }
00110 #endif
00111 #ifndef STRING_ENSURE_NOT_NULL
00112 #define STRING_ENSURE_NOT_NULL(p)   ERROR2IF(p == NULL, NullString, "NULL Args");
00113 #endif
00114 
00115 extern const String_8 NullString;
00116 
00117 /**************************************************************************************
00118 
00119 >   class CCGadget : public CCCoreUI
00120 
00121     Author:     Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
00122     Created:    15/10/96
00123     Purpose:    Base class for a UI element
00124 
00125 **************************************************************************************/
00126 
00127 class CCCoreUI : public CC_CLASS_MEMDUMP
00128 {
00129     // Declare the class for memory tracking
00130     CC_DECLARE_MEMDUMP(CCCoreUI);
00131 public:
00132 //  Resize();
00133 //  QueryGeometry();
00134 };
00135 
00136 
00137 /**************************************************************************************
00138 
00139 >   class CCGadget : public CCCoreUI
00140 
00141     Author:     Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
00142     Created:    15/10/96
00143     Purpose:    Base class for a UI element
00144 
00145 **************************************************************************************/
00146 class Gadget : public CCCoreUI
00147 {
00148     // Declare the class for memory tracking
00149     CC_DECLARE_MEMDUMP(Gadget);
00150 
00151 public:
00152     virtual void Enable() = 0;
00153     virtual void Disable() = 0;
00154 
00155     virtual ~Gadget(){}
00156 
00157 //  BOOL SetGadgetHelp( CGadgetID Gadget, 
00158 //                      UINT32 BubbleID, 
00159 //                      UINT32 StatusID, 
00160 //                      UINT32 ModuleID = 0);   
00161 //
00162 //  BOOL Hide(BOOL Hide);
00163 //  BOOL Redraw(BOOL Redraw);
00164 //  void PaintNow(CGadgetID gid);
00165 //  void Invalidate();
00166 //  void InvalidatePart(ReDrawInfoType *ExtraInfo, DocRect *InvalidRect);
00167 };
00168 
00169 // Message Handling Classes -------------------------------------------------------------------
00170 
00171 class Notifier;
00172 /**************************************************************************************
00173 
00174 >   class Notifiable
00175 
00176     Author:     Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
00177     Created:    15/10/96
00178 
00179     Purpose:    Allows UIElements to interact with proxies
00180 
00181 **************************************************************************************/
00182 class Notifiable
00183 {
00184 public:
00185     virtual void Notify( Notifier* const pSender ) = 0;
00186     virtual ~Notifiable(){}
00187 };
00188 
00189 
00190 /**************************************************************************************
00191 
00192 >   class Notifier
00193 
00194     Author:     Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
00195     Created:    15/10/96
00196 
00197     Purpose:    Allows UIElements to interact with proxies
00198 
00199 **************************************************************************************/
00200 class Notifier
00201 {
00202 public:
00203     virtual ~Notifier(){};
00204 
00205     Notifier(): m_ShouldNotify(FALSE) {}
00206 
00207     void NotifyOff()                { m_ShouldNotify = FALSE;}
00208     void NotifyOn()                 { m_ShouldNotify = TRUE;}
00209     
00210     void Notify(Notifiable* const pObserver)
00211     {
00212         if (m_ShouldNotify)
00213             pObserver->Notify(this);
00214     }
00215 
00216 private:
00217     BOOL    m_ShouldNotify;
00218 
00219 };
00220 
00221 
00222 /**************************************************************************************
00223 
00224 >   static class NotifyNobody: public Notifiable
00225 
00226     Author:     Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
00227     Created:    15/10/96
00228 
00229     Purpose:    Dummy Notifiable object used to initialize references
00230 
00231 **************************************************************************************/
00232 static class NotifyNobody : public Notifiable
00233 {
00234 public:
00235     virtual void Notify(Notifier* const){}
00236 }
00237 Nobody;
00238 
00239 
00240 
00241 /**************************************************************************************
00242 
00243 >   class NotifyingGadget : public Gadget
00244 
00245     Author:     Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
00246     Created:    15/10/96
00247 
00248     Purpose:    This is an abstract class representing a gadget that notifies
00249                 other Notifiable objects. Avoids multiple inheritance.
00250 
00251 **************************************************************************************/
00252 class NotifyingGadget : public Gadget
00253 {
00254     // Declare the class for memory tracking
00255     CC_DECLARE_MEMDUMP(NotifyingGadget);
00256 
00257 public:
00258     void Notify(Notifiable* const pObserver)    {   m_Notifier.Notify(pObserver);   }
00259 
00260     void NotifyOff()                            { m_Notifier.NotifyOff();}
00261     void NotifyOn()                             { m_Notifier.NotifyOn();}
00262 
00263 private:
00264     Notifier    m_Notifier;
00265 };
00266 
00267 
00268 class DialogOp;
00269 /**************************************************************************************
00270 
00271 >   class DialogMgrGadget : public NotifyingGadget
00272 
00273     Author:     Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
00274     Created:    15/10/96
00275 
00276     Purpose:    This is a base class representing a gadget in a DialogOp. It should not
00277                 be instantiated.
00278 
00279 **************************************************************************************/
00280 class DialogMgrGadget : public NotifyingGadget
00281 {
00282     // Declare the class for memory tracking
00283     CC_DECLARE_MEMDUMP(DialogMgrGadget);
00284 
00285 public:
00286     virtual void Enable();
00287     virtual void Disable();
00288 
00289 protected:
00290     DialogMgrGadget(DialogOp* const pDialog, CGadgetID ControlID) : 
00291             m_pDialog(pDialog), m_ControlID(ControlID)  {}
00292 
00293 protected:
00294     // Data Members
00295     DialogOp* const m_pDialog;
00296     const CGadgetID m_ControlID;
00297 };
00298 
00299 
00300 /*******************************************************************************************
00301 
00302 >   void DialogMgrGadget::Enable()
00303 
00304     Author:     Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com> (from assorted dialog classes)
00305     Created:    09/06/97
00306 
00307     Purpose:    Enables this gadget
00308 
00309 *******************************************************************************************/
00310 inline void DialogMgrGadget::Enable()
00311 {
00312     ASSERT(m_ControlID != 0 && m_pDialog != NULL);
00313     
00314     m_pDialog->EnableGadget(m_ControlID, TRUE);
00315 }
00316 
00317 /*******************************************************************************************
00318 
00319 >   void DialogMgrGadget::Disable()
00320 
00321     Author:     Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com> (from assorted dialog classes)
00322     Created:    09/06/97
00323 
00324     Purpose:    Disables this gadget
00325 
00326 *******************************************************************************************/
00327 inline void DialogMgrGadget::Disable()
00328 {
00329     ASSERT(m_ControlID != 0 && m_pDialog != NULL);
00330     
00331     m_pDialog->EnableGadget(m_ControlID, FALSE);
00332 }
00333 
00334 
00335 
00336 /**************************************************************************************
00337 
00338 >   class Button : public DialogMgrGadget
00339 
00340     Author:     Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
00341     Created:    15/10/96
00342 
00343     Purpose:    Represents a button in a DialogOp
00344 
00345 **************************************************************************************/
00346 class Button : public DialogMgrGadget
00347 {
00348     // Declare the class for memory tracking
00349     CC_DECLARE_MEMDUMP(Button);
00350 
00351 public:
00352     Button( DialogOp* const pDialog, CGadgetID ControlID,
00353             Notifiable* const pNotify = &Nobody );
00354 
00355     virtual ~Button();
00356 
00357     virtual void OnClicked();
00358 
00359 private:
00360     Notifiable* m_pNotifyOnPress;
00361 };
00362 
00363 
00364 /**************************************************************************************
00365 
00366 >   class ListControl : public DialogMgrGadget
00367 
00368     Author:     Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
00369     Created:    15/10/96
00370 
00371     Purpose:    Represents a List in a DialogOp
00372 
00373 **************************************************************************************/
00374 class ListControl : public DialogMgrGadget
00375 {
00376     // Declare the class for memory tracking
00377     CC_DECLARE_MEMDUMP(ListControl);
00378 
00379 public:
00380     ListControl(DialogOp* const pDialog, CGadgetID ControlID, 
00381                 Notifiable* pNotify = &Nobody) : 
00382         DialogMgrGadget(pDialog, ControlID),
00383         m_pNotifyOnSelectionChange(pNotify) {}
00384 
00385     virtual ~ListControl(){};
00386 
00387     BOOL AddItem(const StringBase& ItemText);
00388     BOOL InsertItem(const StringBase& ItemText, UINT32 AtIndex);
00389     BOOL DeleteItemAtIndex(UINT32 AtIndex);
00390     BOOL DeleteAllItems();
00391 
00392     UINT32 GetNumberOfSelectedItems() const;
00393     BOOL GetFirstSelectedIndex(INT32* pIndex) const;
00394     BOOL GetSelectedIndexes(INT32** pIndexes) const;
00395     BOOL DeselectAll();
00396     BOOL SetItem(const StringBase& ItemText, UINT32 AtIndex);
00397 
00398     virtual void OnSelect();
00399     virtual void OnDoubleClicked();
00400 
00401 private:
00402     Notifiable* m_pNotifyOnSelectionChange;
00403 
00404 };
00405 
00406 
00407 inline BOOL ListControl::AddItem(const StringBase& ItemText)
00408 {
00409     ENSURE( 0 != m_ControlID, "Control ID is invalide" );
00410     ENSURE_NOT_NULL(m_pDialog);
00411     
00412     return m_pDialog->SetStringGadgetValue(m_ControlID, ItemText, TRUE);
00413 }
00414 
00415 inline BOOL ListControl::InsertItem(const StringBase& ItemText, UINT32 AtIndex)
00416 {
00417     ENSURE( 0 != m_ControlID, "Control ID is invalide" );
00418     ENSURE_NOT_NULL(m_pDialog);
00419     
00420     return m_pDialog->SetStringGadgetValue(m_ControlID, ItemText, FALSE, AtIndex);
00421 }
00422 
00423 inline BOOL ListControl::DeleteItemAtIndex(UINT32 AtIndex)
00424 {
00425     ENSURE( 0 != m_ControlID, "Control ID is invalide" );
00426     ENSURE_NOT_NULL(m_pDialog);
00427     return m_pDialog->DeleteValue(m_ControlID, FALSE, INT32(AtIndex));
00428 }
00429 
00430 inline BOOL ListControl::DeleteAllItems()
00431 {
00432     ENSURE( 0 != m_ControlID, "Control ID is invalide" );
00433     ENSURE_NOT_NULL(m_pDialog);
00434     return m_pDialog->DeleteAllValues(m_ControlID);
00435 }
00436 
00437 inline UINT32 ListControl::GetNumberOfSelectedItems() const
00438 {
00439     ENSURE( 0 != m_ControlID, "Control ID is invalide" );
00440     ENSURE_NOT_NULL(m_pDialog);
00441     return UINT32(m_pDialog->GetSelectedCount(m_ControlID));
00442 }
00443 
00444 inline BOOL ListControl::GetFirstSelectedIndex(INT32* pIndex) const
00445 {
00446     ENSURE( 0 != m_ControlID, "Control ID is invalide" );
00447     ENSURE_NOT_NULL(m_pDialog);
00448     *pIndex = m_pDialog->GetFirstSelectedItem(m_ControlID);
00449     return (*pIndex != -1);
00450 }
00451 
00452 inline BOOL ListControl::GetSelectedIndexes(INT32** pIndexes) const
00453 {
00454     ENSURE( 0 != m_ControlID, "Control ID is invalide" );
00455     ENSURE_NOT_NULL(m_pDialog);
00456     ENSURE_NOT_NULL(pIndexes);
00457     *pIndexes = m_pDialog->GetSelectedItems(m_ControlID);
00458     return (*pIndexes != NULL);
00459 }
00460 
00461 
00462 inline BOOL ListControl::DeselectAll()
00463 {
00464     ENSURE( 0 != m_ControlID, "Control ID is invalide" );
00465     ENSURE_NOT_NULL(m_pDialog);
00466     return m_pDialog->SetBoolGadgetSelected(m_ControlID, FALSE, -1);
00467 }
00468 
00469 
00470 inline void ListControl::OnSelect()
00471 {
00472     Notify(m_pNotifyOnSelectionChange);
00473 }
00474 inline void ListControl::OnDoubleClicked()
00475 {
00476     Notify(m_pNotifyOnSelectionChange);
00477 }
00478 
00479 
00480 /**************************************************************************************
00481 
00482 >   class TextControl : private DialogMgrGadget, public Notifier
00483 
00484     Author:     Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
00485     Created:    15/10/96
00486 
00487     Purpose:    Represents an Edit Box in a DialogOp
00488 
00489 **************************************************************************************/
00490 class TextControl : public DialogMgrGadget
00491 {
00492     // Declare the class for memory tracking
00493     CC_DECLARE_MEMDUMP(TextControl);
00494 
00495 public:
00496     TextControl(DialogOp* const pDialog, CGadgetID ControlID,
00497                 const StringBase& InitialText = NullString,
00498                 Notifiable* const pTell = &Nobody );
00499 
00500     virtual ~TextControl(){};
00501 
00502     void UpdateText(const StringBase &NewString);
00503     void RetrieveText(StringBase* const pExistingString) const;
00504 
00505     virtual void OnChange();
00506 
00507 protected:
00508     const TextControl& operator=(const TextControl& OtherControl);
00509     TextControl(const TextControl& OtherControl);
00510 
00511 private:
00512     Notifiable*     m_pObserver;
00513 
00514 };
00515 
00516 
00517 /**************************************************************************************
00518 
00519 >   class StaticTextControl : public DialogMgrGadget
00520 
00521     Author:     Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
00522     Created:    15/10/96
00523 
00524     Purpose:    Represents a Static Text Control (Label) in a DialogOp
00525 
00526 **************************************************************************************/
00527 class StaticTextControl : public DialogMgrGadget
00528 {
00529     // Declare the class for memory tracking
00530     CC_DECLARE_MEMDUMP(StaticTextControl);
00531 
00532 public:
00533     StaticTextControl(DialogOp* const pDialog, CGadgetID ControlID,
00534                  const StringBase& InitialText = NullString,
00535                  Notifiable* const pTell = &Nobody );
00536 
00537     virtual ~StaticTextControl(){};
00538 
00539     void UpdateText(const StringBase &NewString);
00540     void RetrieveText(StringBase* const pExistingString) const;
00541 
00542     virtual void OnChange();
00543 
00544 protected:
00545     const StaticTextControl& operator=(const StaticTextControl& OtherControl);
00546     StaticTextControl(const StaticTextControl& OtherControl);
00547 
00548 private:
00549     Notifiable*     m_pObserver;
00550 
00551 };
00552 
00553 
00554 
00555 
00556 /**************************************************************************************
00557 
00558 >   class Static : public Gadget
00559 
00560     Author:     Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
00561     Created:    15/10/96
00562     Purpose:    Base class for a UI element
00563 
00564 class StaticText : public DialogMgrGadget
00565 {
00566     CC_DECLARE_MEMDUMP(StaticText);
00567 
00568 public:
00569     StaticText( DialogOp* const pDialog, CGadgetID ControlID,
00570                 const StringBase& InitialText = EmptyString);
00571 
00572     void UpdateText(StringID IDStr);
00573     void UpdateText(const StringBase& Text);
00574 };
00575 
00576 
00577 
00578 class CCComposite : public CCCoreUI
00579 {
00580     CC_DECLARE_MEMDUMP(CCComposite);
00581 
00582 public:
00583     
00584     InsertChild();
00585     DeleteChild();
00586 };
00587 
00588 
00589 
00590 class CCConstraint : public CCComposite
00591 {
00592     CC_DECLARE_MEMDUMP(CCConstraint);
00593 
00594 public:
00595 };
00596 
00597 
00598 
00599 
00600 class ComboList : public ListBox
00601 {
00602     CC_DECLARE_MEMDUMP(ComboList);
00603 
00604 public:
00605 
00606     void SetComboListLength();
00607 };
00608 
00609 
00610 
00611 
00612 
00613 class ValidatedTextControl : public TextControl
00614 {
00615     CC_DECLARE_MEMDUMP(ValidatedText);
00616 
00617 public:
00618     ValidatedTextControl(   DialogOp* const pDialog, CGadgetID ControlID,
00619                     const StringBase& InitialText = EmptyString);
00620 
00621     void UpdateText(StringID IDStr);
00622     void UpdateText(const StringBase& Text);
00623 
00624 protected:
00625     virtual BOOL IsValid(const StringBase& Text) = 0;
00626 };
00627 
00628 class NumericTextControl : public ValidatedTextControl
00629 {
00630     CC_DECLARE_MEMDUMP(EditBox);
00631 
00632 public:
00633     NumericTextControl(INT32 Min, INT32 Max);
00634 
00635 protected:
00636     virtual BOOL IsValid(const StringBase& Text);
00637 };
00638 
00639 
00640 
00641 class BoolGadget : public DialogMgrGadget
00642 {
00643     CC_DECLARE_MEMDUMP(BoolGadget);
00644 
00645 public:
00646     BOOL SetSelected(CGadgetID Gadget, BOOL IsSelected);
00647     BOOL GetBoolGadgetSelected(CGadgetID GadgetID,
00648                                 UINT32 IDSInvalidMsg = 0,
00649                                 BOOL* Valid = NULL,
00650                                 INT32 ListPos = -1);
00651 };
00652 
00653 
00654 class RadioButton : public BoolGadget
00655 {
00656     CC_DECLARE_MEMDUMP(RadioButton);
00657 
00658 public:
00659 };
00660 
00661 
00662 
00663 
00664 class DualFunctionButton : public Button
00665 {
00666     CC_DECLARE_MEMDUMP(DualFunctionButton);
00667 
00668 public:
00669 
00670 
00671 };
00672 */
00673 
00674 /*
00675 class Window;   // Forward references to classes in wrappers.h,
00676 class Rect;     // avoids circular #include dependency;
00677 
00678 class User_interface
00679 {
00680 public:
00681     virtual void hide    ( void                          ) = 0;
00682     virtual bool display ( Window *win, const Rect &rect ) = 0;
00683     virtual bool interact( Window *win, const Rect &rect ) = 0;
00684 
00685     virtual ~User_interface( void ){}
00686 };
00687 
00688 #endif // USERINTF_H__
00689 
00690 
00691 //-------------------------------------------------------------------
00692 class Form::Proxy : public User_interface
00693 {
00694 public:
00695      virtual ~Proxy();
00696      Proxy( User_interface *attribute_proxy,
00697             Element        *notify_me_rather_than_delete_proxy = NULL);
00698 
00699     void release(void);
00700 
00701 public: // overrides for User_interface base class
00702     virtual void hide    ( void                          );
00703     virtual bool display ( Window *win, const Rect &rect );
00704     virtual bool interact( Window *win, const Rect &rect );
00705 
00706 protected:  User_interface  *ui;
00707 private:    Form::Element   *creator;
00708 
00709             friend void Form::debug_print(void);
00710 };
00711 
00712 //-------------------------------------------------------------------
00713 // Elements can be copied, but there's nothing to copy at this level,
00714 // so leave it up to the derived class. Note that, even though
00715 // give_me_a_proxy_for(...) doesn't modify the class, it is not
00716 // const because the returned proxy could modify the class.
00717 
00718 class Form::Element
00719 {
00720 public:
00721     virtual ~Element(void);
00722 
00723 private: friend class Form;
00724     virtual Proxy *give_me_proxy_for(const String &form_name,
00725                                      const String &attribute_id )=0;
00726 private: friend class Proxy;
00727     virtual void release_proxy(Proxy *p);
00728 
00729     friend void Form::debug_print(void);
00730 };
00731 
00732 
00733 
00734 BOOL ListControlWorker::PrepareListControl()
00735 {
00736     DeleteAllValues(m_ControlID);
00737 
00738     INT32 ListIndex = 0;
00739     const Iterator I = m_pContainer.begin();
00740     for (const Iterator I = m_pContainer.begin(); I != m_pContainer.end() ++I)
00741     {
00742         StringBase& StringToShow = *I->GetStringToShow();
00743         m_pListControl->AddItem(&StringToShow);
00744     }
00745 
00746     return TRUE;
00747 }
00748 
00749 
00750 
00751 
00752 class UserVisibleString : public String_256, public Notifier
00753 {
00754 public:
00755     virtual ~String();
00756     String(Notifiable* pTell = &Nobody );
00757     String(const String& OtherString , Notifiable* pTell = &Nobody );
00758 
00759 private:
00760     Notifiable* m_pObserver;
00761 
00762 };
00763 
00764 */
00765 
00766 
00767 #endif  // INC_GADGET

Generated on Sat Nov 10 03:45:24 2007 for Camelot by  doxygen 1.4.4