ASPiK SDK
csearchtextedit.h
1 // This file is part of VSTGUI. It is subject to the license terms
2 // in the LICENSE file found in the top-level directory of this
3 // distribution and at http://github.com/steinbergmedia/vstgui/LICENSE
4 
5 #ifndef __csearchtextedit__
6 #define __csearchtextedit__
7 
8 #include "ctextedit.h"
9 
10 namespace VSTGUI {
11 
12 //-----------------------------------------------------------------------------
16 class CSearchTextEdit : public CTextEdit
17 {
18 public:
19  CSearchTextEdit (const CRect& size, IControlListener* listener, int32_t tag, UTF8StringPtr txt = nullptr, CBitmap* background = nullptr, const int32_t style = 0);
20 
21  void setClearMarkInset (CPoint inset);
22  CPoint getClearMarkInset () const;
23 
24  void draw (CDrawContext *pContext) override;
25  CMouseEventResult onMouseDown (CPoint& where, const CButtonState& buttons) override;
26 protected:
27  void drawClearMark (CDrawContext* context) const;
28  CRect getClearMarkRect () const;
29  CRect getTextRect () const;
30 
31  CRect platformGetSize () const override;
32  CRect platformGetVisibleSize () const override;
33  void platformTextDidChange () override;
34 
35  CPoint clearMarkInset {2., 2.};
36 };
37 
38 } // namespace
39 
40 #endif // __csearchtextedit__
Definition: csearchtextedit.h:16
Rect structure.
Definition: crect.h:17
Definition: xmlparse.c:181
void draw(CDrawContext *pContext) override
called if the view should draw itself
Definition: csearchtextedit.cpp:99
A drawing context encapsulates the drawing context of the underlying OS.
Definition: cdrawcontext.h:29
CMouseEventResult onMouseDown(CPoint &where, const CButtonState &buttons) override
called when a mouse down event occurs
Definition: csearchtextedit.cpp:48
Encapsulates various platform depended kinds of bitmaps.
Definition: cbitmap.h:21
Definition: customcontrols.cpp:8
Button and Modifier state.
Definition: cbuttonstate.h:34
Point structure.
Definition: cpoint.h:17
a text edit control
Definition: ctextedit.h:21
Definition: icontrollistener.h:14