/* -*- 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
#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_INTERNALS) #error"don't use this in new code" #endif
class ImplBtn; class ImplListBox; class ImplListBoxWindow; class ImplListBoxFloatingWindow; class UserDrawEvent; struct ComboBoxBounds;
/// A widget used to choose from a list of items and which has an entry. class VCL_DLLPUBLIC ComboBox : public Edit
{ private:
VclPtr<Edit> m_pSubEdit;
VclPtr<ImplListBox> m_pImplLB;
VclPtr<ImplBtn> m_pBtn;
VclPtr<ImplListBoxFloatingWindow> m_pFloatWin;
sal_uInt16 m_nDDHeight;
sal_Unicode m_cMultiSep; bool m_isDDAutoSize : 1; bool m_isSyntheticModify : 1; bool m_isKeyBoardModify : 1; bool m_isMatchCase : 1;
sal_Int32 m_nMaxWidthChars;
sal_Int32 m_nWidthInChars;
Link<ComboBox&, void> m_SelectHdl;
// determine if Select was called due to typing or cursoring in the // combobox, as opposed to something selected from the menu or via some // other route. e.g. the toolbar fontsize combobox wants to immediately // change size only if something is picked from the combobox menu, other // changes don't auto-apply until the user presses return
SAL_DLLPRIVATE bool IsModifyByKeyboard() const;
// determine if Edit::Modify was called due to the ComboBox changing the edit area // itself
SAL_DLLPRIVATE bool IsSyntheticModify() const;
/** checks whether a certain point lies within the bounds of a list item and returns the item as well as the character position the point is at.
<p>If the point is inside an item the item pos is put into <code>rPos</code> and the item-relative character index is returned. If the point is not inside an item -1 is returned and rPos is unchanged.</p>
@param rPoint tells the point for which an item is requested.
@param rPos gets the item at the specified point <code>rPoint</code>
@returns the item-relative character index at point <code>rPos</code> or -1 if no item is at that point.
*/ using Control::GetIndexForPoint;
tools::Long GetIndexForPoint( const Point& rPoint, sal_Int32 & rPos ) const;
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.