Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FreeRDP/GdiTest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Moreau <marcandre.moreau@gmail.com>2011-03-29 07:02:23 +0400
committerMarc-André Moreau <marcandre.moreau@gmail.com>2011-03-29 07:02:23 +0400
commitbb79aa303c67ed270a3fb470897442d53adb2b0d (patch)
treee5a113f91828ecbbfdf30ffa6c57f357add34e71
parent3c77ce88c8c54f8154f7afe9e461bc2a16882c2e (diff)
Added 10 test cases for LineTo implementation
-rw-r--r--GdiTest.userprefs12
-rw-r--r--GdiTest/FreeRDPGDI.cs27
-rw-r--r--GdiTest/GDI.cs5
-rw-r--r--GdiTest/GdiTest.csproj2
-rw-r--r--GdiTest/GdiTest.pidbbin16228 -> 15214 bytes
-rw-r--r--GdiTest/LineDrawingArea.cs44
-rw-r--r--GdiTest/LineToDrawingArea.cs175
-rw-r--r--GdiTest/Main.cs10
-rw-r--r--GdiTest/MainWindow.cs36
-rw-r--r--GdiTest/Win32GDI.cs57
-rw-r--r--GdiTest/gtk-gui/MainWindow.cs60
-rw-r--r--GdiTest/gtk-gui/gui.stetic60
12 files changed, 401 insertions, 87 deletions
diff --git a/GdiTest.userprefs b/GdiTest.userprefs
index 11cd185..a20ec60 100644
--- a/GdiTest.userprefs
+++ b/GdiTest.userprefs
@@ -1,11 +1,13 @@
<Properties>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
- <MonoDevelop.Ide.Workbench ActiveDocument="GdiTest/FreeRDPGDI.cs">
+ <MonoDevelop.Ide.Workbench ActiveDocument="GdiTest\MainWindow.cs">
<Files>
- <File FileName="GdiTest/BitBltDrawingArea.cs" Line="49" Column="6" />
- <File FileName="GdiTest/GDI.cs" Line="26" Column="13" />
- <File FileName="GdiTest/FreeRDPGDI.cs" Line="49" Column="21" />
- <File FileName="GdiTest/Win32GDI.cs" Line="6" Column="29" />
+ <File FileName="GdiTest\BitBltDrawingArea.cs" Line="49" Column="6" />
+ <File FileName="GdiTest\GDI.cs" Line="1" Column="1" />
+ <File FileName="GdiTest\FreeRDPGDI.cs" Line="49" Column="21" />
+ <File FileName="GdiTest\Win32GDI.cs" Line="6" Column="29" />
+ <File FileName="GdiTest\MainWindow.cs" Line="40" Column="3" />
+ <File FileName="GdiTest\Main.cs" Line="12" Column="37" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
diff --git a/GdiTest/FreeRDPGDI.cs b/GdiTest/FreeRDPGDI.cs
index 8c4b80d..ab3bd4a 100644
--- a/GdiTest/FreeRDPGDI.cs
+++ b/GdiTest/FreeRDPGDI.cs
@@ -9,7 +9,7 @@ namespace GdiTest
static bool initialized = false;
static FreeRDPGDI instance = null;
- public class Callbacks
+ public struct Callbacks
{
[DllImport("libfreerdpgdi")]
public static extern IntPtr GetDC();
@@ -67,6 +67,16 @@ namespace GdiTest
return 0;
}
+ public override IntPtr SelectObject(IntPtr hdc, IntPtr hgdiobj)
+ {
+ return (IntPtr) null;
+ }
+
+ public override bool DeleteObject(IntPtr hObject)
+ {
+ return false;
+ }
+
public override int GetPixel(IntPtr hdc, int X, int Y)
{
return 0;
@@ -77,6 +87,21 @@ namespace GdiTest
return 0;
}
+ public override bool MoveToEx(IntPtr hdc, int X, int Y, IntPtr lpPoint)
+ {
+ return false;
+ }
+
+ public override bool LineTo(IntPtr hdc, int nXEnd, int nYEnd)
+ {
+ return false;
+ }
+
+ public override IntPtr CreatePen(int fnPenStyle, int nWidth, int crColor)
+ {
+ return (IntPtr) null;
+ }
+
public override int BitBlt(IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight,
IntPtr hdcSrc, int nXSrc, int nYSrc, System.Int32 dwRop)
{
diff --git a/GdiTest/GDI.cs b/GdiTest/GDI.cs
index 9d323cc..9272bb9 100644
--- a/GdiTest/GDI.cs
+++ b/GdiTest/GDI.cs
@@ -31,8 +31,13 @@ namespace GdiTest
public abstract bool isAvailable();
public abstract IntPtr GetDC(IntPtr hWnd);
public abstract int ReleaseDC(IntPtr hWnd, IntPtr hDC);
+ public abstract IntPtr SelectObject(IntPtr hdc, IntPtr hgdiobj);
+ public abstract bool DeleteObject(IntPtr hObject);
public abstract int GetPixel(IntPtr hdc, int X, int Y);
public abstract int SetPixel(IntPtr hdc, int X, int Y, int crColor);
+ public abstract bool MoveToEx(IntPtr hdc, int X, int Y, IntPtr lpPoint);
+ public abstract bool LineTo(IntPtr hdc, int nXEnd, int nYEnd);
+ public abstract IntPtr CreatePen(int fnPenStyle, int nWidth, int crColor);
public abstract int BitBlt(IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight,
IntPtr hdcSrc, int nXSrc, int nYSrc, System.Int32 dwRop);
}
diff --git a/GdiTest/GdiTest.csproj b/GdiTest/GdiTest.csproj
index 03387e3..127f976 100644
--- a/GdiTest/GdiTest.csproj
+++ b/GdiTest/GdiTest.csproj
@@ -55,12 +55,12 @@
<Compile Include="gtk-gui\MainWindow.cs" />
<Compile Include="Main.cs" />
<Compile Include="AssemblyInfo.cs" />
- <Compile Include="LineDrawingArea.cs" />
<Compile Include="BitBltDrawingArea.cs" />
<Compile Include="TestData.cs" />
<Compile Include="GDI.cs" />
<Compile Include="Win32GDI.cs" />
<Compile Include="FreeRDPGDI.cs" />
+ <Compile Include="LineToDrawingArea.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project> \ No newline at end of file
diff --git a/GdiTest/GdiTest.pidb b/GdiTest/GdiTest.pidb
index d327793..22bbd55 100644
--- a/GdiTest/GdiTest.pidb
+++ b/GdiTest/GdiTest.pidb
Binary files differ
diff --git a/GdiTest/LineDrawingArea.cs b/GdiTest/LineDrawingArea.cs
deleted file mode 100644
index 0fc00d3..0000000
--- a/GdiTest/LineDrawingArea.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using System;
-using Cairo;
-using Gtk;
-
-namespace GdiTest
-{
- public class LineDrawingArea : DrawingArea
- {
- public LineDrawingArea ()
- {
- }
-
- protected override bool OnExposeEvent (Gdk.EventExpose args)
- {
- using (Context g = Gdk.CairoHelper.Create (args.Window))
- {
- g.Antialias = Antialias.None;
- g.LineWidth = 4;
-
- g.Color = new Color(1,0,0);
- g.MoveTo (10, 10);
- g.LineTo (110, 10);
- g.Stroke ();
-
- g.Color = new Color(0,1,0);
- g.MoveTo (10, 10);
- g.LineTo (10, 110);
- g.Stroke ();
-
- g.Color = new Color(0,0,1);
- g.MoveTo (10, 10);
- g.LineTo (110, 110);
- g.Stroke ();
-
- g.Color = new Color(0,0,0);
- Rectangle rect = new Rectangle(210, 10, 260, 110);
- g.Rectangle(rect);
- g.Stroke ();
- }
- return true;
- }
- }
-}
-
diff --git a/GdiTest/LineToDrawingArea.cs b/GdiTest/LineToDrawingArea.cs
new file mode 100644
index 0000000..bd644ad
--- /dev/null
+++ b/GdiTest/LineToDrawingArea.cs
@@ -0,0 +1,175 @@
+using System;
+using Cairo;
+using Gtk;
+
+namespace GdiTest
+{
+ public class LineToDrawingArea : DrawingArea
+ {
+ public struct Area
+ {
+ public int X;
+ public int Y;
+ public int W;
+ public int H;
+ }
+
+ public LineToDrawingArea()
+ {
+ }
+
+ protected override bool OnExposeEvent (Gdk.EventExpose args)
+ {
+ using (Context g = Gdk.CairoHelper.Create (args.Window))
+ {
+ g.Antialias = Antialias.None;
+ g.LineWidth = 1;
+
+ Win32GDI GDI_Win32 = Win32GDI.getInstance();
+
+ if (GDI_Win32.isAvailable())
+ {
+ System.Drawing.Graphics wg = Gtk.DotNet.Graphics.FromDrawable(this.GdkWindow, true);
+ IntPtr dc = wg.GetHdc();
+
+ int i = 0;
+ int n = 10;
+ int w = 16;
+ int h = 16;
+
+ Area[] areas = new Area[n];
+ Point[] startp = new Point[n];
+ Point[] endp = new Point[n];
+
+ /* Test Case 1 */
+ areas[i].X = 0;
+ areas[i].Y = 0;
+ areas[i].W = w;
+ areas[i].H = h;
+ startp[i].X = areas[i].X;
+ startp[i].Y = areas[i].Y;
+ endp[i].X = areas[i].X + w;
+ endp[i].Y = areas[i].Y + h;
+ i++;
+
+ /* Test Case 2 */
+ areas[i].X = areas[i - 1].X + areas[i - 1].W;
+ areas[i].Y = areas[i - 1].Y;
+ areas[i].W = w;
+ areas[i].H = h;
+ startp[i].X = areas[i].X + w;
+ startp[i].Y = areas[i].Y + h;
+ endp[i].X = areas[i].X;
+ endp[i].Y = areas[i].Y;
+ i++;
+
+ /* Test Case 3 */
+ areas[i].X = areas[i - 1].X + areas[i - 1].W;
+ areas[i].Y = areas[i - 1].Y;
+ areas[i].W = w;
+ areas[i].H = h;
+ startp[i].X = areas[i].X + w;
+ startp[i].Y = areas[i].Y;
+ endp[i].X = areas[i].X;
+ endp[i].Y = areas[i].Y + h;
+ i++;
+
+ /* Test Case 4 */
+ areas[i].X = areas[i - 1].X + areas[i - 1].W;
+ areas[i].Y = areas[i - 1].Y;
+ areas[i].W = w;
+ areas[i].H = h;
+ startp[i].X = areas[i].X;
+ startp[i].Y = areas[i].Y + h;
+ endp[i].X = areas[i].X + w;
+ endp[i].Y = areas[i].Y;
+ i++;
+
+ /* Test Case 5 */
+ areas[i].X = areas[i - 1].X + areas[i - 1].W;
+ areas[i].Y = areas[i - 1].Y;
+ areas[i].W = w;
+ areas[i].H = h;
+ startp[i].X = areas[i].X;
+ startp[i].Y = areas[i].Y + (h / 2);
+ endp[i].X = areas[i].X + w;
+ endp[i].Y = areas[i].Y + (h / 2);
+ i++;
+
+ /* Test Case 6 */
+ areas[i].X = areas[i - 1].X + areas[i - 1].W;
+ areas[i].Y = areas[i - 1].Y;
+ areas[i].W = w;
+ areas[i].H = h;
+ startp[i].X = areas[i].X + w;
+ startp[i].Y = areas[i].Y + (h / 2);
+ endp[i].X = areas[i].X;
+ endp[i].Y = areas[i].Y + (h / 2);
+ i++;
+
+ /* Test Case 7 */
+ areas[i].X = areas[i - 1].X + areas[i - 1].W;
+ areas[i].Y = areas[i - 1].Y;
+ areas[i].W = w;
+ areas[i].H = h;
+ startp[i].X = areas[i].X + (w / 2);
+ startp[i].Y = areas[i].Y;
+ endp[i].X = areas[i].X + (w / 2);
+ endp[i].Y = areas[i].Y + h;
+ i++;
+
+ /* Test Case 8 */
+ areas[i].X = areas[i - 1].X + areas[i - 1].W;
+ areas[i].Y = areas[i - 1].Y;
+ areas[i].W = w;
+ areas[i].H = h;
+ startp[i].X = areas[i].X + (w / 2);
+ startp[i].Y = areas[i].Y + h;
+ endp[i].X = areas[i].X + (w / 2);
+ endp[i].Y = areas[i].Y;
+ i++;
+
+ /* Test Case 9 */
+ areas[i].X = areas[i - 1].X + areas[i - 1].W;
+ areas[i].Y = areas[i - 1].Y;
+ areas[i].W = w;
+ areas[i].H = h;
+ startp[i].X = areas[i].X + (w / 4);
+ startp[i].Y = areas[i].Y + (h / 4);
+ endp[i].X = areas[i].X + 3 * (w / 4);
+ endp[i].Y = areas[i].Y + 3 * (h / 4);
+ i++;
+
+ /* Test Case 10 */
+ areas[i].X = areas[i - 1].X + areas[i - 1].W;
+ areas[i].Y = areas[i - 1].Y;
+ areas[i].W = w;
+ areas[i].H = h;
+ startp[i].X = areas[i].X + 3 * (w / 4);
+ startp[i].Y = areas[i].Y + (h / 4);
+ endp[i].X = areas[i].X + (w / 4);
+ endp[i].Y = areas[i].Y + 3 * (h / 4);
+ i++;
+
+ for (i = 0; i < n; i++)
+ {
+ /* Fill Area with White */
+ g.Color = new Color(255,255,255);
+ Rectangle rect = new Rectangle(areas[i].X, areas[i].Y, areas[i].W, areas[i].H);
+ g.Rectangle(rect);
+ g.Fill();
+ g.Stroke();
+
+ /* Render Test Case */
+ IntPtr pen = GDI_Win32.CreatePen(1, 1, 0);
+ IntPtr oldPen = GDI_Win32.SelectObject(dc, pen);
+ GDI_Win32.MoveToEx(dc, startp[i].X, startp[i].Y, IntPtr.Zero);
+ GDI_Win32.LineTo(dc, endp[i].X, endp[i].Y);
+ }
+ }
+ }
+ return true;
+ }
+ }
+}
+
diff --git a/GdiTest/Main.cs b/GdiTest/Main.cs
index 180a4e4..508ec34 100644
--- a/GdiTest/Main.cs
+++ b/GdiTest/Main.cs
@@ -10,16 +10,6 @@ namespace GdiTest
{
Application.Init ();
MainWindow w = new MainWindow ();
-
- DrawingArea lineDrawingArea = new BitBltDrawingArea ();
-
- Box box = new HBox (true, 0);
- box.Add (lineDrawingArea);
-
- w.Add (box);
- w.Resize (640, 480);
- w.ShowAll ();
-
Application.Run ();
}
}
diff --git a/GdiTest/MainWindow.cs b/GdiTest/MainWindow.cs
index e21b756..58eb657 100644
--- a/GdiTest/MainWindow.cs
+++ b/GdiTest/MainWindow.cs
@@ -2,11 +2,23 @@ using System;
using Cairo;
using Gtk;
+using GdiTest;
+
public partial class MainWindow : Gtk.Window
{
+ DrawingArea testDrawingArea;
+ DrawingArea lineToDrawingArea;
+ DrawingArea bitBltDrawingArea;
+
public MainWindow () : base(Gtk.WindowType.Toplevel)
{
Build ();
+ lineToDrawingArea = new LineToDrawingArea ();
+ bitBltDrawingArea = new BitBltDrawingArea ();
+
+ testDrawingArea = lineToDrawingArea;
+ testFrame.Add(testDrawingArea);
+ testFrame.ShowAll();
}
protected void OnDeleteEvent (object sender, DeleteEventArgs a)
@@ -14,4 +26,28 @@ public partial class MainWindow : Gtk.Window
Application.Quit ();
a.RetVal = true;
}
+
+ protected virtual void OnTestComboBoxChanged (object sender, System.EventArgs e)
+ {
+ if (testDrawingArea != null)
+ {
+ testFrame.Remove(testDrawingArea);
+ testDrawingArea = null;
+ }
+
+ String testSuiteName = testComboBox.ActiveText;
+
+ if (testSuiteName.Equals("LineTo"))
+ {
+ testDrawingArea = lineToDrawingArea;
+ testFrame.Add(testDrawingArea);
+ testFrame.ShowAll();
+ }
+ else if (testSuiteName.Equals("BitBlt"))
+ {
+ testDrawingArea = bitBltDrawingArea;
+ testFrame.Add(testDrawingArea);
+ testFrame.ShowAll();
+ }
+ }
}
diff --git a/GdiTest/Win32GDI.cs b/GdiTest/Win32GDI.cs
index adc9e60..be620eb 100644
--- a/GdiTest/Win32GDI.cs
+++ b/GdiTest/Win32GDI.cs
@@ -9,7 +9,7 @@ namespace GdiTest
static bool initialized = false;
static Win32GDI instance = null;
- public class Callbacks
+ public struct Callbacks
{
[DllImport("user32.dll")]
public static extern IntPtr GetDC(IntPtr hWnd);
@@ -17,12 +17,27 @@ namespace GdiTest
[DllImport("user32.dll")]
public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);
+ [DllImport("gdi32")]
+ public static extern IntPtr SelectObject(IntPtr hdc, IntPtr hgdiobj);
+
+ [DllImport("gdi32")]
+ public static extern bool DeleteObject(IntPtr hObject);
+
[DllImport("gdi32.dll")]
public static extern int GetPixel(IntPtr hdc, int X, int Y);
[DllImport("gdi32.dll")]
public static extern int SetPixel(IntPtr hdc, int X, int Y, int crColor);
+ [DllImport("gdi32")]
+ public static extern bool MoveToEx(IntPtr hdc, int X, int Y, IntPtr lpPoint);
+
+ [DllImport("gdi32.dll")]
+ public static extern bool LineTo(IntPtr hdc, int nXEnd, int nYEnd);
+
+ [DllImport("gdi32")]
+ public static extern IntPtr CreatePen(int fnPenStyle, int nWidth, int crColor);
+
[DllImport("gdi32.dll")]
public static extern int BitBlt(
IntPtr hdcDest,
@@ -85,6 +100,22 @@ namespace GdiTest
return 0;
}
+ public override IntPtr SelectObject(IntPtr hdc, IntPtr hgdiobj)
+ {
+ if (available)
+ return Callbacks.SelectObject(hdc, hgdiobj);
+ else
+ return (IntPtr) null;
+ }
+
+ public override bool DeleteObject(IntPtr hObject)
+ {
+ if (available)
+ return Callbacks.DeleteObject(hObject);
+ else
+ return false;
+ }
+
public override int GetPixel(IntPtr hdc, int X, int Y)
{
if (available)
@@ -101,6 +132,30 @@ namespace GdiTest
return 0;
}
+ public override bool MoveToEx(IntPtr hdc, int X, int Y, IntPtr lpPoint)
+ {
+ if (available)
+ return Callbacks.MoveToEx(hdc, X, Y, lpPoint);
+ else
+ return false;
+ }
+
+ public override bool LineTo(IntPtr hdc, int nXEnd, int nYEnd)
+ {
+ if (available)
+ return Callbacks.LineTo(hdc, nXEnd, nYEnd);
+ else
+ return false;
+ }
+
+ public override IntPtr CreatePen(int fnPenStyle, int nWidth, int crColor)
+ {
+ if (available)
+ return Callbacks.CreatePen(fnPenStyle, nWidth, crColor);
+ else
+ return (IntPtr) null;
+ }
+
public override int BitBlt(IntPtr hdcDest, int nXDest, int nYDest, int nWidth, int nHeight,
IntPtr hdcSrc, int nXSrc, int nYSrc, System.Int32 dwRop)
{
diff --git a/GdiTest/gtk-gui/MainWindow.cs b/GdiTest/gtk-gui/MainWindow.cs
index fd10225..f82e313 100644
--- a/GdiTest/gtk-gui/MainWindow.cs
+++ b/GdiTest/gtk-gui/MainWindow.cs
@@ -5,10 +5,16 @@ public partial class MainWindow
{
private global::Gtk.Fixed mainFixedContainer;
- private global::Gtk.ComboBox testSelectorComboBox;
+ private global::Gtk.Label testLabel;
private global::Gtk.ScrolledWindow GtkScrolledWindow;
+ private global::Gtk.Frame testFrame;
+
+ private global::Gtk.Label drawingAreaLabel;
+
+ private global::Gtk.ComboBox testComboBox;
+
protected virtual void Build ()
{
global::Stetic.Gui.Initialize (this);
@@ -21,30 +27,56 @@ public partial class MainWindow
this.mainFixedContainer.Name = "mainFixedContainer";
this.mainFixedContainer.HasWindow = false;
// Container child mainFixedContainer.Gtk.Fixed+FixedChild
- this.testSelectorComboBox = global::Gtk.ComboBox.NewText ();
- this.testSelectorComboBox.AppendText (global::Mono.Unix.Catalog.GetString ("LineTo()"));
- this.testSelectorComboBox.AppendText (global::Mono.Unix.Catalog.GetString ("BitBlt()"));
- this.testSelectorComboBox.Name = "testSelectorComboBox";
- this.testSelectorComboBox.Active = 0;
- this.mainFixedContainer.Add (this.testSelectorComboBox);
- global::Gtk.Fixed.FixedChild w1 = ((global::Gtk.Fixed.FixedChild)(this.mainFixedContainer[this.testSelectorComboBox]));
- w1.X = 2;
- w1.Y = 34;
+ this.testLabel = new global::Gtk.Label ();
+ this.testLabel.Name = "testLabel";
+ this.testLabel.LabelProp = global::Mono.Unix.Catalog.GetString ("Test Suite");
+ this.mainFixedContainer.Add (this.testLabel);
+ global::Gtk.Fixed.FixedChild w1 = ((global::Gtk.Fixed.FixedChild)(this.mainFixedContainer[this.testLabel]));
+ w1.X = 11;
+ w1.Y = 31;
// Container child mainFixedContainer.Gtk.Fixed+FixedChild
this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
+ this.GtkScrolledWindow.WidthRequest = 600;
+ this.GtkScrolledWindow.HeightRequest = 100;
this.GtkScrolledWindow.Name = "GtkScrolledWindow";
this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
this.mainFixedContainer.Add (this.GtkScrolledWindow);
global::Gtk.Fixed.FixedChild w2 = ((global::Gtk.Fixed.FixedChild)(this.mainFixedContainer[this.GtkScrolledWindow]));
- w2.X = 2;
- w2.Y = 367;
+ w2.X = 9;
+ w2.Y = 520;
+ // Container child mainFixedContainer.Gtk.Fixed+FixedChild
+ this.testFrame = new global::Gtk.Frame ();
+ this.testFrame.WidthRequest = 600;
+ this.testFrame.HeightRequest = 400;
+ this.testFrame.Name = "testFrame";
+ this.testFrame.ShadowType = ((global::Gtk.ShadowType)(0));
+ this.drawingAreaLabel = new global::Gtk.Label ();
+ this.drawingAreaLabel.Name = "drawingAreaLabel";
+ this.drawingAreaLabel.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Drawing Area</b>");
+ this.drawingAreaLabel.UseMarkup = true;
+ this.testFrame.LabelWidget = this.drawingAreaLabel;
+ this.mainFixedContainer.Add (this.testFrame);
+ global::Gtk.Fixed.FixedChild w3 = ((global::Gtk.Fixed.FixedChild)(this.mainFixedContainer[this.testFrame]));
+ w3.X = 7;
+ w3.Y = 75;
+ // Container child mainFixedContainer.Gtk.Fixed+FixedChild
+ this.testComboBox = global::Gtk.ComboBox.NewText ();
+ this.testComboBox.AppendText (global::Mono.Unix.Catalog.GetString ("LineTo"));
+ this.testComboBox.AppendText (global::Mono.Unix.Catalog.GetString ("BitBlt"));
+ this.testComboBox.Name = "testComboBox";
+ this.testComboBox.Active = 0;
+ this.mainFixedContainer.Add (this.testComboBox);
+ global::Gtk.Fixed.FixedChild w4 = ((global::Gtk.Fixed.FixedChild)(this.mainFixedContainer[this.testComboBox]));
+ w4.X = 70;
+ w4.Y = 18;
this.Add (this.mainFixedContainer);
if ((this.Child != null)) {
this.Child.ShowAll ();
}
- this.DefaultWidth = 770;
- this.DefaultHeight = 449;
+ this.DefaultWidth = 632;
+ this.DefaultHeight = 663;
this.Show ();
this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent);
+ this.testComboBox.Changed += new global::System.EventHandler (this.OnTestComboBoxChanged);
}
}
diff --git a/GdiTest/gtk-gui/gui.stetic b/GdiTest/gtk-gui/gui.stetic
index 6f6858c..7cb4568 100644
--- a/GdiTest/gtk-gui/gui.stetic
+++ b/GdiTest/gtk-gui/gui.stetic
@@ -6,9 +6,9 @@
</configuration>
<import>
<widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
- <widget-library name="../bin/Debug/GdiTest.exe" internal="true" />
+ <widget-library name="..\bin\Debug\GdiTest.exe" internal="true" />
</import>
- <widget class="Gtk.Window" id="MainWindow" design-size="770 449">
+ <widget class="Gtk.Window" id="MainWindow" design-size="632 663">
<property name="MemberName" />
<property name="Title" translatable="yes">MainWindow</property>
<property name="WindowPosition">CenterOnParent</property>
@@ -18,26 +18,64 @@
<property name="MemberName" />
<property name="HasWindow">False</property>
<child>
- <widget class="Gtk.ComboBox" id="testSelectorComboBox">
+ <widget class="Gtk.Label" id="testLabel">
<property name="MemberName" />
- <property name="IsTextCombo">True</property>
- <property name="Items" translatable="yes">LineTo()
-BitBlt()</property>
- <property name="Active">0</property>
+ <property name="LabelProp" translatable="yes">Test Suite</property>
</widget>
<packing>
- <property name="X">2</property>
- <property name="Y">34</property>
+ <property name="X">11</property>
+ <property name="Y">31</property>
</packing>
</child>
<child>
<widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
<property name="MemberName" />
+ <property name="WidthRequest">600</property>
+ <property name="HeightRequest">100</property>
<property name="ShadowType">In</property>
</widget>
<packing>
- <property name="X">2</property>
- <property name="Y">367</property>
+ <property name="X">9</property>
+ <property name="Y">520</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.Frame" id="testFrame">
+ <property name="MemberName" />
+ <property name="WidthRequest">600</property>
+ <property name="HeightRequest">400</property>
+ <property name="ShadowType">None</property>
+ <child>
+ <placeholder />
+ </child>
+ <child>
+ <widget class="Gtk.Label" id="drawingAreaLabel">
+ <property name="MemberName" />
+ <property name="LabelProp" translatable="yes">&lt;b&gt;Drawing Area&lt;/b&gt;</property>
+ <property name="UseMarkup">True</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="X">7</property>
+ <property name="Y">75</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="Gtk.ComboBox" id="testComboBox">
+ <property name="MemberName" />
+ <property name="IsTextCombo">True</property>
+ <property name="Items" translatable="yes">LineTo
+BitBlt</property>
+ <property name="Active">0</property>
+ <signal name="Changed" handler="OnTestComboBoxChanged" />
+ </widget>
+ <packing>
+ <property name="X">70</property>
+ <property name="Y">18</property>
</packing>
</child>
</widget>