#include "fpdfsdk/pwl/cpwl_list_box.h"
#include <sstream>
#include <utility>
#include "core/fxcrt/numerics/safe_conversions.h"
#include "core/fxge/cfx_renderdevice.h"
#include "fpdfsdk/pwl/cpwl_edit.h"
#include "fpdfsdk/pwl/cpwl_edit_impl.h"
#include "fpdfsdk/pwl/cpwl_scroll_bar.h"
#include "fpdfsdk/pwl/ipwl_fillernotify.h"
#include "public/fpdf_fwlevent.h"
CPWL_ListBox::CPWL_ListBox(
const CreateParams& cp,
std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData)
: … { … }
CPWL_ListBox::~CPWL_ListBox() = default;
void CPWL_ListBox::OnCreated() { … }
void CPWL_ListBox::OnDestroy() { … }
void CPWL_ListBox::DrawThisAppearance(CFX_RenderDevice* pDevice,
const CFX_Matrix& mtUser2Device) { … }
bool CPWL_ListBox::OnKeyDown(FWL_VKEYCODE nKeyCode, Mask<FWL_EVENTFLAG> nFlag) { … }
bool CPWL_ListBox::OnChar(uint16_t nChar, Mask<FWL_EVENTFLAG> nFlag) { … }
bool CPWL_ListBox::OnLButtonDown(Mask<FWL_EVENTFLAG> nFlag,
const CFX_PointF& point) { … }
bool CPWL_ListBox::OnLButtonUp(Mask<FWL_EVENTFLAG> nFlag,
const CFX_PointF& point) { … }
void CPWL_ListBox::SetHoverSel(bool bHoverSel) { … }
bool CPWL_ListBox::OnMouseMove(Mask<FWL_EVENTFLAG> nFlag,
const CFX_PointF& point) { … }
void CPWL_ListBox::SetScrollInfo(const PWL_SCROLL_INFO& info) { … }
void CPWL_ListBox::SetScrollPosition(float pos) { … }
void CPWL_ListBox::ScrollWindowVertically(float pos) { … }
bool CPWL_ListBox::RepositionChildWnd() { … }
bool CPWL_ListBox::OnNotifySelectionChanged(bool bKeyDown,
Mask<FWL_EVENTFLAG> nFlag) { … }
CFX_FloatRect CPWL_ListBox::GetFocusRect() const { … }
void CPWL_ListBox::AddString(const WideString& str) { … }
WideString CPWL_ListBox::GetText() { … }
void CPWL_ListBox::SetFontSize(float fFontSize) { … }
float CPWL_ListBox::GetFontSize() const { … }
void CPWL_ListBox::OnSetScrollInfoY(float fPlateMin,
float fPlateMax,
float fContentMin,
float fContentMax,
float fSmallStep,
float fBigStep) { … }
void CPWL_ListBox::OnSetScrollPosY(float fy) { … }
bool CPWL_ListBox::OnInvalidateRect(const CFX_FloatRect& rect) { … }
void CPWL_ListBox::Select(int32_t nItemIndex) { … }
void CPWL_ListBox::Deselect(int32_t nItemIndex) { … }
void CPWL_ListBox::SetCaret(int32_t nItemIndex) { … }
void CPWL_ListBox::SetTopVisibleIndex(int32_t nItemIndex) { … }
void CPWL_ListBox::ScrollToListItem(int32_t nItemIndex) { … }
bool CPWL_ListBox::IsMultipleSel() const { … }
int32_t CPWL_ListBox::GetCaretIndex() const { … }
int32_t CPWL_ListBox::GetCurSel() const { … }
bool CPWL_ListBox::IsItemSelected(int32_t nItemIndex) const { … }
int32_t CPWL_ListBox::GetTopVisibleIndex() const { … }
int32_t CPWL_ListBox::GetCount() const { … }
CFX_FloatRect CPWL_ListBox::GetContentRect() const { … }
float CPWL_ListBox::GetFirstHeight() const { … }
CFX_FloatRect CPWL_ListBox::GetListRect() const { … }
bool CPWL_ListBox::OnMouseWheel(Mask<FWL_EVENTFLAG> nFlag,
const CFX_PointF& point,
const CFX_Vector& delta) { … }