/* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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 is intended for declaring classes which store DOM content data for * widget classes. Those data should be retrived by `WidgetQueryContentEvent`, * notified with `IMENotification`, or set assumed data as result of dispatching * widget events such as `WidgetKeyboardEvent`, `WidgetCompositionEvent`, * `WidgetSelectionEvent` etc.
*/
namespace mozilla {
/** * ContentSelection stores DOM selection in flattend text by * ContentEventHandler. It should be retrieved with `eQuerySelectedText` event, * notified with `NOTIFY_IME_OF_SELECTION_CHANGE` or set by widget itself.
*/ class ContentSelection { public: using SelectionChangeDataBase =
widget::IMENotification::SelectionChangeDataBase;
ContentSelection() = default; explicit ContentSelection(const SelectionChangeDataBase& aSelectionChangeData)
: mOffsetAndData(Some(aSelectionChangeData.ToUint32OffsetAndData())),
mWritingMode(aSelectionChangeData.GetWritingMode()) {} explicit ContentSelection(const WidgetQueryContentEvent& aSelectedTextEvent);
ContentSelection(uint32_t aOffset, const WritingMode& aWritingMode)
: mOffsetAndData(Some(OffsetAndData<uint32_t>(
aOffset, EmptyString(), OffsetAndDataFor::SelectedString))),
mWritingMode(aWritingMode) {}
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 ist noch experimentell.