LibreOffice Module svx (master) 1
txencbox.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#ifndef INCLUDED_SVX_TXENCBOX_HXX
20#define INCLUDED_SVX_TXENCBOX_HXX
21
22#include <vcl/weld.hxx>
23#include <rtl/textenc.h>
24#include <svx/svxdllapi.h>
25
27{
28private:
29 std::unique_ptr<weld::ComboBox> m_xControl;
30
31public:
32 SvxTextEncodingBox(std::unique_ptr<weld::ComboBox> pControl);
33
35
46 void FillFromTextEncodingTable(
47 bool bExcludeImportSubsets,
48 sal_uInt32 nExcludeInfoFlags = 0
49 );
50
66 void FillFromDbTextEncodingMap(
67 bool bExcludeImportSubsets,
68 sal_uInt32 nExcludeInfoFlags = 0);
69
70 void InsertTextEncoding( const rtl_TextEncoding nEnc );
71
72 void InsertTextEncoding( const rtl_TextEncoding nEnc,
73 const OUString& rEntry );
74
75 void SelectTextEncoding( const rtl_TextEncoding nEnc );
76
77 rtl_TextEncoding GetSelectTextEncoding() const;
78
79 void connect_changed(const Link<weld::ComboBox&, void>& rLink) { m_xControl->connect_changed(rLink); }
80 void set_sensitive(bool bSensitive) { m_xControl->set_sensitive(bSensitive); }
81 void grab_focus() { m_xControl->grab_focus(); }
82 int get_active() const { return m_xControl->get_active(); }
83 void set_active(int nActive) { m_xControl->set_active(nActive); }
84 void show() { m_xControl->show(); }
85 void hide() { m_xControl->hide(); }
86};
87
89{
90private:
91 std::unique_ptr<weld::TreeView> m_xControl;
92
93public:
94 SvxTextEncodingTreeView(std::unique_ptr<weld::TreeView> pControl);
95
97
108 void FillFromTextEncodingTable(
109 bool bExcludeImportSubsets,
110 sal_uInt32 nExcludeInfoFlags = 0);
111
122 void FillFromDbTextEncodingMap(
123 bool bExcludeImportSubsets,
124 sal_uInt32 nExcludeInfoFlags = 0);
125
126 void InsertTextEncoding( const rtl_TextEncoding nEnc );
127
128 void InsertTextEncoding( const rtl_TextEncoding nEnc,
129 const OUString& rEntry );
130
131 void SelectTextEncoding( const rtl_TextEncoding nEnc );
132
133 rtl_TextEncoding GetSelectTextEncoding() const;
134
135 void connect_changed(const Link<weld::TreeView&, void>& rLink) { m_xControl->connect_changed(rLink); }
136 void connect_row_activated(const Link<weld::TreeView&, bool>& rLink) { m_xControl->connect_row_activated(rLink); }
137 void grab_focus() { m_xControl->grab_focus(); }
138 void show() { m_xControl->show(); }
139 void hide() { m_xControl->hide(); }
140 int get_height_rows(int nRows) const
141 {
142 return m_xControl->get_height_rows(nRows);
143 }
144 void set_size_request(int nWidth, int nHeight)
145 {
146 m_xControl->set_size_request(nWidth, nHeight);
147 }
148};
149
150#endif
151
152/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void connect_changed(const Link< weld::ComboBox &, void > &rLink)
Definition: txencbox.hxx:79
std::unique_ptr< weld::ComboBox > m_xControl
Definition: txencbox.hxx:29
int get_active() const
Definition: txencbox.hxx:82
void set_active(int nActive)
Definition: txencbox.hxx:83
void set_sensitive(bool bSensitive)
Definition: txencbox.hxx:80
void set_size_request(int nWidth, int nHeight)
Definition: txencbox.hxx:144
void connect_row_activated(const Link< weld::TreeView &, bool > &rLink)
Definition: txencbox.hxx:136
std::unique_ptr< weld::TreeView > m_xControl
Definition: txencbox.hxx:91
void connect_changed(const Link< weld::TreeView &, void > &rLink)
Definition: txencbox.hxx:135
int get_height_rows(int nRows) const
Definition: txencbox.hxx:140
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28
Reference< XControl > m_xControl