home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iwindow.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  22.1 KB  |  779 lines

  1. #ifndef _IWINDOW_
  2. #define _IWINDOW_
  3. /*******************************************************************************
  4. * FILE NAME: iwindow.hpp                                                       *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IWindow                                                                  *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   IBM Open Class Library                                                     *
  12. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  13. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. *******************************************************************************/
  18. #include <ibitflag.hpp>
  19. #include <ievent.hpp>
  20. #include <ihandle.hpp>
  21. #include <inotify.hpp>
  22. #include <ipoint.hpp>
  23. #include <ibidiset.hpp>
  24.  
  25. extern "C" {
  26.   extern void* __stdcall _pfnwpICWinProc ( void*,
  27.                                            unsigned long,
  28.                                            void*,
  29.                                            void* );
  30. }
  31.  
  32. class IAcceleratorTable;
  33. class IAccelTblHandle;
  34. class IColor;
  35. class IDMItemProvider;
  36. class IException;
  37. class IFont;
  38. class IHandler;
  39. class INotificationEvent;
  40. class IRectangle;
  41. class IString;
  42. class IChildCursorData;
  43. class IWindowBidiData;
  44. class IWindowData;
  45. class IWindowNotifyHandler;
  46.  
  47. #pragma pack(4)
  48.  
  49. class IWindow : public INotifier {
  50. typedef INotifier
  51.   Inherited;
  52.  
  53. public:
  54. /*------------------------------- Constructors -------------------------------*/
  55.   IWindow ( unsigned long        identifier,
  56.             IWindow*             parent );
  57.   IWindow ( const IWindowHandle& handle );
  58.  
  59. virtual
  60.  ~IWindow ( );
  61.  
  62. /*---------------------------------- Styles ----------------------------------*/
  63. INESTEDBITFLAGCLASSDEF0( Style, IWindow );
  64. static const Style
  65.   IC_IMPORTU noStyle,
  66.   IC_IMPORTU visible,
  67.   IC_IMPORTU disabled,
  68.   IC_IMPORTU clipChildren,
  69. #ifndef IC_WIN_FLAGNOP
  70.   IC_IMPORTU clipToParent,
  71.   IC_IMPORTU saveBits,
  72.   IC_IMPORTU synchPaint,
  73. #endif
  74.   IC_IMPORTU clipSiblings;
  75.  
  76. virtual unsigned long
  77.   convertToGUIStyle ( const IBitFlag& style,
  78.                       Boolean         extendedOnly = false ) const;
  79.  
  80. /*---------------------------- Window Positioning ----------------------------*/
  81. virtual IWindow
  82.  &moveTo     ( const IPoint&     newPosition ),
  83.  &sizeTo     ( const ISize&      newSize ),
  84.  &moveSizeTo ( const IRectangle& newSizeAndPosition );
  85.  
  86. virtual IPoint
  87.   position   ( ) const;
  88.  
  89. virtual ISize
  90.   parentSize ( ) const,
  91.   size       ( ) const;
  92.  
  93. virtual IRectangle
  94.   nativeRect ( ) const,
  95.   rect       ( ) const;
  96.  
  97. static ISize
  98.   parentSize ( const IWindowHandle& windowHandle );
  99.  
  100. /*-------------------------------- Attributes --------------------------------*/
  101. virtual IWindow
  102.  &setOwner                  ( const IWindow* newOwner ),
  103.  &setParent                 ( const IWindow* newParent ),
  104.  &setId                     ( unsigned long  newIdentifier ),
  105.  &enable                    ( Boolean        enableWindow = true ),
  106.  &disable                   ( ),
  107.  &setFocus                  ( );
  108.  
  109. IWindow
  110.  &setHelpId                 ( unsigned long  helpTopicId );
  111.  
  112. IWindow
  113.  *parent                    ( ) const;
  114.  
  115. virtual IWindow
  116.  *owner                     ( ) const;
  117.  
  118. Boolean
  119.   isEnabled                 ( ) const;
  120.  
  121. virtual Boolean
  122.   hasFocus                  ( ) const,
  123.   isValid                   ( ) const,
  124.   isGroup                   ( ) const,
  125.   isTabStop                 ( ) const,
  126.   isFrameWindow             ( ) const;
  127.  
  128. static IWindow
  129.  *desktopWindow             ( );
  130.  
  131. static IWindow
  132.  *objectWindow              ( );
  133.  
  134. virtual IWindowHandle
  135.   handle                    ( ) const;
  136.  
  137. static IWindow
  138.  *windowWithHandle          ( const IWindowHandle& windowHandle,
  139.                               Boolean              allThreads = true ),
  140.  *windowWithOwner           ( unsigned long        identifier,
  141.                               const IWindow*       owner,
  142.                               Boolean              allThreads = true ),
  143.  *windowWithParent          ( unsigned long        identifier,
  144.                               const IWindow*       parent,
  145.                               Boolean              allThreads = true );
  146.  
  147. static IWindowHandle
  148.   handleWithParent          ( unsigned long        identifier,
  149.                               const IWindowHandle& parent );
  150.  
  151. static Boolean
  152.   isWindowValid             ( const IWindow*       window );
  153.  
  154. static IWindowHandle
  155.   handleWithPointerCaptured ( );
  156.  
  157. virtual unsigned long
  158.   id                        ( ) const;
  159.  
  160. unsigned long
  161.   helpId                    ( ) const;
  162.  
  163.  
  164. /*------------------------- Capturing Pointer Events -------------------------*/
  165. virtual IWindow
  166.  &capturePointer     ( Boolean capture = true ),
  167.  &releasePointer     ( );
  168.  
  169. virtual Boolean
  170.   hasPointerCaptured ( ) const;
  171.  
  172. /*--------------------------- Pointer Positioning ----------------------------*/
  173. static void
  174.   movePointerTo   ( const IPoint& position );
  175.  
  176. static IPoint
  177.   pointerPosition ( );
  178.  
  179. /*------------------------------ Sibling Order -------------------------------*/
  180. enum SiblingOrder {
  181.   onTopOfSiblings,
  182.   behindSiblings
  183.   };
  184.  
  185. virtual IWindow
  186.  &positionBehindSiblings ( ),
  187.  &positionOnSiblings     ( ),
  188.  &positionBehindSibling  ( const IWindowHandle& siblingWindow );
  189.  
  190. static void
  191.  setDefaultOrdering      ( SiblingOrder         order );
  192. static SiblingOrder
  193.  defaultOrdering         ( );
  194.  
  195. /*--------------------------- Event Send and Post ----------------------------*/
  196. enum EventType {
  197.   command=1,
  198.   systemCommand,
  199.   control,
  200.   help,
  201.   character
  202.   };
  203.  
  204. virtual const IWindow
  205.  &postEvent ( unsigned long           eventId,
  206.               const IEventParameter1& parm1 = 0,
  207.               const IEventParameter2& parm2 = 0 ) const,
  208.  &postEvent ( const IEvent&           event )     const,
  209.  &postEvent ( EventType               eventType,
  210.               const IEventParameter1& parm1 = 0,
  211.               const IEventParameter2& parm2 = 0 ) const;
  212.  
  213. virtual IEventResult
  214.   sendEvent ( unsigned long           eventId,
  215.               const IEventParameter1& parm1 = 0,
  216.               const IEventParameter2& parm2 = 0 ) const,
  217.   sendEvent ( const IEvent&           event )     const,
  218.   sendEvent ( EventType               eventType,
  219.               const IEventParameter1& parm1 = 0,
  220.               const IEventParameter2& parm2 = 0 ) const;
  221.  
  222. /*----------------------------- Window Painting ------------------------------*/
  223. enum RefreshType {
  224.   paintAll,
  225.   immediate,
  226.   paintAllImmediate
  227.   };
  228.  
  229. virtual IWindow
  230.  &show               ( Boolean           showWindow = true ),
  231.  &hide               ( ),
  232.  &enableUpdate       ( Boolean           enableWindow = true ),
  233.  &disableUpdate      ( ),
  234.  &refresh            ( RefreshType       type=paintAll ),
  235.  &refresh            ( const IRectangle& invalidRectangle,
  236.                        Boolean           immediate=false ),
  237.  &showSourceEmphasis ( Boolean           show = true ),
  238.  &hideSourceEmphasis ( );
  239.  
  240. Boolean
  241.   isVisible          ( ) const,
  242.   isShowing          ( ) const;
  243.  
  244. virtual IPresSpaceHandle
  245.   presSpace          ( ) const;
  246.  
  247. virtual void
  248.   releasePresSpace   ( const IPresSpaceHandle& presentationSpaceHandle ) const;
  249.  
  250. /*------------------------- Accelerator Key Support --------------------------*/
  251. IWindow
  252.  &setAcceleratorTable  ( const IAcceleratorTable* acceleratorTable ),
  253.  &setAcceleratorHandle ( const IAccelTblHandle&   handle );
  254.  
  255. IAcceleratorTable
  256.   acceleratorTable     ( ) const;
  257. IAccelTblHandle
  258.   acceleratorHandle    ( ) const;
  259.  
  260. /*---------------------------- Compound Controls -----------------------------*/
  261.  
  262. /*----------------------------- Object Deletion ------------------------------*/
  263. IWindow
  264.  &setAutoDeleteObject  ( Boolean autoDelete = true ),
  265.  &setAutoDestroyWindow ( Boolean autoDestroy = false );
  266.  
  267. Boolean
  268.   isAutoDeleteObject   ( ) const,
  269.   isAutoDestroyWindow  ( ) const;
  270.  
  271. /*-------------------------- Drag and Drop Support ---------------------------*/
  272. IDMItemProvider
  273.  *itemProvider    ( ) const;
  274.  
  275. IWindow
  276.  &setItemProvider ( IDMItemProvider* dragProvider );
  277.  
  278.  
  279. class ChildCursor : public IVBase {
  280. typedef IVBase
  281.   Inherited;
  282. public:
  283. /*------------------------------- Constructors -------------------------------*/
  284.   ChildCursor ( IWindow& parent );
  285. virtual
  286.  ~ChildCursor ( );
  287.  
  288. /*----------------------------- Cursor Functions -----------------------------*/
  289. virtual Boolean
  290.   setToFirst ( ),
  291.   setToNext  ( ),
  292.   isValid    ( ) const;
  293.  
  294. virtual void
  295.   invalidate ( );
  296.  
  297. private:
  298. /*----------------------------- Hidden Functions -----------------------------*/
  299.   ChildCursor ( const ChildCursor& cursor );
  300. ChildCursor
  301.  &operator =  ( const ChildCursor& cursor );
  302.  
  303. /*--------------------------------- Private ----------------------------------*/
  304. friend class IWindow;
  305.  
  306. IChildCursorData
  307.  *pCursorData;
  308.  
  309. IEnumHandle
  310.   enumHandle;
  311.  
  312.  
  313. IWindowHandle
  314.   hwnd,
  315.   hwndParent;
  316. }; // IWindow::ChildCursor
  317.  
  318. /*--------------------------- Child Cursor Support ---------------------------*/
  319. IWindowHandle
  320.   childAt ( const ChildCursor& cursor ) const;
  321.  
  322. /*------------------------------ Canvas Support ------------------------------*/
  323. virtual IWindowHandle
  324.   defaultPushButton  ( ) const,
  325.   matchForMnemonic   ( unsigned short character ) const;
  326.  
  327. enum Layout {
  328.   windowCreated=1,
  329.   colorChanged=2,
  330.   sizeChanged=4,
  331.   minimumSizeChanged=8,
  332.   childMinimumSizeChanged=16,
  333.   fontChanged=32,
  334.   fontPropogated=64,
  335.   layoutChanged=128,
  336.   immediateUpdate=256,
  337.   childWindowCreated=512,
  338.   windowDestroyed=1024,
  339.   childWindowDestroyed=2048
  340.   };
  341.  
  342. virtual IWindow
  343.  &setLayoutDistorted ( unsigned long layoutAttributesOn,
  344.                        unsigned long layoutAttributesOff );
  345.  
  346. virtual Boolean
  347.   isLayoutDistorted  ( unsigned long layoutAttribute ) const;
  348.  
  349. IWindow
  350.  &resetMinimumSize   ( ),
  351.  &setMinimumSize     ( const ISize& size );
  352.  
  353. ISize
  354.   minimumSize        ( Boolean windowCalculatedSize = false ) const;
  355.  
  356. virtual IRectangle
  357.   layoutAdjustment   ( ) const,
  358.   visibleRectangle   ( ) const;
  359.  
  360. IWindow
  361.  &enableMinimumSizeCaching    ( Boolean enableCaching = true ),
  362.  &disableMinimumSizeCaching   ( );
  363. Boolean
  364.   isMinimumSizeCachingEnabled ( ) const;
  365.  
  366. /*------------------------------ Miscellaneous -------------------------------*/
  367. static IPoint
  368.   mapPoint ( const IPoint&        point,
  369.              const IWindowHandle& from,
  370.              const IWindowHandle& to );
  371.  
  372. /*------------------------------- Diagnostics --------------------------------*/
  373. virtual IString
  374.   asString    ( ) const,
  375.   asDebugInfo ( ) const;
  376.  
  377. class ExceptionFn : public IVBase {
  378. typedef IVBase
  379.   Inherited;
  380. public:
  381. /*------------------------------- Constructors -------------------------------*/
  382. virtual
  383.  ~ExceptionFn ( );
  384.  
  385. /*--------------------------- Exception Processing ---------------------------*/
  386. virtual Boolean
  387.   handleException ( IException& dispatcherException,
  388.                     IEvent&     exceptionEvent ) = 0;
  389. }; // IWindow::ExceptionFn
  390.  
  391.  
  392. /*--------------------------- Exception Processing ---------------------------*/
  393. static IWindow::ExceptionFn
  394.  *setExceptionFunction ( IWindow::ExceptionFn* exceptionFunction ),
  395.  *exceptionFunction    ( );
  396.  
  397. virtual Boolean
  398.   handleException      ( IException& dispatcherException,
  399.                          IEvent&     exceptionEvent );
  400.  
  401. /*----------------------------- Color Functions ------------------------------*/
  402. virtual IColor
  403.   foregroundColor              ( ) const,
  404.   backgroundColor              ( ) const;
  405. #ifndef IC_WIN_FLAGNOP
  406. virtual IColor
  407.   borderColor                  ( ) const;
  408. #endif
  409.  
  410. virtual IWindow
  411.  &setForegroundColor           ( const IColor& color ),
  412.  &setBackgroundColor           ( const IColor& color );
  413. #ifndef IC_WIN_FLAGNOP
  414. virtual IWindow
  415.  &setBorderColor               ( const IColor& color );
  416. #endif
  417.  
  418. #ifndef IC_MOTIFWIN_FLAGNOP
  419. virtual IColor
  420.   shadowColor                  ( ) const,
  421.   disabledForegroundColor      ( ) const,
  422.   disabledBackgroundColor      ( ) const,
  423.   hiliteForegroundColor        ( ) const,
  424.   hiliteBackgroundColor        ( ) const,
  425.   activeColor                  ( ) const,
  426.   inactiveColor                ( ) const;
  427.  
  428. virtual IWindow
  429.  &setShadowColor               ( const IColor& color ),
  430.  &setDisabledForegroundColor   ( const IColor& color ),
  431.  &setDisabledBackgroundColor   ( const IColor& color ),
  432.  &setHiliteForegroundColor     ( const IColor& color ),
  433.  &setHiliteBackgroundColor     ( const IColor& color ),
  434.  &setActiveColor               ( const IColor& color ),
  435.  &setInactiveColor             ( const IColor& color );
  436. #endif // !IC_MOTIFWIN_FLAGNOP
  437. virtual IWindow
  438.  &resetForegroundColor         ( ),
  439.  &resetBackgroundColor         ( );
  440. #ifndef IC_MOTIFWIN_FLAGNOP
  441. virtual IWindow
  442.  &resetBorderColor             ( ),
  443.  &resetShadowColor             ( ),
  444.  &resetDisabledForegroundColor ( ),
  445.  &resetDisabledBackgroundColor ( ),
  446.  &resetHiliteForegroundColor   ( ),
  447.  &resetHiliteBackgroundColor   ( ),
  448.  &resetActiveColor             ( ),
  449.  &resetInactiveColor           ( );
  450. #endif //!IC_MOTIFWIN_FLAGNOP
  451.  
  452. /*------------------------------ Font Functions ------------------------------*/
  453. virtual IWindow
  454.  &setFont       ( const IFont& font );
  455.  
  456. virtual IWindow
  457.  &resetFont     ( );
  458.  
  459. virtual IFont
  460.   font          ( ) const;
  461.  
  462. ISize
  463.   characterSize ( ) const;
  464.  
  465. /*-------------------------- Observer Notification ---------------------------*/
  466. virtual IWindow
  467.  &enableNotification       ( Boolean enable = true ),
  468.  &disableNotification      ( );
  469.  
  470. virtual Boolean
  471.   isEnabledForNotification ( ) const;
  472.  
  473. virtual IWindow
  474.  ¬ifyObservers          ( const INotificationEvent& event );
  475.  
  476. /*------------------------------ Notifications -------------------------------*/
  477. static INotificationId const
  478.   IC_IMPORTU sizeId,
  479.   IC_IMPORTU positionId,
  480.   IC_IMPORTU visibleId,
  481.   IC_IMPORTU enableId,
  482.   IC_IMPORTU deleteId,
  483.   IC_IMPORTU focusId,
  484.   IC_IMPORTU foregroundColorId,
  485.   IC_IMPORTU backgroundColorId,
  486. #ifndef IC_WIN_FLAGNOP
  487.   IC_IMPORTU borderColorId,
  488.   IC_IMPORTU shadowColorId,
  489.   IC_IMPORTU disabledForegroundColorId,
  490.   IC_IMPORTU disabledBackgroundColorId,
  491.   IC_IMPORTU activeColorId,
  492.   IC_IMPORTU inactiveColorId,
  493.   IC_IMPORTU hiliteForegroundColorId,
  494.   IC_IMPORTU hiliteBackgroundColorId,
  495. #endif
  496.   IC_IMPORTU fontId,
  497.   IC_IMPORTU commandId,
  498.   IC_IMPORTU systemCommandId;
  499.  
  500. /*---------------------- Event Handling Implementation -----------------------*/
  501. Boolean
  502.   dispatchRemainingHandlers ( IEvent& event,
  503.                               Boolean callDefProc = true );
  504.  
  505. protected:
  506. /*------------------------------ Implementation ------------------------------*/
  507. virtual IWindowHandle
  508.  create            ( unsigned long         id,
  509.                      const char*           text,
  510.                      unsigned long         style,
  511.                      const char*           windowClass,
  512.                      const IWindowHandle&  parent,
  513.                      const IWindowHandle&  owner,
  514.                      const IRectangle&     initRect,
  515.                      const void*           ctlData,
  516.                      const void*           presParams,
  517.                      IWindow::SiblingOrder ordering = defaultOrdering(),
  518.                      unsigned long         extendedStyle = 0 );
  519.  
  520.  
  521. IWindow
  522.  &addHandler       ( IHandler* newHandler ),
  523.  &removeHandler    ( IHandler* oldHandler );
  524.  
  525. Boolean
  526.   isPrimaryWindow  ( ) const;
  527.  
  528. IWindow
  529.  &setColor         ( unsigned long colorArea,
  530.                      const IColor& color ),
  531.  &resetColor       ( unsigned long colorArea );
  532.  
  533. virtual IWindow
  534.  &setStyle         ( unsigned long style ),
  535.  &setExtendedStyle ( unsigned long extendedStyle );
  536.  
  537. virtual unsigned long
  538.   style            ( ) const,
  539.   extendedStyle    ( ) const;
  540.  
  541. IColor
  542.   color            ( unsigned long colorArea ) const,
  543.   color            ( unsigned long colorArea,
  544.                      const IColor& defaultColor ) const;
  545. unsigned short
  546.   windowUShort     ( long index ) const;
  547.  
  548. unsigned long
  549.   windowULong      ( long index ) const;
  550.  
  551. IWindow
  552.  &setWindowData    ( long           index,
  553.                      unsigned short dataValue ),
  554.  &setWindowData    ( long           index,
  555.                      unsigned long  dataValue );
  556.  
  557.  
  558. /*-------------------------- Protected Constructors --------------------------*/
  559.   IWindow ( );
  560.  
  561. /*---------------------------------- Layout ----------------------------------*/
  562. virtual ISize
  563.   calcMinimumSize  ( ) const;
  564. IWindow
  565.  &saveMinimumSize  ( const ISize& size );
  566. ISize
  567.   savedMinimumSize ( ) const;
  568.  
  569. /*---------------------- Event Handling Implementation -----------------------*/
  570. IWindow
  571.  &startHandlingEventsFor ( const IWindowHandle& windowHandle ),
  572.  &startHandlingEventsFor ( unsigned long        identifier,
  573.                            IWindow*             parent );
  574. static void
  575.   addToWindowSet         ( IWindow*             window,
  576.                            const IWindowHandle& windowHandle ),
  577.   removeFromWindowSet    ( IWindow*             window );
  578.  
  579.  
  580. Boolean
  581.   dispatch               ( IEvent& event );
  582.  
  583. IWindow
  584.  &defaultProcedure       ( IEvent& event );
  585.  
  586. Boolean
  587.   deleteIsInProcess      ( ) const;
  588.  
  589.  
  590. /*------------------- Observer Notification Implementation -------------------*/
  591. virtual IWindow
  592.  &addObserver            ( IObserver&             observer,
  593.                            const IEventData&      userData = IEventData(0) ),
  594.  &removeObserver         ( IObserver&             observer ),
  595.  &removeAllObservers     ( );
  596.  
  597. IObserverList
  598.  &observerList           ( ) const;
  599.  
  600. IWindow
  601.  &setNotificationHandler ( IWindowNotifyHandler*  notifyHandler );
  602.  
  603. IWindowNotifyHandler
  604.  *notificationHandler    ( ) const;
  605.  
  606. virtual IWindow
  607.  ¬ifyObservers        ( const INotificationId& notification );
  608.  
  609. /*-------------------------- Drag and Drop Support ---------------------------*/
  610. virtual Boolean
  611.   isDragStarting ( IEvent &event );
  612.  
  613. private:
  614. /*----------------------------- Hidden Functions -----------------------------*/
  615. IWindow     ( const IWindow& window );
  616. IWindow
  617.  &operator= ( const IWindow& window );
  618.  
  619. /*--------------------------------- Private ----------------------------------*/
  620. friend class IHandle;
  621. friend class IHandler;
  622. friend class IFileDialog;
  623. friend class IFontDialog;
  624.  
  625.  
  626. friend class IFont;
  627. friend class IDMDragHandler;
  628. friend class IMessageHandler;
  629.  
  630. enum State {
  631.   autoDeleteObject=1,
  632.   autoDestroyWindow=2,
  633.   deleteInProcess=4,
  634.   primaryWindow=8,
  635.   addedToList=16,
  636.   dispatchInProcess=32,
  637.   needsDelete=64,
  638.   updateRHtInProgress=128,
  639.   neverBeenShown=256,
  640.   forgetBitGravity=512,
  641.   fontWasSet=1024,
  642.   bkgndColorWasSet=2048,
  643.   frgndColorWasSet=4096,
  644.   cacheMinimumSize=8192
  645.   };
  646.  
  647. friend unsigned long const
  648.  &key             ( IWindow* const& window );
  649.  
  650.  
  651. friend void* __stdcall
  652.   _pfnwpICWinProc ( void*         hwnd,
  653.                     unsigned long ulMsg,
  654.                     void*         mp1,
  655.                     void*         mp2 );
  656.  
  657.  
  658. static void
  659.   cleanUpHandler          ( IHandler& handler );
  660.  
  661.  
  662. static Boolean
  663.   useRealCoordinates      ( const IWindow* window );
  664.  
  665. IWindow
  666.  &setDeleteInProcess      ( ),
  667.  &cleanUp                 ( );
  668.  
  669. IWinProc
  670.  *setDefaultProcedure     ( IWinProc* newDefProc );
  671.  
  672. IWindowData
  673.  *pWindowData;
  674.  
  675. unsigned long
  676.   hwnd;
  677.  
  678. /*----------------------------- Obsolete Members -----------------------------*/
  679. #if (IC_OBSOLETE <= IC_OBSOLETE_2)
  680. public:
  681. class BidiSettings;
  682.  
  683. Boolean
  684.   isBidiSupported ( ) const;
  685.  
  686. enum BidiTextType {
  687.   visual,
  688.   implicit
  689.   };
  690.  
  691. enum BidiTextOrientation {
  692.   textLeftToRight,
  693.   textRightToLeft,
  694.   textContextual
  695.   };
  696.  
  697. enum BidiLayout {
  698.   layoutLeftToRight,
  699.   layoutRightToLeft
  700.   };
  701.  
  702. enum BidiNumeralType {
  703.   arabic,
  704.   asStored,
  705.   national,
  706.   contextual
  707.   };
  708.  
  709. enum BidiTextShape {
  710.   displayShaped,
  711.   saveShaped,
  712.   nominalShape,
  713.   initialShape,
  714.   middleShape,
  715.   finalShape,
  716.   isolatedShape
  717.   };
  718.  
  719. virtual IWindow
  720.  &applyBidiSettings ( const BidiSettings& settings,
  721.                       Boolean             childInherit = true,
  722.                       Boolean             refresh      = true );
  723.  
  724. class BidiSettings : public IVBase {
  725. typedef IVBase
  726.   Inherited;
  727. public:
  728.   BidiSettings ( const IWindow& window );
  729.  
  730. virtual
  731.  ~BidiSettings ( );
  732.  
  733. virtual BidiSettings
  734.  &setTextType                   ( BidiTextType        textType ),
  735.  &setTextOrientation            ( BidiTextOrientation textOrientation ),
  736.  &setWindowLayout               ( BidiLayout          windowLayout ),
  737.  &setNumeralDisplay             ( BidiNumeralType     numeralDisplay ),
  738.  &enableSymmetricSwapping       ( Boolean             enable = true ),
  739.  &disableSymmetricSwapping      ( ),
  740.  &enableWordByWordReordering    ( Boolean             enable = true ),
  741.  &disableWordByWordReordering   ( ),
  742.  &setTextShape                  ( BidiTextShape       textShape );
  743.  
  744. BidiTextType
  745.   textType                      ( ) const;
  746. BidiTextOrientation
  747.   textOrientation               ( ) const;
  748. BidiLayout
  749.   windowLayout                  ( ) const;
  750. BidiNumeralType
  751.   numeralDisplay                ( ) const;
  752. Boolean
  753.   isSymmetricSwappingEnabled    ( ) const;
  754. Boolean
  755.   isWordByWordReorderingEnabled ( ) const;
  756. BidiTextShape
  757.   textShape                     ( ) const;
  758.  
  759. private:
  760. friend class IWindow;
  761.   BidiSettings ( const BidiSettings& settings );
  762. BidiSettings
  763.  &operator=    ( const BidiSettings& settings );
  764. IBidiSettings
  765.  *fBidiSettings;
  766. }; // IWindow::BidiSettings
  767.  
  768. private:
  769. friend class IWindow::BidiSettings;
  770. #endif // IC_OBSOLETE
  771.  
  772. }; // IWindow
  773.  
  774. #pragma pack()
  775.  
  776.   #include <iwindow.inl>
  777.  
  778. #endif /* _IWINDOW_ */
  779.