/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ #pragma once
class SvtFileDialogFilter_Impl
{ private:
OUString m_aName; // name of the entry
OUString m_aType; // filter wildcard - if empty, the entry marks a group
class SvtURLBox; class SvtExpFileDlg_Impl
{ private: const SvtFileDialogFilter_Impl* m_pCurFilter;
OUString m_sCurrentFilterDisplayName; // may differ from m_pCurFilter->GetName in case it is a cached entry
// access to the filter listbox only as weld::Widget* - we want to maintain the entries/userdata ourself
weld::Widget* GetFilterListControl() { return m_xLbFilter.get(); } const weld::Widget* GetFilterListControl() const { return m_xLbFilter.get(); } void SetFilterListSelectHdl(const Link<weld::ComboBox&, void>& rHandler)
{
m_xLbFilter->connect_changed(rHandler);
}
// inits the listbox for the filters from the filter list (_pFilter) void InitFilterList( ); bool HasFilterListEntry( const OUString& rFilterName )
{ return m_xLbFilter->find_text(rFilterName) != -1;
}
void InsertFilterListEntry( const SvtFileDialogFilter_Impl* _pFilterDesc ); // _pFilterDesc must already have been added to _pFilter
SvtFileDialogFilter_Impl* GetSelectedFilterEntry( OUString& rDisplayName ) const
{
rDisplayName = m_xLbFilter->get_active_text(); return weld::fromId<SvtFileDialogFilter_Impl*>(m_xLbFilter->get_active_id());
}
// access to the current filter via methods only - need to care for consistency between m_pCurFilter and m_sCurrentFilterDisplayName const SvtFileDialogFilter_Impl* GetCurFilter( ) const
{ return m_pCurFilter;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.