- Timestamp:
- Oct 5, 2008, 10:30:14 PM (14 years ago)
- Location:
- libpipi/trunk
- Files:
-
- 1 added
- 14 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
libpipi/trunk/ThePimp/AssemblyInfo.cs
r2869 r2872 1 // AssemblyInfo.cs created with MonoDevelop2 // User: sam at 10:31 AM 9/2/20083 1 // 4 // To change standard headers go to Edit->Preferences->Coding->Standard Headers 2 // The Pimp The Pathetic Image Manipulation Program 3 // Copyright (c) 2004-2008 Sam Hocevar <sam@zoy.org> 4 // All Rights Reserved 5 5 // 6 // $Id$ 7 // 8 // This library is free software. It comes without any warranty, to 9 // the extent permitted by applicable law. You can redistribute it 10 // and/or modify it under the terms of the Do What The Fuck You Want 11 // To Public License, Version 2, as published by Sam Hocevar. See 12 // http://sam.zoy.org/wtfpl/COPYING for more details. 13 // 14 6 15 using System.Reflection; 7 16 using System.Runtime.CompilerServices; -
libpipi/trunk/ThePimp/Main.cs
r2869 r2872 1 // Main.cs created with MonoDevelop2 // User: sam at 10:31 AM 9/2/20083 1 // 4 // To change standard headers go to Edit->Preferences->Coding->Standard Headers 2 // The Pimp The Pathetic Image Manipulation Program 3 // Copyright (c) 2004-2008 Sam Hocevar <sam@zoy.org> 4 // All Rights Reserved 5 5 // 6 // $Id$ 7 // 8 // This library is free software. It comes without any warranty, to 9 // the extent permitted by applicable law. You can redistribute it 10 // and/or modify it under the terms of the Do What The Fuck You Want 11 // To Public License, Version 2, as published by Sam Hocevar. See 12 // http://sam.zoy.org/wtfpl/COPYING for more details. 13 // 14 6 15 using System; 7 16 using Gtk; -
libpipi/trunk/ThePimp/MainWindow.cs
r2869 r2872 1 // MainWindow.cs created with MonoDevelop2 // User: sam at 10:31 AM 9/2/20083 1 // 4 // To change standard headers go to Edit->Preferences->Coding->Standard Headers 2 // The Pimp The Pathetic Image Manipulation Program 3 // Copyright (c) 2004-2008 Sam Hocevar <sam@zoy.org> 4 // All Rights Reserved 5 5 // 6 // $Id$ 7 // 8 // This library is free software. It comes without any warranty, to 9 // the extent permitted by applicable law. You can redistribute it 10 // and/or modify it under the terms of the Do What The Fuck You Want 11 // To Public License, Version 2, as published by Sam Hocevar. See 12 // http://sam.zoy.org/wtfpl/COPYING for more details. 13 // 14 6 15 using System; 7 16 using Gtk; … … 10 19 11 20 public partial class MainWindow: Gtk.Window 12 { 21 { 13 22 public MainWindow (): base (Gtk.WindowType.Toplevel) 14 23 { 15 24 Build (); 16 25 Title += " v" + Libpipi.getVersion(); 26 27 notebook1.Add(new PictureView(new Pipi.Picture("random:1024x1024"))); 28 //scrolledwindow1.Add(new PictureView(new Pipi.Picture("random:1024x1024"))); 17 29 } 18 30 19 31 protected void OnDeleteEvent (object sender, DeleteEventArgs a) 20 32 { … … 31 43 { 32 44 Title += " image " + p.Width + "x" + p.Height; 33 scrolledwindow1.Add(new PictureView(p)); 45 notebook1.RemovePage(0); 46 notebook1.AppendPage(new PictureView(p), null); 34 47 } 35 48 } -
libpipi/trunk/ThePimp/Makefile.am
r2869 r2872 4 4 $(srcdir)/AssemblyInfo.cs \ 5 5 $(srcdir)/Main.cs \ 6 $(srcdir)/PictureView.cs \ 6 7 $(srcdir)/gtk-gui/generated.cs \ 7 8 $(srcdir)/OpenFile.cs \ 8 9 $(srcdir)/gtk-gui/ThePimp.OpenFile.cs \ 9 $(srcdir)/PictureView.cs \10 $(srcdir)/gtk-gui/ThePimp.PictureView.cs \11 10 $(srcdir)/MainWindow.cs \ 12 11 $(srcdir)/gtk-gui/MainWindow.cs -
libpipi/trunk/ThePimp/OpenFile.cs
r2869 r2872 1 // OpenFile.cs created with MonoDevelop2 // User: sam at 23:05 03/10/20083 1 // 4 // To change standard headers go to Edit->Preferences->Coding->Standard Headers 2 // The Pimp The Pathetic Image Manipulation Program 3 // Copyright (c) 2004-2008 Sam Hocevar <sam@zoy.org> 4 // All Rights Reserved 5 // 6 // $Id$ 7 // 8 // This library is free software. It comes without any warranty, to 9 // the extent permitted by applicable law. You can redistribute it 10 // and/or modify it under the terms of the Do What The Fuck You Want 11 // To Public License, Version 2, as published by Sam Hocevar. See 12 // http://sam.zoy.org/wtfpl/COPYING for more details. 5 13 // 6 14 -
libpipi/trunk/ThePimp/PictureView.cs
r2869 r2872 1 // PictureView.cs created with MonoDevelop2 // User: sam at 22:59 04/10/20083 1 // 4 // To change standard headers go to Edit->Preferences->Coding->Standard Headers 2 // The Pimp The Pathetic Image Manipulation Program 3 // Copyright (c) 2004-2008 Sam Hocevar <sam@zoy.org> 4 // All Rights Reserved 5 // 6 // $Id$ 7 // 8 // This library is free software. It comes without any warranty, to 9 // the extent permitted by applicable law. You can redistribute it 10 // and/or modify it under the terms of the Do What The Fuck You Want 11 // To Public License, Version 2, as published by Sam Hocevar. See 12 // http://sam.zoy.org/wtfpl/COPYING for more details. 5 13 // 6 14 … … 11 19 namespace ThePimp 12 20 { 13 public partial class PictureView : Gtk.Bin21 public class PictureArea : Gtk.DrawingArea 14 22 { 15 protected override void OnSetScrollAdjustments (Adjustment hAdjustement, Adjustment vAdjustement) 23 private Pipi.Picture _p; 24 private Pango.Layout _l; 25 private Adjustment _hadj = null, _vadj = null; 26 27 void HAdjust(object sender, EventArgs args) 16 28 { 17 Console.WriteLine("LOL WHAT");29 QueueDraw(); 18 30 } 19 31 32 void VAdjust(object sender, EventArgs args) 33 { 34 QueueDraw(); 35 } 36 37 protected override bool OnExposeEvent(Gdk.EventExpose e) 38 { 39 bool ret = base.OnExposeEvent(e); 40 //Console.WriteLine("expose {0}x{1}+{2}+{3}", e.Area.Width, e.Area.Height, e.Area.X, e.Area.Y); 41 GdkWindow.DrawLayout(Style.TextGC(StateType.Normal), 40 - (int)_hadj.Value, 40 - (int)_vadj.Value, _l); 42 GdkWindow.DrawLayout(Style.TextGC(StateType.Normal), 560 - (int)_hadj.Value, 40 - (int)_vadj.Value, _l); 43 GdkWindow.DrawLayout(Style.TextGC(StateType.Normal), 40 - (int)_hadj.Value, 560 - (int)_vadj.Value, _l); 44 GdkWindow.DrawLayout(Style.TextGC(StateType.Normal), 560 - (int)_hadj.Value, 560 - (int)_vadj.Value, _l); 45 return ret; 46 } 47 48 protected override void OnRealized() 49 { 50 _l = new Pango.Layout(PangoContext); 51 _l.Wrap = Pango.WrapMode.Word; 52 _l.FontDescription = Pango.FontDescription.FromString("Tahoma 64"); 53 _l.SetMarkup("WHAT THE\nFUCK IS\nTHIS SHIT\nLOL ♥ ♥"); 54 base.OnRealized(); 55 } 56 57 protected override void OnSetScrollAdjustments(Adjustment hadj, 58 Adjustment vadj) 59 { 60 _hadj = hadj; 61 _vadj = vadj; 62 if(hadj != null) 63 hadj.ValueChanged += HAdjust; 64 if(vadj != null) 65 vadj.ValueChanged += VAdjust; 66 } 67 68 protected override void OnSizeAllocated(Gdk.Rectangle alloc) 69 { 70 base.OnSizeAllocated(alloc); 71 72 if(_hadj != null) 73 { 74 _hadj.SetBounds(0, _p.Width, 1, alloc.Width, alloc.Width); 75 if(_hadj.Value + alloc.Width > _p.Width) 76 { 77 _hadj.Value = _p.Width - alloc.Width; 78 _hadj.ChangeValue(); 79 } 80 } 81 82 if(_vadj != null) 83 { 84 _vadj.SetBounds(0, _p.Height, 1, alloc.Height, alloc.Height); 85 if(_vadj.Value + alloc.Height > _p.Height) 86 { 87 _vadj.Value = _p.Height - alloc.Height; 88 _vadj.ChangeValue(); 89 } 90 } 91 } 92 93 protected override void OnDestroyed() 94 { 95 if(_hadj != null) 96 { 97 _hadj.ValueChanged -= HAdjust; 98 _hadj = null; 99 } 100 101 if(_vadj != null) 102 { 103 _vadj.ValueChanged -= VAdjust; 104 _vadj = null; 105 } 106 } 107 108 public PictureArea(Picture p) 109 { 110 _p = p; 111 } 112 } 113 114 public class PictureView : Gtk.ScrolledWindow 115 { 20 116 public PictureView(Picture p) 21 117 { 22 this.Build(); 118 Add(new PictureArea(p)); 119 ShowAll(); 23 120 } 24 121 } -
libpipi/trunk/ThePimp/ThePimp.mdp
r2869 r2872 29 29 <File name="app.desktop" subtype="Code" buildaction="FileCopy" DeployService.TargetDirectoryId="Linux.DesktopApplications" /> 30 30 <File name="OpenFile.cs" subtype="Code" buildaction="Compile" /> 31 <File name="gtk-gui/Pimp.OpenFile.cs" subtype="Code" buildaction="Compile" />32 31 <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" /> 33 32 <File name="PictureView.cs" subtype="Code" buildaction="Compile" /> 34 <File name="gtk-gui/ThePimp.PictureView.cs" subtype="Code" buildaction="Compile" /> 33 <File name="gtk-gui/ThePimp.OpenFile.cs" subtype="Code" buildaction="Compile" /> 34 <File name="ToolBox.cs" subtype="Code" buildaction="Compile" /> 35 <File name="gtk-gui/ThePimp.ToolBox.cs" subtype="Code" buildaction="Compile" /> 35 36 </Contents> 36 37 <References> … … 48 49 <ExportedWidgets> 49 50 <Widget>ThePimp.PictureView</Widget> 51 <Widget>ThePimp.ToolBox</Widget> 50 52 </ExportedWidgets> 51 53 </GtkDesignInfo> -
libpipi/trunk/ThePimp/gtk-gui/MainWindow.cs
r2869 r2872 78 78 79 79 private Gtk.Notebook notebook1; 80 81 private Gtk.ScrolledWindow scrolledwindow1;82 83 private Gtk.Label label1;84 80 85 81 private Gtk.VPaned vpaned1; … … 233 229 this.notebook1.CurrentPage = 0; 234 230 this.notebook1.BorderWidth = ((uint)(5)); 235 // Container child notebook1.Gtk.Notebook+NotebookChild236 this.scrolledwindow1 = new Gtk.ScrolledWindow();237 this.scrolledwindow1.WidthRequest = 640;238 this.scrolledwindow1.HeightRequest = 480;239 this.scrolledwindow1.CanFocus = true;240 this.scrolledwindow1.Name = "scrolledwindow1";241 this.scrolledwindow1.ShadowType = ((Gtk.ShadowType)(1));242 this.notebook1.Add(this.scrolledwindow1);243 // Notebook tab244 this.label1 = new Gtk.Label();245 this.label1.Name = "label1";246 this.label1.LabelProp = Mono.Unix.Catalog.GetString("Test tab");247 this.notebook1.SetTabLabel(this.scrolledwindow1, this.label1);248 this.label1.ShowAll();249 231 this.hpaned1.Add(this.notebook1); 250 Gtk.Paned.PanedChild w 6= ((Gtk.Paned.PanedChild)(this.hpaned1[this.notebook1]));251 w 6.Resize = false;232 Gtk.Paned.PanedChild w5 = ((Gtk.Paned.PanedChild)(this.hpaned1[this.notebook1])); 233 w5.Resize = false; 252 234 // Container child hpaned1.Gtk.Paned+PanedChild 253 235 this.vpaned1 = new Gtk.VPaned(); … … 265 247 this.label2.LabelProp = Mono.Unix.Catalog.GetString("Tools"); 266 248 this.vbox2.Add(this.label2); 267 Gtk.Box.BoxChild w 7= ((Gtk.Box.BoxChild)(this.vbox2[this.label2]));268 w 7.Position = 0;269 w 7.Expand = false;270 w 7.Fill = false;249 Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox2[this.label2])); 250 w6.Position = 0; 251 w6.Expand = false; 252 w6.Fill = false; 271 253 this.vpaned1.Add(this.vbox2); 272 Gtk.Paned.PanedChild w 8= ((Gtk.Paned.PanedChild)(this.vpaned1[this.vbox2]));273 w 8.Resize = false;254 Gtk.Paned.PanedChild w7 = ((Gtk.Paned.PanedChild)(this.vpaned1[this.vbox2])); 255 w7.Resize = false; 274 256 // Container child vpaned1.Gtk.Paned+PanedChild 275 257 this.vbox3 = new Gtk.VBox(); … … 282 264 this.label3.LabelProp = Mono.Unix.Catalog.GetString("Layers & Channels"); 283 265 this.vbox3.Add(this.label3); 284 Gtk.Box.BoxChild w 9= ((Gtk.Box.BoxChild)(this.vbox3[this.label3]));285 w 9.Position = 0;286 w 9.Expand = false;287 w 9.Fill = false;266 Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox3[this.label3])); 267 w8.Position = 0; 268 w8.Expand = false; 269 w8.Fill = false; 288 270 this.vpaned1.Add(this.vbox3); 289 271 this.hpaned1.Add(this.vpaned1); 290 272 this.vbox1.Add(this.hpaned1); 291 Gtk.Box.BoxChild w1 2= ((Gtk.Box.BoxChild)(this.vbox1[this.hpaned1]));292 w1 2.Position = 2;273 Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.vbox1[this.hpaned1])); 274 w11.Position = 2; 293 275 // Container child vbox1.Gtk.Box+BoxChild 294 276 this.statusbar1 = new Gtk.Statusbar(); … … 296 278 this.statusbar1.Spacing = 6; 297 279 this.vbox1.Add(this.statusbar1); 298 Gtk.Box.BoxChild w1 3= ((Gtk.Box.BoxChild)(this.vbox1[this.statusbar1]));299 w1 3.Position = 3;300 w1 3.Expand = false;301 w1 3.Fill = false;280 Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.vbox1[this.statusbar1])); 281 w12.Position = 3; 282 w12.Expand = false; 283 w12.Fill = false; 302 284 this.Add(this.vbox1); 303 285 if ((this.Child != null)) { -
libpipi/trunk/ThePimp/gtk-gui/ThePimp.ToolBox.cs
r2870 r2872 12 12 13 13 14 public partial class PictureView { 15 16 private Gtk.DrawingArea drawingarea1; 14 public partial class ToolBox { 17 15 18 16 protected virtual void Build() { 19 17 Stetic.Gui.Initialize(this); 20 // Widget ThePimp. PictureView18 // Widget ThePimp.ToolBox 21 19 Stetic.BinContainer.Attach(this); 22 this.Name = "ThePimp.PictureView"; 23 // Container child ThePimp.PictureView.Gtk.Container+ContainerChild 24 this.drawingarea1 = new Gtk.DrawingArea(); 25 this.drawingarea1.Name = "drawingarea1"; 26 this.Add(this.drawingarea1); 20 this.Name = "ThePimp.ToolBox"; 27 21 if ((this.Child != null)) { 28 22 this.Child.ShowAll(); -
libpipi/trunk/ThePimp/gtk-gui/gui.stetic
r2869 r2872 268 268 <property name="BorderWidth">5</property> 269 269 <child> 270 <widget class="Gtk.ScrolledWindow" id="scrolledwindow1"> 271 <property name="MemberName" /> 272 <property name="WidthRequest">640</property> 273 <property name="HeightRequest">480</property> 274 <property name="CanFocus">True</property> 275 <property name="ShadowType">In</property> 276 <child> 277 <widget class="Gtk.Viewport" id="GtkViewport"> 278 <property name="MemberName" /> 279 <property name="ShadowType">None</property> 280 <child> 281 <placeholder /> 282 </child> 283 </widget> 284 </child> 285 </widget> 286 </child> 287 <child> 288 <widget class="Gtk.Label" id="label1"> 289 <property name="MemberName" /> 290 <property name="LabelProp" translatable="yes">Test tab</property> 291 </widget> 292 <packing> 293 <property name="type">tab</property> 294 </packing> 270 <placeholder /> 295 271 </child> 296 272 </widget> … … 454 430 </child> 455 431 </widget> 432 <widget class="Gtk.Bin" id="ThePimp.ToolBox" design-size="300 300"> 433 <property name="MemberName" /> 434 <child> 435 <placeholder /> 436 </child> 437 </widget> 456 438 <widget class="Gtk.Bin" id="ThePimp.PictureView" design-size="300 300"> 457 439 <property name="MemberName" /> 458 440 <child> 459 <widget class="Gtk.DrawingArea" id="drawingarea1"> 460 <property name="MemberName" /> 461 </widget> 441 <placeholder /> 462 442 </child> 463 443 </widget> -
libpipi/trunk/ThePimp/gtk-gui/objects.xml
r2869 r2872 4 4 <signals /> 5 5 </object> 6 <object type="ThePimp.ToolBox" palette-category="ThePimp" allow-children="false" base-type="Gtk.Bin"> 7 <itemgroups /> 8 <signals /> 9 </object> 6 10 </objects> -
libpipi/trunk/pipi-sharp/.gitignore
r2869 r2872 1 1 *.pidb 2 *.mdb 2 3 *.exe 3 4 *.dll -
libpipi/trunk/pipi-sharp/AssemblyInfo.cs
r2869 r2872 1 // AssemblyInfo.cs created with MonoDevelop2 // User: sam at 13:14 04/10/20083 1 // 4 // To change standard headers go to Edit->Preferences->Coding->Standard Headers 2 // libpipi Pathetic image processing interface library 3 // Copyright (c) 2004-2008 Sam Hocevar <sam@zoy.org> 4 // All Rights Reserved 5 5 // 6 // $Id$ 7 // 8 // This library is free software. It comes without any warranty, to 9 // the extent permitted by applicable law. You can redistribute it 10 // and/or modify it under the terms of the Do What The Fuck You Want 11 // To Public License, Version 2, as published by Sam Hocevar. See 12 // http://sam.zoy.org/wtfpl/COPYING for more details. 13 // 14 6 15 using System.Reflection; 7 16 using System.Runtime.CompilerServices; -
libpipi/trunk/pipi-sharp/Picture.cs
r2869 r2872 1 // MyClass.cs created with MonoDevelop2 // User: sam at 13:14 04/10/20083 1 // 4 // To change standard headers go to Edit->Preferences->Coding->Standard Headers 2 // libpipi Pathetic image processing interface library 3 // Copyright (c) 2004-2008 Sam Hocevar <sam@zoy.org> 4 // All Rights Reserved 5 // 6 // $Id$ 7 // 8 // This library is free software. It comes without any warranty, to 9 // the extent permitted by applicable law. You can redistribute it 10 // and/or modify it under the terms of the Do What The Fuck You Want 11 // To Public License, Version 2, as published by Sam Hocevar. See 12 // http://sam.zoy.org/wtfpl/COPYING for more details. 5 13 // 6 14 -
libpipi/trunk/pipi-sharp/Pipi.cs
r2869 r2872 1 // MyClass.cs created with MonoDevelop2 // User: sam at 13:14 04/10/20083 1 // 4 // To change standard headers go to Edit->Preferences->Coding->Standard Headers 2 // libpipi Pathetic image processing interface library 3 // Copyright (c) 2004-2008 Sam Hocevar <sam@zoy.org> 4 // All Rights Reserved 5 // 6 // $Id$ 7 // 8 // This library is free software. It comes without any warranty, to 9 // the extent permitted by applicable law. You can redistribute it 10 // and/or modify it under the terms of the Do What The Fuck You Want 11 // To Public License, Version 2, as published by Sam Hocevar. See 12 // http://sam.zoy.org/wtfpl/COPYING for more details. 5 13 // 6 14
Note: See TracChangeset
for help on using the changeset viewer.