xref: /aoo42x/main/basctl/source/basicide/objdlg.hxx (revision d67f091b)
196821c26SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
396821c26SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
496821c26SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
596821c26SAndrew Rist  * distributed with this work for additional information
696821c26SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
796821c26SAndrew Rist  * to you under the Apache License, Version 2.0 (the
896821c26SAndrew Rist  * "License"); you may not use this file except in compliance
996821c26SAndrew Rist  * with the License.  You may obtain a copy of the License at
1096821c26SAndrew Rist  *
1196821c26SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
1296821c26SAndrew Rist  *
1396821c26SAndrew Rist  * Unless required by applicable law or agreed to in writing,
1496821c26SAndrew Rist  * software distributed under the License is distributed on an
1596821c26SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1696821c26SAndrew Rist  * KIND, either express or implied.  See the License for the
1796821c26SAndrew Rist  * specific language governing permissions and limitations
1896821c26SAndrew Rist  * under the License.
1996821c26SAndrew Rist  *
2096821c26SAndrew Rist  *************************************************************/
2196821c26SAndrew Rist 
2296821c26SAndrew 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 );
43*d67f091bSTsutomu Uchino 	virtual void	KeyInput( const KeyEvent& rEvt );
44cdf0e10cSrcweir 
45*d67f091bSTsutomu Uchino 	bool			OpenCurrent();
46cdf0e10cSrcweir public:
47cdf0e10cSrcweir 			ObjectTreeListBox( Window* pParent, const ResId& rRes );
48cdf0e10cSrcweir 			~ObjectTreeListBox();
49cdf0e10cSrcweir };
50cdf0e10cSrcweir 
51cdf0e10cSrcweir class ObjectCatalogToolBox_Impl: public ToolBox
52cdf0e10cSrcweir {
53cdf0e10cSrcweir public:
54cdf0e10cSrcweir     ObjectCatalogToolBox_Impl(Window * pParent, ResId const & rResId,
55cdf0e10cSrcweir                               ResId const & rImagesHighContrastId);
56cdf0e10cSrcweir 
57cdf0e10cSrcweir private:
58cdf0e10cSrcweir     virtual void DataChanged(DataChangedEvent const & rDCEvt);
59cdf0e10cSrcweir 
60cdf0e10cSrcweir     void setImages();
61cdf0e10cSrcweir 
62cdf0e10cSrcweir     ImageList m_aImagesNormal;
63cdf0e10cSrcweir     ImageList m_aImagesHighContrast;
64cdf0e10cSrcweir     bool m_bHighContrast;
65cdf0e10cSrcweir };
66cdf0e10cSrcweir 
67cdf0e10cSrcweir class ObjectCatalog : public FloatingWindow
68cdf0e10cSrcweir {
69cdf0e10cSrcweir private:
70cdf0e10cSrcweir 	ObjectTreeListBox	aMacroTreeList;
71cdf0e10cSrcweir     ObjectCatalogToolBox_Impl aToolBox;
72cdf0e10cSrcweir 	FixedText			aMacroDescr;
73cdf0e10cSrcweir 	Link				aCancelHdl;
74cdf0e10cSrcweir 
75cdf0e10cSrcweir protected:
76cdf0e10cSrcweir 	DECL_LINK( ToolBoxHdl, ToolBox* );
77cdf0e10cSrcweir 	void				CheckButtons();
78cdf0e10cSrcweir 	DECL_LINK( TreeListHighlightHdl, SvTreeListBox * );
79cdf0e10cSrcweir 	void				UpdateFields();
80cdf0e10cSrcweir 	virtual void		Move();
81cdf0e10cSrcweir 	virtual sal_Bool		Close();
82cdf0e10cSrcweir 	virtual void		Resize();
83cdf0e10cSrcweir 
84cdf0e10cSrcweir public:
85cdf0e10cSrcweir 	ObjectCatalog( Window * pParent );
86cdf0e10cSrcweir 	virtual ~ObjectCatalog();
87cdf0e10cSrcweir 
88cdf0e10cSrcweir 	void				UpdateEntries();
89cdf0e10cSrcweir     void                SetCurrentEntry( BasicEntryDescriptor& rDesc );
90cdf0e10cSrcweir 
SetCancelHdl(const Link & rLink)91cdf0e10cSrcweir 	void				SetCancelHdl( const Link& rLink ) { aCancelHdl = rLink; }
92cdf0e10cSrcweir };
93cdf0e10cSrcweir 
94cdf0e10cSrcweir #endif	//_OBJDLG_HXX
95cdf0e10cSrcweir 
96