xref: /aoo42x/main/uui/source/fltdlg.hxx (revision b16fc349)
1*b16fc349SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*b16fc349SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*b16fc349SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*b16fc349SAndrew Rist  * distributed with this work for additional information
6*b16fc349SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*b16fc349SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*b16fc349SAndrew Rist  * "License"); you may not use this file except in compliance
9*b16fc349SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*b16fc349SAndrew Rist  *
11*b16fc349SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*b16fc349SAndrew Rist  *
13*b16fc349SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*b16fc349SAndrew Rist  * software distributed under the License is distributed on an
15*b16fc349SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b16fc349SAndrew Rist  * KIND, either express or implied.  See the License for the
17*b16fc349SAndrew Rist  * specific language governing permissions and limitations
18*b16fc349SAndrew Rist  * under the License.
19*b16fc349SAndrew Rist  *
20*b16fc349SAndrew Rist  *************************************************************/
21*b16fc349SAndrew Rist 
22*b16fc349SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef UUI_FLTDLG_HXX
25cdf0e10cSrcweir #define UUI_FLTDLG_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir //_________________________________________________________________________________________________________________
28cdf0e10cSrcweir //  includes
29cdf0e10cSrcweir //_________________________________________________________________________________________________________________
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #include <vcl/dialog.hxx>
32cdf0e10cSrcweir 
33cdf0e10cSrcweir #ifndef _MSGBOX_HXX
34cdf0e10cSrcweir #include <vcl/msgbox.hxx>
35cdf0e10cSrcweir #endif
36cdf0e10cSrcweir #include <vcl/lstbox.hxx>
37cdf0e10cSrcweir 
38cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX
39cdf0e10cSrcweir #include <vcl/button.hxx>
40cdf0e10cSrcweir #endif
41cdf0e10cSrcweir #include <vcl/fixed.hxx>
42cdf0e10cSrcweir #include <tools/string.hxx>
43cdf0e10cSrcweir 
44cdf0e10cSrcweir #include <vector>
45cdf0e10cSrcweir 
46cdf0e10cSrcweir //_________________________________________________________________________________________________________________
47cdf0e10cSrcweir //  namespace
48cdf0e10cSrcweir //_________________________________________________________________________________________________________________
49cdf0e10cSrcweir 
50cdf0e10cSrcweir namespace uui
51cdf0e10cSrcweir {
52cdf0e10cSrcweir 
53cdf0e10cSrcweir //_________________________________________________________________________________________________________________
54cdf0e10cSrcweir //  definitions
55cdf0e10cSrcweir //_________________________________________________________________________________________________________________
56cdf0e10cSrcweir 
57cdf0e10cSrcweir struct FilterNamePair
58cdf0e10cSrcweir {
59cdf0e10cSrcweir     String sInternal;
60cdf0e10cSrcweir     String sUI      ;
61cdf0e10cSrcweir };
62cdf0e10cSrcweir 
63cdf0e10cSrcweir typedef ::std::vector< FilterNamePair > FilterNameList   ;
64cdf0e10cSrcweir typedef FilterNameList::const_iterator  FilterNameListPtr;
65cdf0e10cSrcweir 
66cdf0e10cSrcweir class FilterDialog : public ModalDialog
67cdf0e10cSrcweir {
68cdf0e10cSrcweir     // public interface
69cdf0e10cSrcweir     public:
70cdf0e10cSrcweir              FilterDialog (       Window*            pParentWindow  ,
71cdf0e10cSrcweir                                   ResMgr*            pResMgr        );
72cdf0e10cSrcweir         void SetURL       ( const String&            sURL           );
73cdf0e10cSrcweir         void ChangeFilters( const FilterNameList*    pFilterNames   );
74cdf0e10cSrcweir         bool AskForFilter (       FilterNameListPtr& pSelectedItem  );
75cdf0e10cSrcweir 
76cdf0e10cSrcweir     // helper (or hided functions!)
77cdf0e10cSrcweir     private:
Execute()78cdf0e10cSrcweir         short Execute() { return RET_CANCEL; };
79cdf0e10cSrcweir         String impl_buildUIFileName( const String& sURL );
80cdf0e10cSrcweir 
81cdf0e10cSrcweir     // member
82cdf0e10cSrcweir     private:
83cdf0e10cSrcweir               FixedText       m_ftURL       ;
84cdf0e10cSrcweir               ListBox         m_lbFilters   ;
85cdf0e10cSrcweir               OKButton        m_btnOK       ;
86cdf0e10cSrcweir               CancelButton    m_btnCancel   ;
87cdf0e10cSrcweir               HelpButton      m_btnHelp     ;
88cdf0e10cSrcweir         const FilterNameList* m_pFilterNames;
89cdf0e10cSrcweir 
90cdf0e10cSrcweir };  // class FilterDialog
91cdf0e10cSrcweir 
92cdf0e10cSrcweir }   // namespace uui
93cdf0e10cSrcweir 
94cdf0e10cSrcweir #endif // UUI_FLTDLG_HXX
95