borderStyle = fixed;
background = formColor;
minClientSize = { 400, 112 };
+ autoCreate = false;
public:
property EditBox editBox { set { editBox = value; } };
- property char * searchString { set { findWhat.contents = value; } get { return findWhat.contents; } };
+ property const char * searchString { set { findWhat.contents = value; } get { return findWhat.contents; } };
property bool wholeWord { set { wholeWord.checked = value; } get { return wholeWord.checked; } };
property bool matchCase { set { matchCase.checked = value; } get { return matchCase.checked; } };
property bool searchUp { set { (value ? searchUp : searchDown).checked = true; } get { return searchUp.checked; } };
{
this, isCheckbox = true, text = $"Match case", position = { 10, 60 }, hotKey = altC
};
-
+
Button searchUp
{
this, isRadio = true, text = $"Up", position = { 220, 50 }, hotKey = altU
bool NotifyClicked(Button control, int x, int y, Modifiers mods)
{
- char * searchString = findWhat.contents;
+ const char * searchString = findWhat.contents;
bool searchUp = this.searchUp.checked;
bool wholeWord = this.wholeWord.checked;
bool matchCase = this.matchCase.checked;
Button cancel
{
this, text = $"Cancel", anchor = Anchor { right = 10, top = 45 }, size = { 80 }, hotKey = escape;
-
+
bool NotifyClicked(Button control, int x, int y, Modifiers mods)
{
findWhat.Activate();
bool OnKeyHit(Key key, unichar ch)
{
- if(ch)
+ if(ch && !key.alt && !key.ctrl && !key.shift && (matchCase.active || wholeWord.active))
{
findWhat.Activate();
return findWhat.OnKeyHit(key, ch);