Last change
on this file since 2872 was
2872,
checked in by Sam Hocevar, 14 years ago
|
Start playing with scrolling widgets in Pimp.
|
File size:
1.5 KB
|
Line | |
---|
1 | // |
---|
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. |
---|
13 | // |
---|
14 | |
---|
15 | using System; |
---|
16 | using Gtk; |
---|
17 | using Pipi; |
---|
18 | using ThePimp; |
---|
19 | |
---|
20 | public partial class MainWindow: Gtk.Window |
---|
21 | { |
---|
22 | public MainWindow (): base (Gtk.WindowType.Toplevel) |
---|
23 | { |
---|
24 | Build (); |
---|
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"))); |
---|
29 | } |
---|
30 | |
---|
31 | protected void OnDeleteEvent (object sender, DeleteEventArgs a) |
---|
32 | { |
---|
33 | Application.Quit (); |
---|
34 | a.RetVal = true; |
---|
35 | } |
---|
36 | |
---|
37 | protected virtual void OnOpenActionActivated (object sender, System.EventArgs e) |
---|
38 | { |
---|
39 | ThePimp.OpenFile open = new ThePimp.OpenFile(); |
---|
40 | Pipi.Picture p = open.Load(); |
---|
41 | open.Destroy(); |
---|
42 | if(p != null) |
---|
43 | { |
---|
44 | Title += " image " + p.Width + "x" + p.Height; |
---|
45 | notebook1.RemovePage(0); |
---|
46 | notebook1.AppendPage(new PictureView(p), null); |
---|
47 | } |
---|
48 | } |
---|
49 | |
---|
50 | protected virtual void OnQuitActionActivated (object sender, System.EventArgs e) |
---|
51 | { |
---|
52 | Application.Quit (); |
---|
53 | } |
---|
54 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.