Difference between revisions of "User:Ericb/Salframe.hxx"

From Apache OpenOffice Wiki
Jump to: navigation, search
 
(26 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
VCL home page [[user:ericb]]
 +
 
Defines types and styles for the frames
 
Defines types and styles for the frames
 +
==Includes==
 +
To be completed
 +
 +
== Macro ==
 +
 +
 +
===Defines macro for the System Abstraction Layer Frame Types ===
 +
 +
Macros defining frame types.
 +
Naming convention: TOTOP_ followed by Frame type name in the Macro name:  (ie TOTOP_RESTOREWHENMIN 0x0001)
 +
 +
See vcl/inc/Salframe.hxx for more information
 +
 +
===Defines macros for the System Abstraction Layer Frame Style ===
 +
 +
Macros defining styles for the frames
 +
 +
*  (DEFAULT->0x00000001)
 +
 +
*  no shadow effect on WindowsXP: NOSHADOW->0x00000010
 +
*  indicate tooltip windows, so they can always be topmost: TOOLTIP->0x00000020
 +
*  windows without windowmanager decoration, this typically only applies to floating windows: OWNERDRAWDECORATION->0x00000040
 +
*  dialogs: DIALOG->0x00000080
 +
*  system child window: CHILD->0x10000000
 +
*  floating window: FLOAT->0x20000000
 +
*  toolwindows should be painted with a smaller decoration: TOOLWINDOW->0x40000000
 +
*  the window containing the intro bitmap, aka splashscreen: INTRO->0x80000000
 +
 +
 +
===Defines macros for the Flags for  System Abstraction Layer Frame Position and Size===
 +
 
 +
* Y->0x0002, WIDTH->0x0004, HEIGHT->0x0008
 +
 +
 +
--------------------------------------------------------
 +
 +
== Methods ==
 +
 +
virtual SalGraphics*        GetGraphics() = 0;
 +
 +
method acquiring pointer on Graphics
 +
 +
virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0;
 +
releases graphics
 +
test using DBG_ASSERT():
 +
checks if graphic exist and is valid before releasing. If not errors will be sent.
 +
 +
virtual BOOL PostEvent( void* pData ) = 0;
 +
sends event to  X11
 +
 +
virtual void     SetTitle( const XubString& rTitle ) = 0;
 +
sets WMN name (WMN = Window Manager's Name)
 +
 +
virtual void     SetIcon( USHORT nIcon ) = 0;
 +
sets icon size:
 +
calculates max icon size,
 +
then checks if gnome or KDE is running and sets icon accordingly
 +
then plays around with WMH: Window Manager Hints (resize & Co) << to be corrected
 +
 +
native menu implementation - currently empty
 +
virtual void                    SetMenu( SalMenu *pSalMenu ) = 0;
 +
virtual void                    DrawMenuBar() = 0;
 +
so these two methods are empty
 +
 +
virtual void                SetExtendedFrameStyle( SalExtStyle nExtStyle ) = 0;
 +
Sets Extended Frame Style
 +
no idea how it works
 +
uses rtl and saldata
 +
 +
 +
    virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE ) = 0;
 +
 +
Before the window is visible, a resize event  must be sent with the correct size
 +
 +
  virtual void Enable( BOOL bEnable ) = 0;
 +
  NYI: enable/disable frame
  
Defines marcro for the SalFrameTypes :
 
  
  SAL_FRAME_TOTOP_RESTOREWHENMIN      ((USHORT)0x0001)
 
  SAL_FRAME_TOTOP_FOREGROUNDTASK      ((USHORT)0x0002)
 
  SAL_FRAME_TOTOP_GRABFOCUS          ((USHORT)0x0004)
 
  SAL_FRAME_TOTOP_GRABFOCUS_ONLY     ((USHORT)0x0008)
 
  SAL_FRAME_ENDEXTTEXTINPUT_COMPLETE  ((USHORT)0x0001)
 
  SAL_FRAME_ENDEXTTEXTINPUT_CANCEL    ((USHORT)0x0002)
 
  
 +
    // Set ClientSize and Center the Window to the desktop
 +
    // and send/post a resize message
 +
virtual void                SetMinClientSize( long nWidth, long nHeight ) = 0;
  
 +
Sets minimum Clients Size
  
Defines marcro for the SalFrameStyle :
+
virtual void                SetMaxClientSize( long nWidth, long nHeight ) = 0;
 +
Similar to  SetMinClientSize, Sets Maximum Clients Size
  
SAL_FRAME_STYLE_DEFAULT            ((ULONG)0x00000001)
+
virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ) = 0;
  SAL_FRAME_STYLE_MOVEABLE            ((ULONG)0x00000002)
+
  Sets postion and size of window
  SAL_FRAME_STYLE_SIZEABLE            ((ULONG)0x00000004)
+
  sarts by getting top left corner
  SAL_FRAME_STYLE_CLOSEABLE          ((ULONG)0x00000008)
+
  then get width end length
   
+
  and then sets position
  no shadow effect on WindowsXP
+
  SAL_FRAME_STYLE_NOSHADOW            ((ULONG)0x00000010)
+
  indicate tooltip windows, so they can always be topmost
+
  SAL_FRAME_STYLE_TOOLTIP            ((ULONG)0x00000020)
+
  windows without windowmanager decoration, this typically only applies to floating windows
+
  SAL_FRAME_STYLE_OWNERDRAWDECORATION ((ULONG)0x00000040)
+
  dialogs
+
  SAL_FRAME_STYLE_DIALOG              ((ULONG)0x00000080)
+
  system child window
+
  SAL_FRAME_STYLE_CHILD              ((ULONG)0x10000000)
+
  floating window
+
  SAL_FRAME_STYLE_FLOAT              ((ULONG)0x20000000)
+
  toolwindows should be painted with a smaller decoration
+
  SAL_FRAME_STYLE_TOOLWINDOW          ((ULONG)0x40000000)
+
  the window containing the intro bitmap, aka splashscreen
+
  SAL_FRAME_STYLE_INTRO              ((ULONG)0x80000000)
+
  
Defines macro for the Flags for SetPosSize :
+
virtual void GetClientSize( long& rWidth, long& rHeight ) = 0;
  
 +
-----------------------------------------------
  
SAL_FRAME_POSSIZE_Y                ((USHORT)0x0002)
+
Work in progress
SAL_FRAME_POSSIZE_WIDTH            ((USHORT)0x0004)
+
SAL_FRAME_POSSIZE_HEIGHT            ((USHORT)0x0008)
+

Latest revision as of 11:23, 25 March 2010

VCL home page user:ericb

Defines types and styles for the frames

Includes

To be completed

Macro

Defines macro for the System Abstraction Layer Frame Types

Macros defining frame types. Naming convention: TOTOP_ followed by Frame type name in the Macro name: (ie TOTOP_RESTOREWHENMIN 0x0001)

See vcl/inc/Salframe.hxx for more information

Defines macros for the System Abstraction Layer Frame Style

Macros defining styles for the frames

  • (DEFAULT->0x00000001)
  • no shadow effect on WindowsXP: NOSHADOW->0x00000010
  • indicate tooltip windows, so they can always be topmost: TOOLTIP->0x00000020
  • windows without windowmanager decoration, this typically only applies to floating windows: OWNERDRAWDECORATION->0x00000040
  • dialogs: DIALOG->0x00000080
  • system child window: CHILD->0x10000000
  • floating window: FLOAT->0x20000000
  • toolwindows should be painted with a smaller decoration: TOOLWINDOW->0x40000000
  • the window containing the intro bitmap, aka splashscreen: INTRO->0x80000000


Defines macros for the Flags for System Abstraction Layer Frame Position and Size

  • Y->0x0002, WIDTH->0x0004, HEIGHT->0x0008



Methods

virtual SalGraphics* GetGraphics() = 0;

method acquiring pointer on Graphics

virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0;

releases graphics
test using DBG_ASSERT(): 
checks if graphic exist and is valid before releasing. If not errors will be sent.

virtual BOOL PostEvent( void* pData ) = 0;

sends event to  X11

virtual void SetTitle( const XubString& rTitle ) = 0;

sets WMN name (WMN = Window Manager's Name)

virtual void SetIcon( USHORT nIcon ) = 0;

sets icon size:
calculates max icon size,
then checks if gnome or KDE is running and sets icon accordingly 
then plays around with WMH: Window Manager Hints (resize & Co) << to be corrected

native menu implementation - currently empty virtual void SetMenu( SalMenu *pSalMenu ) = 0; virtual void DrawMenuBar() = 0; so these two methods are empty

virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ) = 0; Sets Extended Frame Style no idea how it works uses rtl and saldata


   virtual void				Show( BOOL bVisible, BOOL bNoActivate = FALSE ) = 0;

Before the window is visible, a resize event must be sent with the correct size

 virtual void				Enable( BOOL bEnable ) = 0;
 NYI: enable/disable frame


   // Set ClientSize and Center the Window to the desktop
   // and send/post a resize message

virtual void SetMinClientSize( long nWidth, long nHeight ) = 0;

Sets minimum Clients Size

virtual void SetMaxClientSize( long nWidth, long nHeight ) = 0;

Similar to   SetMinClientSize, Sets Maximum Clients Size

virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags ) = 0;

Sets postion and size of window
sarts by getting top left corner
then get width end length
and then sets position
virtual void				GetClientSize( long& rWidth, long& rHeight ) = 0;

Work in progress

Personal tools