diff options
author | Tor Lillqvist <tml@iki.fi> | 2011-07-31 01:52:37 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2011-07-31 01:52:37 +0300 |
commit | 59a5b4dfb819bdd47394107c0de1ebd8c0573538 (patch) | |
tree | 357c13c2cd2f92d9634e0fb88f543a82a99141de /vcl/inc/ios | |
parent | 704bc46ae43d0386e5762b6a6158c7cef831dd1d (diff) |
More iOS hacking, intermediate commit, certainly not working
Diffstat (limited to 'vcl/inc/ios')
-rw-r--r-- | vcl/inc/ios/salbmp.h | 1 | ||||
-rw-r--r-- | vcl/inc/ios/salframe.h | 11 | ||||
-rw-r--r-- | vcl/inc/ios/salmenu.h | 69 |
3 files changed, 12 insertions, 69 deletions
diff --git a/vcl/inc/ios/salbmp.h b/vcl/inc/ios/salbmp.h index 0c3e1468b154..abba132ee29d 100644 --- a/vcl/inc/ios/salbmp.h +++ b/vcl/inc/ios/salbmp.h @@ -35,6 +35,7 @@ #include "vcl/salbtype.hxx" +#include "ios/salconst.h" #include "ios/salgdi.h" #include "saldata.hxx" diff --git a/vcl/inc/ios/salframe.h b/vcl/inc/ios/salframe.h index 14761fe36ebd..c6dc691d6302 100644 --- a/vcl/inc/ios/salframe.h +++ b/vcl/inc/ios/salframe.h @@ -73,6 +73,8 @@ public: bool mbGraphics:1; // is Graphics used? bool mbShown:1; bool mbInitShow:1; + bool mbPositioned:1; + bool mbSized:1; bool mbPresentation:1; sal_uLong mnStyle; @@ -183,6 +185,15 @@ public: void getResolution( long& o_rDPIX, long& o_rDPIY ); + // actually the follwing methods do the same thing: flipping y coordinates + // but having two of them makes clearer what the coordinate system + // is supposed to be before and after + void VCLToCocoaTouch( CGRect& io_rRect, bool bRelativeToScreen = true ); + void CocoaTouchToVCL( CGRect& io_rRect, bool bRelativeToScreen = true ); + + void VCLToCocoaTouch( CGPoint& io_rPoint, bool bRelativeToScreen = true ); + void CocoaTouchToVCL( CGPoint& io_Point, bool bRelativeToScreen = true ); + CGMutablePathRef getClipPath() const { return mrClippingPath; } // called by VCL_UIApplication to indicate screen settings have changed diff --git a/vcl/inc/ios/salmenu.h b/vcl/inc/ios/salmenu.h index 3f143ac1d976..8a07d94d4f38 100644 --- a/vcl/inc/ios/salmenu.h +++ b/vcl/inc/ios/salmenu.h @@ -42,79 +42,10 @@ class IosSalMenuItem; class IosSalMenu : public SalMenu { - std::vector< IosSalMenuItem* > maItems; - -public: // for OOStatusView - struct MenuBarButtonEntry - { - SalMenuButtonItem maButton; - UIImage* mpUIImage; // cached image - NSString* mpToolTipString; - - MenuBarButtonEntry() : mpUIImage( nil ), mpToolTipString( nil ) {} - MenuBarButtonEntry( const SalMenuButtonItem& i_rItem ) - : maButton( i_rItem), mpUIImage( nil ), mpToolTipString( nil ) {} - }; -private: - std::vector< MenuBarButtonEntry > maButtons; - - MenuBarButtonEntry* findButtonItem( sal_uInt16 i_nItemId ); - void releaseButtonEntry( MenuBarButtonEntry& i_rEntry ); - static void statusLayout(); -public: - IosSalMenu( bool bMenuBar ); - virtual ~IosSalMenu(); - - virtual sal_Bool VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars - // otherwise only menu messages are processed (eg, OLE on Windows) - - virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ); - virtual void RemoveItem( unsigned nPos ); - virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ); - virtual void SetFrame( const SalFrame* pFrame ); - virtual void CheckItem( unsigned nPos, sal_Bool bCheck ); - virtual void EnableItem( unsigned nPos, sal_Bool bEnable ); - virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText ); - virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage); - virtual void GetSystemMenuData( SystemMenuData* pData ); - virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, sal_uLong nFlags); - virtual bool AddMenuBarButton( const SalMenuButtonItem& ); - virtual void RemoveMenuBarButton( sal_uInt16 nId ); - virtual Rectangle GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame ); - - int getItemIndexByPos( sal_uInt16 nPos ) const; - const IosSalFrame* getFrame() const; - - void setMainMenu(); - static void unsetMainMenu(); - static void setDefaultMenu(); - static void enableMainMenu( bool bEnable ); - static void addFallbackMenuItem( UIMenuItem* NewItem ); - static void removeFallbackMenuItem( UIMenuItem* pOldItem ); - - const std::vector< MenuBarButtonEntry >& getButtons() const { return maButtons; } - - bool mbMenuBar; // true - Menubar, false - Menu - UIMenuController* mpMenu; - Menu* mpVCLMenu; // the corresponding vcl Menu object - const IosSalFrame* mpFrame; // the frame to dispatch the menu events to - IosSalMenu* mpParentSalMenu; // the parent menu that contains us (and perhaps has a frame) - - static const IosSalMenu* pCurrentMenuBar; - }; class IosSalMenuItem : public SalMenuItem { -public: - IosSalMenuItem( const SalItemParams* ); - virtual ~IosSalMenuItem(); - - sal_uInt16 mnId; // Item ID - Menu* mpVCLMenu; // VCL Menu into which this MenuItem is inserted - IosSalMenu* mpParentMenu; // The menu in which this menu item is inserted - IosSalMenu* mpSubMenu; // Sub menu of this item (if defined) - UIMenuItem* mpMenuItem; // The UIMenuItem }; #endif // _SV_SALMENU_H |