blob: b0279dc7e9c2cd3478a22329f08fd77a00308ccb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using AppKit;
namespace macdoc
{
public partial class FindBarExtraordinaire : AppKit.NSView
{
public event EventHandler FindTextChanged;
public event EventHandler CloseFindPanel;
public FindBarExtraordinaire (IntPtr handle) : base (handle)
{
Initialize ();
}
void Initialize ()
{
}
public override void DrawRect (CoreGraphics.CGRect dirtyRect)
{
NSColor.WindowBackground.Set ();
NSBezierPath.FillRect (dirtyRect);
}
partial void StartSearch (NSObject sender)
{
var temp = FindTextChanged;
if (temp != null)
temp (this, EventArgs.Empty);
}
partial void CloseFind (NSObject sender)
{
var temp = CloseFindPanel;
if (temp != null)
temp (this, EventArgs.Empty);
}
public void GrabFocus ()
{
Window.MakeFirstResponder (searchField);
}
public string FindText {
get {
return searchField.StringValue;
}
}
public bool Wrap {
get {
return wrapButton.State == NSCellStateValue.On;
}
}
public bool CaseSensitive {
get {
return caseSensitiveButton.State == NSCellStateValue.Off;
}
}
}
}
|