xref: /aoo42x/main/padmin/source/titlectrl.hxx (revision 23e9c6ca)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _PAD_TITLECTRL_HXX_
25 #define _PAD_TITLECTRL_HXX_
26 
27 #include <vcl/ctrl.hxx>
28 #include <vcl/image.hxx>
29 
30 namespace padmin
31 {
32 
33 class TitleImage : public Control
34 {
35     Image				m_aImage;
36     String				m_aText;
37     Color				m_aBGColor;
38     Point				m_aImagePos;
39     Point				m_aTextPos;
40 
41     bool				m_bArranged;
42 
43     void arrange();
44 public:
45     TitleImage( Window* pParent, const ResId& rResId );
46     ~TitleImage();
47 
48     virtual void Paint( const Rectangle& rRect );
49 
50     void SetImage( const Image& rImage );
GetImage() const51     const Image& GetImage() const { return m_aImage; }
52 
53     virtual void SetText( const String& rText );
GetText() const54     virtual String GetText() const { return m_aText; }
55 
56     void SetBackgroundColor( const Color& rColor );
GetBackgroundColor() const57     const Color& GetBackgroundColor() const { return m_aBGColor; }
58 };
59 
60 }
61 
62 #endif // _PAD_TITLECTRL_HXX_
63