home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / fmselmul.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.8 KB  |  86 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #ifndef __FORM_SELECT_MULT_H
  20. #define __FORM_SELECT_MULT_H
  21.  
  22. //    This file is dedicated to form type select mult elements
  23. //        otherwise known as list boxes on windows and
  24. //        their implementation as requried by the XP layout
  25. //        library.
  26.  
  27. //    Required includes.
  28. #include "fmabstra.h"
  29.  
  30. class CFormSelectMult : public CFormElement    {
  31. //    Construction/destruction.
  32. //    Do not construct directly, use GetFormElement instead.
  33. protected:
  34.     CFormSelectMult();
  35.     virtual ~CFormSelectMult();
  36.     friend CFormElement;
  37.  
  38. //    The form element we represent.
  39. //    This can be called at various times, so always update
  40. //        our information when this function is called
  41. //        (refresh cached or calculated XP data).
  42. protected:
  43.     virtual void SetElement(LO_FormElementStruct *pFormElement);
  44.  
  45. //    This is called to inform us of the owning context.
  46. //    Once set, we should query it to decide how we will represent our
  47. //        selves (printing through a DC, existing as a window, etc).
  48. protected:
  49.     virtual void SetContext(CAbstractCX *pCX);
  50.  
  51. //    Actions that we've been told to take.
  52. public:
  53.     virtual void DisplayFormElement(LTRB& Rect);
  54. protected:
  55.     //    Destroy the widget (window) implemenation of the form.
  56.     virtual void DestroyWidget();
  57.  
  58.     //    Create the widget (window) implementation of the form
  59.     //        but DO NOT DISPLAY.
  60.     virtual void CreateWidget();
  61.  
  62.     //    Copy the current data out of the layout struct into the form
  63.     //        widget, or mark that you should represent using the current data.
  64.     virtual void UseCurrentData();
  65.  
  66.     //    Copy the default data out of the layout struct into the form
  67.     //        widget, or mark that you should represent using the default data.
  68.     virtual void UseDefaultData();
  69.  
  70.     //    Fill in the layout size information in the layout struct regarding
  71.     //        the dimensions of the widget.
  72.     virtual void FillSizeInfo();
  73.  
  74.     //    Copy the current data out of the form element back into the
  75.     //        layout struct.
  76.     virtual void UpdateCurrentData();
  77.  
  78. public:
  79.     virtual HWND GetRaw();
  80.  
  81. private:
  82.     CMochaListBox *m_pWidget;
  83. };
  84.  
  85. #endif // __FORM_SELECT_MULT_H
  86.