blob: 42ed9740c4b5df5abb3ca54fca0b4c0a7751a106 (
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
68
69
70
71
72
73
|
using System;
using System.Collections.Generic;
using System.Linq;
using MonoMac.Foundation;
using MonoMac.AppKit;
namespace macdoc
{
public partial class FindBarExtraordinaire : MonoMac.AppKit.NSView
{
public event EventHandler FindTextChanged;
public event EventHandler CloseFindPanel;
public FindBarExtraordinaire (IntPtr handle) : base (handle)
{
Initialize ();
}
[Export ("initWithCoder:")]
public FindBarExtraordinaire (NSCoder coder) : base (coder)
{
Initialize ();
}
void Initialize ()
{
}
public override void DrawRect (System.Drawing.RectangleF 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;
}
}
}
}
|