xref: /AOO41X/main/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx (revision 2e2212a7c22e96cf6f6fab0dd042c34a45a64bd6)
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 #ifndef DBAUI_TABLEFIELDDESCGENPAGE_HXX
24 #define DBAUI_TABLEFIELDDESCGENPAGE_HXX
25 
26 #ifndef _SV_TABPAGE_HXX
27 #include <vcl/tabpage.hxx>
28 #endif
29 #ifndef DBACCESS_TABLEDESIGN_ICLIPBOARDTEST_HXX
30 #include "IClipBoardTest.hxx"
31 #endif
32 
33 namespace dbaui
34 {
35     class OTableDesignHelpBar;
36     class OFieldDescription;
37     class OTableFieldControl;
38     class OTableEditorCtrl;
39     //==================================================================
40     class OFieldDescGenWin : public TabPage
41                             ,public IClipboardTest
42     {
43 
44         OTableFieldControl  *m_pFieldControl;
45     protected:
46         virtual void Resize();
47 
48     public:
49         OFieldDescGenWin( Window* pParent, OTableDesignHelpBar* pHelpBar );
50         virtual ~OFieldDescGenWin();
51 
52         virtual void GetFocus();
53         virtual void LoseFocus();
54         virtual void Init();
55 
56         void DisplayData( OFieldDescription* pFieldDescr );
57         void SaveData( OFieldDescription* pFieldDescr );
58         void SetControlText( sal_uInt16 nControlId, const String& rText );
59         String GetControlText( sal_uInt16 nControlId );
60         void SetReadOnly( sal_Bool bReadOnly );
61 #if OSL_DEBUG_LEVEL > 0
62         OTableEditorCtrl* GetEditorCtrl();
63 #endif
64         //  short GetFormatCategory(OFieldDescription* pFieldDescr);
65             // liefert zum am Feld eingestellten Format einen der CAT_xxx-Werte (CAT_NUMBER, CAT_DATE ...)
66 
67         String BoolStringPersistent(const String& rUIString) const;
68         String BoolStringUI(const String& rPersistentString) const;
69 
70         // IClipboardTest
71         virtual sal_Bool isCutAllowed();
72         virtual sal_Bool isCopyAllowed();
73         virtual sal_Bool isPasteAllowed();
hasChildPathFocus()74         virtual sal_Bool hasChildPathFocus() { return HasChildPathFocus(); }
75 
76         virtual void copy();
77         virtual void cut();
78         virtual void paste();
79 
getFieldControl() const80         inline OTableFieldControl*  getFieldControl() const { return m_pFieldControl; }
81     };
82 }
83 #endif // DBAUI_TABLEFIELDDESCGENPAGE_HXX
84 
85