1*96821c26SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*96821c26SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*96821c26SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*96821c26SAndrew Rist * distributed with this work for additional information 6*96821c26SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*96821c26SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*96821c26SAndrew Rist * "License"); you may not use this file except in compliance 9*96821c26SAndrew Rist * with the License. You may obtain a copy of the License at 10*96821c26SAndrew Rist * 11*96821c26SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*96821c26SAndrew Rist * 13*96821c26SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*96821c26SAndrew Rist * software distributed under the License is distributed on an 15*96821c26SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*96821c26SAndrew Rist * KIND, either express or implied. See the License for the 17*96821c26SAndrew Rist * specific language governing permissions and limitations 18*96821c26SAndrew Rist * under the License. 19*96821c26SAndrew Rist * 20*96821c26SAndrew Rist *************************************************************/ 21*96821c26SAndrew Rist 22*96821c26SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _OBJDLG_HXX 25cdf0e10cSrcweir #define _OBJDLG_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <svheader.hxx> 28cdf0e10cSrcweir #include <vcl/floatwin.hxx> 29cdf0e10cSrcweir #include <vcl/toolbox.hxx> 30cdf0e10cSrcweir #include <vcl/fixed.hxx> 31cdf0e10cSrcweir #include "vcl/image.hxx" 32cdf0e10cSrcweir 33cdf0e10cSrcweir #include <bastype2.hxx> 34cdf0e10cSrcweir 35cdf0e10cSrcweir class StarBASIC; 36cdf0e10cSrcweir 37cdf0e10cSrcweir class ObjectTreeListBox : public BasicTreeListBox 38cdf0e10cSrcweir { 39cdf0e10cSrcweir private: 40cdf0e10cSrcweir 41cdf0e10cSrcweir virtual void Command( const CommandEvent& rCEvt ); 42cdf0e10cSrcweir virtual void MouseButtonDown( const MouseEvent& rMEvt ); 43cdf0e10cSrcweir 44cdf0e10cSrcweir public: 45cdf0e10cSrcweir ObjectTreeListBox( Window* pParent, const ResId& rRes ); 46cdf0e10cSrcweir ~ObjectTreeListBox(); 47cdf0e10cSrcweir }; 48cdf0e10cSrcweir 49cdf0e10cSrcweir class ObjectCatalogToolBox_Impl: public ToolBox 50cdf0e10cSrcweir { 51cdf0e10cSrcweir public: 52cdf0e10cSrcweir ObjectCatalogToolBox_Impl(Window * pParent, ResId const & rResId, 53cdf0e10cSrcweir ResId const & rImagesHighContrastId); 54cdf0e10cSrcweir 55cdf0e10cSrcweir private: 56cdf0e10cSrcweir virtual void DataChanged(DataChangedEvent const & rDCEvt); 57cdf0e10cSrcweir 58cdf0e10cSrcweir void setImages(); 59cdf0e10cSrcweir 60cdf0e10cSrcweir ImageList m_aImagesNormal; 61cdf0e10cSrcweir ImageList m_aImagesHighContrast; 62cdf0e10cSrcweir bool m_bHighContrast; 63cdf0e10cSrcweir }; 64cdf0e10cSrcweir 65cdf0e10cSrcweir class ObjectCatalog : public FloatingWindow 66cdf0e10cSrcweir { 67cdf0e10cSrcweir private: 68cdf0e10cSrcweir ObjectTreeListBox aMacroTreeList; 69cdf0e10cSrcweir ObjectCatalogToolBox_Impl aToolBox; 70cdf0e10cSrcweir FixedText aMacroDescr; 71cdf0e10cSrcweir Link aCancelHdl; 72cdf0e10cSrcweir 73cdf0e10cSrcweir protected: 74cdf0e10cSrcweir DECL_LINK( ToolBoxHdl, ToolBox* ); 75cdf0e10cSrcweir void CheckButtons(); 76cdf0e10cSrcweir DECL_LINK( TreeListHighlightHdl, SvTreeListBox * ); 77cdf0e10cSrcweir void UpdateFields(); 78cdf0e10cSrcweir virtual void Move(); 79cdf0e10cSrcweir virtual sal_Bool Close(); 80cdf0e10cSrcweir virtual void Resize(); 81cdf0e10cSrcweir 82cdf0e10cSrcweir public: 83cdf0e10cSrcweir ObjectCatalog( Window * pParent ); 84cdf0e10cSrcweir virtual ~ObjectCatalog(); 85cdf0e10cSrcweir 86cdf0e10cSrcweir void UpdateEntries(); 87cdf0e10cSrcweir void SetCurrentEntry( BasicEntryDescriptor& rDesc ); 88cdf0e10cSrcweir 89cdf0e10cSrcweir void SetCancelHdl( const Link& rLink ) { aCancelHdl = rLink; } 90cdf0e10cSrcweir }; 91cdf0e10cSrcweir 92cdf0e10cSrcweir #endif //_OBJDLG_HXX 93cdf0e10cSrcweir 94