浏览代码

Starting the work on Pimp. It's a MonoDevelop project but eventually it

will be properly integrated with the autotools solution, too.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2866 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 年前
父节点
当前提交
6fb77905ef
共有 26 个文件被更改,包括 1626 次插入5 次删除
  1. +10
    -5
      configure.ac
  2. +8
    -0
      pimp/.gitignore
  3. +71
    -0
      pimp/Makefile
  4. +86
    -0
      pimp/Makefile.include
  5. +91
    -0
      pimp/Pimp.make
  6. +20
    -0
      pimp/Pimp.mds
  7. +30
    -0
      pimp/Pimp/AssemblyInfo.cs
  8. +21
    -0
      pimp/Pimp/Main.cs
  9. +37
    -0
      pimp/Pimp/MainWindow.cs
  10. +18
    -0
      pimp/Pimp/OpenFile.cs
  11. +42
    -0
      pimp/Pimp/Pimp.mdp
  12. +8
    -0
      pimp/Pimp/app.desktop
  13. +300
    -0
      pimp/Pimp/gtk-gui/MainWindow.cs
  14. +81
    -0
      pimp/Pimp/gtk-gui/Pimp.OpenFile.cs
  15. +68
    -0
      pimp/Pimp/gtk-gui/generated.cs
  16. +435
    -0
      pimp/Pimp/gtk-gui/gui.stetic
  17. +3
    -0
      pimp/Pimp/pimp.in
  18. +30
    -0
      pimp/Pipi/AssemblyInfo.cs
  19. +23
    -0
      pimp/Pipi/Pipi.cs
  20. +23
    -0
      pimp/Pipi/Pipi.mdp
  21. +3
    -0
      pimp/Pipi/pipi-sharp.dll.config
  22. +6
    -0
      pimp/Pipi/pipi.pc.in
  23. +4
    -0
      pimp/config.log
  24. +9
    -0
      pimp/config.make
  25. +159
    -0
      pimp/configure
  26. +40
    -0
      pimp/rules.make

+ 10
- 5
configure.ac 查看文件

@@ -1,23 +1,26 @@
# $Id$

AC_INIT(libpipi, 0.0)
AC_PREREQ(2.50)
AC_CONFIG_AUX_DIR(.auto)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([no-define tar-ustar])
dnl AM_MAINTAINER_MODE

AM_CONFIG_HEADER(config.h)

AM_PROG_CC_C_O
AC_PROG_CPP

LT_MAJOR="0"
LT_MINOR="99"
LT_MICRO="13"
LT_MINOR="0"
LT_MICRO="0"
AC_SUBST(LT_MAJOR)
AC_SUBST(LT_MINOR)
AC_SUBST(LT_MICRO)
LT_VERSION="$LT_MAJOR:$LT_MINOR:$LT_MICRO"
AC_SUBST(LT_VERSION)

AM_PROG_CC_C_O
AC_PROG_CPP

AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_LIBTOOL_CXX
@@ -131,3 +134,5 @@ AC_CONFIG_FILES([

AC_OUTPUT

(cd pimp && ./configure)


+ 8
- 0
pimp/.gitignore 查看文件

@@ -0,0 +1,8 @@
*.userprefs
*.usertasks
*.pidb
*.exe
*.dll
*.pc
pimp
bin

+ 71
- 0
pimp/Makefile 查看文件

@@ -0,0 +1,71 @@

EXTRA_DIST = rules.make configure Makefile.include

all: all-recursive

top_srcdir=.
include $(top_srcdir)/config.make
include $(top_srcdir)/rules.make

#include $(top_srcdir)/custom-hooks.make

#Warning: This is an automatically generated file, do not edit!
ifeq ($(CONFIG),DEBUG)
SUBDIRS = Pipi Pimp
endif
ifeq ($(CONFIG),RELEASE)
SUBDIRS = Pipi Pimp
endif


CONFIG_MAKE=$(top_srcdir)/config.make

%-recursive: $(CONFIG_MAKE)
@set . $$MAKEFLAGS; final_exit=:; \
case $$2 in --unix) shift ;; esac; \
case $$2 in *=*) dk="exit 1" ;; *k*) dk=: ;; *) dk="exit 1" ;; esac; \
make pre-$*-hook prefix=$(prefix) ; \
for dir in $(SUBDIRS); do \
case $$dir in \
.) make $*-local || { final_exit="exit 1"; $$dk; };;\
*) (cd $$dir && make $*) || { final_exit="exit 1"; $$dk; };;\
esac \
done; \
make post-$*-hook prefix=$(prefix) ; \
$$final_exit

$(CONFIG_MAKE):
echo "You must run configure first"
exit 1

clean distclean: clean-recursive
install: install-recursive
uninstall: uninstall-recursive

dist: $(CONFIG_MAKE)
rm -rf $(PACKAGE)-$(VERSION)
mkdir $(PACKAGE)-$(VERSION)
make pre-dist-hook distdir=$$distdir
for dir in $(SUBDIRS); do \
pkgdir=`pwd`/$(PACKAGE)-$(VERSION); \
mkdir $$pkgdir/$$dir || true; \
case $$dir in \
.) make dist-local distdir=$$pkgdir || exit 1;; \
*) (cd $$dir; make dist-local distdir=$$pkgdir/$$dir) || exit 1;; \
esac \
done
(make dist-local distdir=$(PACKAGE)-$(VERSION))
make
make post-dist-hook distsir=$$distdir
tar czvf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
rm -rf $(PACKAGE)-$(VERSION)
@echo "=========================================="
@echo "$(PACKAGE)-$(VERSION) has been packaged > $(PACKAGE)-$(VERSION).tar.gz"
@echo "=========================================="

distcheck: dist
(mkdir test; cd test; \
tar xzvf ../$(PACKAGE)-$(VERSION).tar.gz; cd $(PACKAGE)-$(VERSION); \
./configure --prefix=$$(cd `pwd`/..; pwd); \
make && make install && make dist);
rm -rf test

+ 86
- 0
pimp/Makefile.include 查看文件

@@ -0,0 +1,86 @@
VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT

build_sources = $(FILES) $(GENERATED_FILES)
build_sources_embed = $(build_sources:%='$(srcdir)/%')

comma__=,
get_resource_name = $(firstword $(subst $(comma__), ,$1))
get_culture = $(lastword $(subst ., ,$(basename $1)))
is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1)))))

build_resx_list = $(foreach res, $(RESOURCES), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),))
build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res)))
build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res)))
build_others_list = $(build_non_culture_others_list)
build_xamlg_list = $(filter %.xaml.g.cs, $(FILES))

# resgen all .resx resources
build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res)))
build_resx_resources = $(build_resx_files:.resx=.resources)

# embed resources for the main assembly
build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list))
build_resx_resources_embed = $(build_resx_resources_hack:%='-resource:%')
build_others_files = $(foreach res, $(build_others_list),$(call get_resource_name,$(res)))
build_others_resources = $(build_others_files)
build_others_resources_embed = $(build_others_list:%='-resource:$(srcdir)/%')

build_resources = $(build_resx_resources) $(build_others_resources)
build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed)

build_references_ref = $(foreach ref, $(REFERENCES), $(if $(filter -pkg:%, $(ref)), $(ref), $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))
build_references_ref += $(foreach ref, $(DLL_REFERENCES), -r:$(ref))
build_references_ref += $(foreach ref, $(PROJECT_REFERENCES), -r:$(ref))

EXTRA_DIST += $(build_sources) $(build_resx_files) $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) $(DATA_FILES) $(build_culture_res_files)
CLEANFILES += $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) $(build_resx_resources) $(build_satellite_assembly_list)
DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/*

pkglib_SCRIPTS = $(ASSEMBLY)
bin_SCRIPTS = $(BINARIES)

linuxdesktopapplicationsdir = @datadir@/applications
linuxdesktopapplications_DATA = $(LINUX_DESKTOPAPPLICATIONS)
programfilesdir = @libdir@/@PACKAGE@
programfiles_DATA = $(PROGRAMFILES)
linuxpkgconfigdir = @libdir@/pkgconfig
linuxpkgconfig_DATA = $(LINUX_PKGCONFIG)


# macros

# $(call emit-deploy-target,deploy-variable-name)
define emit-deploy-target
$($1): $($1_SOURCE)
mkdir -p $$(dir $($1))
cp '$$<' '$$@'
endef

# $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x)
# assumes that for a wrapper foo.pc its source template is foo.pc.in
# if $3 is non-empty then wrapper is marked exec
define emit-deploy-wrapper
$($1): $2 $(top_srcdir)/config.make
mkdir -p '$$(@D)'
cp '$$<' '$$@'
$(if $3,chmod +x '$$@')

$2: $2.in $(top_srcdir)/config.make
sed -e "s,@prefix@,$(prefix)," -e "s,@PACKAGE@,$(PACKAGE)," -e "s,@expanded_libdir@,$(libdir)," -e "s,@expanded_bindir@,$(bindir)," -e "s,@expanded_datadir@,$(datadir)," < $2.in > $2
endef

# generating satellite assemblies

culture_resources = $(foreach res, $(RESOURCES), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res)))
cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res)))))
culture_resource_dependencies = $(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)
culture_resource_commandlines = cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)'
build_satellite_assembly_list = $(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))
build_culture_res_files = $(foreach res, $(culture_resources),$(call get_resource_name,$(res)))

$(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res))))))
$(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res)))))

$(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME):
mkdir -p '$(@D)'
$(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*)

+ 91
- 0
pimp/Pimp.make 查看文件

@@ -0,0 +1,91 @@


# Warning: This is an automatically generated file, do not edit!

if ENABLE_DEBUG
ASSEMBLY_COMPILER_COMMAND = gmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ -debug "-define:DEBUG"

ASSEMBLY = bin/Debug/pimp.exe
ASSEMBLY_MDB = $(ASSEMBLY).mdb
COMPILE_TARGET = exe
PROJECT_REFERENCES =
BUILD_DIR = bin/Debug

PIMP_DESKTOP_SOURCE=app.desktop

endif

if ENABLE_RELEASE
ASSEMBLY_COMPILER_COMMAND = gmcs
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+
ASSEMBLY = bin/Release/pimp.exe
ASSEMBLY_MDB =
COMPILE_TARGET = exe
PROJECT_REFERENCES =
BUILD_DIR = bin/Release

PIMP_DESKTOP_SOURCE=app.desktop

endif

AL=al2
SATELLITE_ASSEMBLY_NAME=.resources.dll

LINUX_DESKTOPAPPLICATIONS = \
$(PIMP_DESKTOP)

BINARIES = \
$(PIMP)


all: $(ASSEMBLY) $(LINUX_DESKTOPAPPLICATIONS) $(BINARIES)

FILES = \
gtk-gui/generated.cs \
MainWindow.cs \
gtk-gui/MainWindow.cs \
Main.cs \
AssemblyInfo.cs \
OpenFile.cs \
gtk-gui/Pimp.OpenFile.cs

DATA_FILES = \
app.desktop

RESOURCES = \
gtk-gui/gui.stetic

EXTRAS = \
pimp.in

REFERENCES = \
$(GTK_SHARP_20_LIBS) \
$(GLIB_SHARP_20_LIBS) \
$(GLADE_SHARP_20_LIBS) \
System \
Mono.Posix

DLL_REFERENCES =

CLEANFILES = $(LINUX_DESKTOPAPPLICATIONS) $(BINARIES)

include $(top_srcdir)/Makefile.include

PIMP = $(BUILD_DIR)/pimp
PIMP_DESKTOP = $(BUILD_DIR)/pimp.desktop

$(eval $(call emit-deploy-wrapper,PIMP,pimp,x))
$(eval $(call emit-deploy-target,PIMP_DESKTOP))


$(build_xamlg_list): %.xaml.g.cs: %.xaml
xamlg '$<'

$(build_resx_resources) : %.resources: %.resx
resgen2 '$<' '$@'

$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
mkdir -p $(dir $(ASSEMBLY))
$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref)

+ 20
- 0
pimp/Pimp.mds 查看文件

@@ -0,0 +1,20 @@
<Combine name="Pimp" fileversion="2.0">
<Configurations active="Debug">
<Configuration name="Debug" ctype="CombineConfiguration">
<Entry build="True" name="Pipi" configuration="Debug" />
<Entry build="True" name="Pimp" configuration="Debug" />
</Configuration>
<Configuration name="Release" ctype="CombineConfiguration">
<Entry build="True" name="Pipi" configuration="Release" />
<Entry build="True" name="Pimp" configuration="Release" />
</Configuration>
</Configurations>
<StartMode startupentry="Pimp" single="True">
<Execute type="None" entry="Pipi" />
<Execute type="None" entry="Pimp" />
</StartMode>
<Entries>
<Entry filename="Pipi/Pipi.mdp" />
<Entry filename="Pimp/Pimp.mdp" />
</Entries>
</Combine>

+ 30
- 0
pimp/Pimp/AssemblyInfo.cs 查看文件

@@ -0,0 +1,30 @@
// AssemblyInfo.cs created with MonoDevelop
// User: sam at 10:31 AM 9/2/2008
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//
using System.Reflection;
using System.Runtime.CompilerServices;

// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.

[assembly: AssemblyTitle("Pimp")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// If the build and revision are set to '*' they will be updated automatically.

[assembly: AssemblyVersion("1.0.*.*")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.

[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]

+ 21
- 0
pimp/Pimp/Main.cs 查看文件

@@ -0,0 +1,21 @@
// Main.cs created with MonoDevelop
// User: sam at 10:31 AM 9/2/2008
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//
using System;
using Gtk;

namespace Pimp
{
class Pimp
{
public static void Main (string[] args)
{
Application.Init ();
MainWindow win = new MainWindow ();
win.Show ();
Application.Run ();
}
}
}

+ 37
- 0
pimp/Pimp/MainWindow.cs 查看文件

@@ -0,0 +1,37 @@
// MainWindow.cs created with MonoDevelop
// User: sam at 10:31 AM 9/2/2008
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//
using System;
using Gtk;
using Pipi;

public partial class MainWindow: Gtk.Window
{
public MainWindow (): base (Gtk.WindowType.Toplevel)
{
Build ();
Title += " v" + Libpipi.getVersion();
}
protected void OnDeleteEvent (object sender, DeleteEventArgs a)
{
Application.Quit ();
a.RetVal = true;
}

protected virtual void OnOpenActionActivated (object sender, System.EventArgs e)
{
Pimp.OpenFile open = new Pimp.OpenFile();
ResponseType rsp = (ResponseType)open.Run();
open.Destroy();
if(rsp == ResponseType.Ok)
return;
}

protected virtual void OnQuitActionActivated (object sender, System.EventArgs e)
{
Application.Quit ();
}
}

+ 18
- 0
pimp/Pimp/OpenFile.cs 查看文件

@@ -0,0 +1,18 @@
// OpenFile.cs created with MonoDevelop
// User: sam at 23:05 03/10/2008
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//

using System;

namespace Pimp
{
public partial class OpenFile : Gtk.Dialog
{
public OpenFile()
{
this.Build();
}
}
}

+ 42
- 0
pimp/Pimp/Pimp.mdp 查看文件

@@ -0,0 +1,42 @@
<Project name="Pimp" fileversion="2.0" Description="The Pathetic Image Manipulation Program" language="C#" clr-version="Net_2_0" ctype="DotNetProject">
<Configurations active="Debug">
<Configuration name="Debug" ctype="DotNetProjectConfiguration">
<CustomCommands>
<Command type="AfterBuild" command="ln -s ${CombineDir}/Pipi/pipi-sharp.dll.config ${TargetDir}" workingdir="" />
</CustomCommands>
<Output directory="bin/Debug" assemblyKeyFile="." assembly="Pimp" />
<Build debugmode="True" target="Exe" />
<Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
<CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" definesymbols="DEBUG" generatexmldocumentation="False" win32Icon="." ctype="CSharpCompilerParameters" />
</Configuration>
<Configuration name="Release" ctype="DotNetProjectConfiguration">
<Output directory="bin/Release" assembly="Pimp" />
<Build debugmode="False" target="Exe" />
<Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
<CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="False" win32Icon="." ctype="CSharpCompilerParameters" />
</Configuration>
</Configurations>
<Contents>
<File name="gtk-gui/gui.stetic" subtype="Code" buildaction="EmbedAsResource" />
<File name="gtk-gui/generated.cs" subtype="Code" buildaction="Compile" />
<File name="MainWindow.cs" subtype="Code" buildaction="Compile" />
<File name="gtk-gui/MainWindow.cs" subtype="Code" buildaction="Compile" />
<File name="Main.cs" subtype="Code" buildaction="Compile" />
<File name="AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
<File name="app.desktop" subtype="Code" buildaction="FileCopy" DeployService.TargetDirectoryId="Linux.DesktopApplications" />
<File name="OpenFile.cs" subtype="Code" buildaction="Compile" />
<File name="gtk-gui/Pimp.OpenFile.cs" subtype="Code" buildaction="Compile" />
</Contents>
<References>
<ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<ProjectReference type="Gac" localcopy="True" refto="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<ProjectReference type="Gac" localcopy="True" refto="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<ProjectReference type="Gac" localcopy="True" refto="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
<ProjectReference type="Project" localcopy="True" refto="Pipi" />
</References>
<Deployment.LinuxDeployData />
<GtkDesignInfo gtkVersion="2.12.1" />
</Project>

+ 8
- 0
pimp/Pimp/app.desktop 查看文件

@@ -0,0 +1,8 @@
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Pathetic Image Manipulation Program
Exec=pimp
Terminal=false
GenericName=Image Editor
Comment=Create and edit images

+ 300
- 0
pimp/Pimp/gtk-gui/MainWindow.cs 查看文件

@@ -0,0 +1,300 @@
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------



public partial class MainWindow {
private Gtk.Action newAction;
private Gtk.Action openAction;
private Gtk.Action saveAction;
private Gtk.Action Action;
private Gtk.Action FileAction;
private Gtk.Action EditAction;
private Gtk.Action ViewAction;
private Gtk.Action HelpAction;
private Gtk.Action NewAction;
private Gtk.Action OpenAction;
private Gtk.Action SaveAction;
private Gtk.Action SaveAsAction;
private Gtk.Action QuitAction;
private Gtk.Action HelpAction1;
private Gtk.Action AboutAction;
private Gtk.Action UndoAction;
private Gtk.Action RedoAction;
private Gtk.Action BestFitAction;
private Gtk.Action NormalSizeAction;
private Gtk.Action ZoomOutAction;
private Gtk.Action ZoomInAction;
private Gtk.Action undoAction;
private Gtk.Action redoAction;
private Gtk.Action zoom100Action;
private Gtk.Action zoomFitAction;
private Gtk.Action zoomOutAction;
private Gtk.Action zoomInAction;
private Gtk.Action helpAction;
private Gtk.VBox vbox1;
private Gtk.MenuBar menubar1;
private Gtk.Toolbar toolbar1;
private Gtk.HPaned hpaned1;
private Gtk.Notebook notebook1;
private Gtk.ScrolledWindow scrolledwindow1;
private Gtk.DrawingArea drawingarea1;
private Gtk.Label label1;
private Gtk.VPaned vpaned1;
private Gtk.VBox vbox2;
private Gtk.VBox vbox3;
private Gtk.Statusbar statusbar1;
protected virtual void Build() {
Stetic.Gui.Initialize(this);
// Widget MainWindow
Gtk.UIManager w1 = new Gtk.UIManager();
Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
this.newAction = new Gtk.Action("newAction", null, null, "gtk-new");
this.newAction.Sensitive = false;
w2.Add(this.newAction, null);
this.openAction = new Gtk.Action("openAction", null, null, "gtk-open");
w2.Add(this.openAction, null);
this.saveAction = new Gtk.Action("saveAction", null, null, "gtk-save");
this.saveAction.Sensitive = false;
w2.Add(this.saveAction, null);
this.Action = new Gtk.Action("Action", null, null, null);
w2.Add(this.Action, null);
this.FileAction = new Gtk.Action("FileAction", Mono.Unix.Catalog.GetString("File"), null, null);
this.FileAction.ShortLabel = Mono.Unix.Catalog.GetString("File");
w2.Add(this.FileAction, null);
this.EditAction = new Gtk.Action("EditAction", Mono.Unix.Catalog.GetString("Edit"), null, null);
this.EditAction.ShortLabel = Mono.Unix.Catalog.GetString("Edit");
w2.Add(this.EditAction, null);
this.ViewAction = new Gtk.Action("ViewAction", Mono.Unix.Catalog.GetString("View"), null, null);
this.ViewAction.ShortLabel = Mono.Unix.Catalog.GetString("View");
w2.Add(this.ViewAction, null);
this.HelpAction = new Gtk.Action("HelpAction", Mono.Unix.Catalog.GetString("Help"), null, null);
this.HelpAction.ShortLabel = Mono.Unix.Catalog.GetString("Help");
w2.Add(this.HelpAction, null);
this.NewAction = new Gtk.Action("NewAction", Mono.Unix.Catalog.GetString("_New"), null, "gtk-new");
this.NewAction.Sensitive = false;
this.NewAction.ShortLabel = Mono.Unix.Catalog.GetString("_New");
w2.Add(this.NewAction, null);
this.OpenAction = new Gtk.Action("OpenAction", Mono.Unix.Catalog.GetString("_Open"), null, "gtk-open");
this.OpenAction.ShortLabel = Mono.Unix.Catalog.GetString("_Open");
w2.Add(this.OpenAction, null);
this.SaveAction = new Gtk.Action("SaveAction", Mono.Unix.Catalog.GetString("_Save"), null, "gtk-save");
this.SaveAction.Sensitive = false;
this.SaveAction.ShortLabel = Mono.Unix.Catalog.GetString("_Save");
w2.Add(this.SaveAction, null);
this.SaveAsAction = new Gtk.Action("SaveAsAction", Mono.Unix.Catalog.GetString("Save _As"), null, "gtk-save-as");
this.SaveAsAction.Sensitive = false;
this.SaveAsAction.ShortLabel = Mono.Unix.Catalog.GetString("Save _As");
w2.Add(this.SaveAsAction, null);
this.QuitAction = new Gtk.Action("QuitAction", Mono.Unix.Catalog.GetString("_Quit"), null, "gtk-quit");
this.QuitAction.ShortLabel = Mono.Unix.Catalog.GetString("_Quit");
w2.Add(this.QuitAction, null);
this.HelpAction1 = new Gtk.Action("HelpAction1", Mono.Unix.Catalog.GetString("_Help"), null, "gtk-help");
this.HelpAction1.Sensitive = false;
this.HelpAction1.ShortLabel = Mono.Unix.Catalog.GetString("_Help");
w2.Add(this.HelpAction1, null);
this.AboutAction = new Gtk.Action("AboutAction", Mono.Unix.Catalog.GetString("_About"), null, "gtk-about");
this.AboutAction.Sensitive = false;
this.AboutAction.ShortLabel = Mono.Unix.Catalog.GetString("_About");
w2.Add(this.AboutAction, null);
this.UndoAction = new Gtk.Action("UndoAction", Mono.Unix.Catalog.GetString("_Undo"), null, "gtk-undo");
this.UndoAction.Sensitive = false;
this.UndoAction.ShortLabel = Mono.Unix.Catalog.GetString("_Undo");
w2.Add(this.UndoAction, null);
this.RedoAction = new Gtk.Action("RedoAction", Mono.Unix.Catalog.GetString("_Redo"), null, "gtk-redo");
this.RedoAction.Sensitive = false;
this.RedoAction.ShortLabel = Mono.Unix.Catalog.GetString("_Redo");
w2.Add(this.RedoAction, null);
this.BestFitAction = new Gtk.Action("BestFitAction", Mono.Unix.Catalog.GetString("Best _Fit"), null, "gtk-zoom-fit");
this.BestFitAction.Sensitive = false;
this.BestFitAction.ShortLabel = Mono.Unix.Catalog.GetString("Best _Fit");
w2.Add(this.BestFitAction, null);
this.NormalSizeAction = new Gtk.Action("NormalSizeAction", Mono.Unix.Catalog.GetString("_Normal Size"), null, "gtk-zoom-100");
this.NormalSizeAction.Sensitive = false;
this.NormalSizeAction.ShortLabel = Mono.Unix.Catalog.GetString("_Normal Size");
w2.Add(this.NormalSizeAction, null);
this.ZoomOutAction = new Gtk.Action("ZoomOutAction", Mono.Unix.Catalog.GetString("Zoom _Out"), null, "gtk-zoom-out");
this.ZoomOutAction.Sensitive = false;
this.ZoomOutAction.ShortLabel = Mono.Unix.Catalog.GetString("Zoom _Out");
w2.Add(this.ZoomOutAction, null);
this.ZoomInAction = new Gtk.Action("ZoomInAction", Mono.Unix.Catalog.GetString("Zoom _In"), null, "gtk-zoom-in");
this.ZoomInAction.Sensitive = false;
this.ZoomInAction.ShortLabel = Mono.Unix.Catalog.GetString("Zoom _In");
w2.Add(this.ZoomInAction, null);
this.undoAction = new Gtk.Action("undoAction", null, null, "gtk-undo");
this.undoAction.Sensitive = false;
w2.Add(this.undoAction, null);
this.redoAction = new Gtk.Action("redoAction", null, null, "gtk-redo");
this.redoAction.Sensitive = false;
w2.Add(this.redoAction, null);
this.zoom100Action = new Gtk.Action("zoom100Action", null, null, "gtk-zoom-100");
this.zoom100Action.Sensitive = false;
w2.Add(this.zoom100Action, null);
this.zoomFitAction = new Gtk.Action("zoomFitAction", null, null, "gtk-zoom-fit");
this.zoomFitAction.Sensitive = false;
w2.Add(this.zoomFitAction, null);
this.zoomOutAction = new Gtk.Action("zoomOutAction", null, null, "gtk-zoom-out");
this.zoomOutAction.Sensitive = false;
w2.Add(this.zoomOutAction, null);
this.zoomInAction = new Gtk.Action("zoomInAction", null, null, "gtk-zoom-in");
this.zoomInAction.Sensitive = false;
w2.Add(this.zoomInAction, null);
this.helpAction = new Gtk.Action("helpAction", null, null, "gtk-help");
this.helpAction.Sensitive = false;
w2.Add(this.helpAction, null);
w1.InsertActionGroup(w2, 0);
this.AddAccelGroup(w1.AccelGroup);
this.Name = "MainWindow";
this.Title = Mono.Unix.Catalog.GetString("The Pimp");
this.Icon = Stetic.IconLoader.LoadIcon(this, "stock_insert_image", Gtk.IconSize.Menu, 16);
this.WindowPosition = ((Gtk.WindowPosition)(4));
// Container child MainWindow.Gtk.Container+ContainerChild
this.vbox1 = new Gtk.VBox();
this.vbox1.Name = "vbox1";
// Container child vbox1.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><menubar name='menubar1'><menu action='FileAction'><menuitem action='NewAction'/><menuitem action='OpenAction'/><menuitem action='SaveAction'/><menuitem action='SaveAsAction'/><menuitem action='QuitAction'/></menu><menu action='EditAction'><menuitem action='UndoAction'/><menuitem action='RedoAction'/></menu><menu action='ViewAction'><menuitem action='ZoomInAction'/><menuitem action='ZoomOutAction'/><menuitem action='BestFitAction'/><menuitem action='NormalSizeAction'/></menu><menu action='HelpAction'><menuitem action='HelpAction1'/><menuitem action='AboutAction'/></menu></menubar></ui>");
this.menubar1 = ((Gtk.MenuBar)(w1.GetWidget("/menubar1")));
this.menubar1.Name = "menubar1";
this.vbox1.Add(this.menubar1);
Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar1]));
w3.Position = 0;
w3.Expand = false;
w3.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><toolbar name='toolbar1'><toolitem action='newAction'/><toolitem action='openAction'/><toolitem action='saveAction'/><separator/><toolitem action='undoAction'/><toolitem action='redoAction'/><separator/><toolitem action='zoomInAction'/><toolitem action='zoomOutAction'/><toolitem action='zoomFitAction'/><toolitem action='zoom100Action'/><separator/><toolitem action='helpAction'/></toolbar></ui>");
this.toolbar1 = ((Gtk.Toolbar)(w1.GetWidget("/toolbar1")));
this.toolbar1.Name = "toolbar1";
this.toolbar1.ShowArrow = false;
this.toolbar1.ToolbarStyle = ((Gtk.ToolbarStyle)(0));
this.vbox1.Add(this.toolbar1);
Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox1[this.toolbar1]));
w4.Position = 1;
w4.Expand = false;
w4.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.hpaned1 = new Gtk.HPaned();
this.hpaned1.CanFocus = true;
this.hpaned1.Name = "hpaned1";
this.hpaned1.Position = 408;
// Container child hpaned1.Gtk.Paned+PanedChild
this.notebook1 = new Gtk.Notebook();
this.notebook1.CanFocus = true;
this.notebook1.Name = "notebook1";
this.notebook1.CurrentPage = 0;
this.notebook1.BorderWidth = ((uint)(5));
// Container child notebook1.Gtk.Notebook+NotebookChild
this.scrolledwindow1 = new Gtk.ScrolledWindow();
this.scrolledwindow1.WidthRequest = 640;
this.scrolledwindow1.HeightRequest = 480;
this.scrolledwindow1.CanFocus = true;
this.scrolledwindow1.Name = "scrolledwindow1";
this.scrolledwindow1.ShadowType = ((Gtk.ShadowType)(1));
// Container child scrolledwindow1.Gtk.Container+ContainerChild
Gtk.Viewport w5 = new Gtk.Viewport();
w5.ShadowType = ((Gtk.ShadowType)(0));
// Container child GtkViewport.Gtk.Container+ContainerChild
this.drawingarea1 = new Gtk.DrawingArea();
this.drawingarea1.Name = "drawingarea1";
w5.Add(this.drawingarea1);
this.scrolledwindow1.Add(w5);
this.notebook1.Add(this.scrolledwindow1);
// Notebook tab
this.label1 = new Gtk.Label();
this.label1.Name = "label1";
this.label1.LabelProp = Mono.Unix.Catalog.GetString("Test tab");
this.notebook1.SetTabLabel(this.scrolledwindow1, this.label1);
this.label1.ShowAll();
this.hpaned1.Add(this.notebook1);
Gtk.Paned.PanedChild w9 = ((Gtk.Paned.PanedChild)(this.hpaned1[this.notebook1]));
w9.Resize = false;
// Container child hpaned1.Gtk.Paned+PanedChild
this.vpaned1 = new Gtk.VPaned();
this.vpaned1.CanFocus = true;
this.vpaned1.Name = "vpaned1";
this.vpaned1.Position = 60;
// Container child vpaned1.Gtk.Paned+PanedChild
this.vbox2 = new Gtk.VBox();
this.vbox2.Name = "vbox2";
this.vbox2.BorderWidth = ((uint)(5));
this.vpaned1.Add(this.vbox2);
Gtk.Paned.PanedChild w10 = ((Gtk.Paned.PanedChild)(this.vpaned1[this.vbox2]));
w10.Resize = false;
// Container child vpaned1.Gtk.Paned+PanedChild
this.vbox3 = new Gtk.VBox();
this.vbox3.Name = "vbox3";
this.vbox3.BorderWidth = ((uint)(5));
this.vpaned1.Add(this.vbox3);
this.hpaned1.Add(this.vpaned1);
this.vbox1.Add(this.hpaned1);
Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.vbox1[this.hpaned1]));
w13.Position = 2;
// Container child vbox1.Gtk.Box+BoxChild
this.statusbar1 = new Gtk.Statusbar();
this.statusbar1.Name = "statusbar1";
this.statusbar1.Spacing = 6;
this.vbox1.Add(this.statusbar1);
Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox1[this.statusbar1]));
w14.Position = 3;
w14.Expand = false;
w14.Fill = false;
this.Add(this.vbox1);
if ((this.Child != null)) {
this.Child.ShowAll();
}
this.DefaultWidth = 840;
this.DefaultHeight = 680;
this.Show();
this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
this.openAction.Activated += new System.EventHandler(this.OnOpenActionActivated);
this.OpenAction.Activated += new System.EventHandler(this.OnOpenActionActivated);
this.QuitAction.Activated += new System.EventHandler(this.OnQuitActionActivated);
}
}

+ 81
- 0
pimp/Pimp/gtk-gui/Pimp.OpenFile.cs 查看文件

@@ -0,0 +1,81 @@
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------

namespace Pimp {
public partial class OpenFile {
private Gtk.FileChooserWidget filechooserwidget1;
private Gtk.Button buttonCancel;
private Gtk.Button buttonOk;
protected virtual void Build() {
Stetic.Gui.Initialize(this);
// Widget Pimp.OpenFile
this.Name = "Pimp.OpenFile";
this.Title = Mono.Unix.Catalog.GetString("Open File");
this.Icon = Stetic.IconLoader.LoadIcon(this, "gtk-open", Gtk.IconSize.Menu, 16);
this.TypeHint = ((Gdk.WindowTypeHint)(1));
this.WindowPosition = ((Gtk.WindowPosition)(4));
this.Modal = true;
this.HasSeparator = false;
// Internal child Pimp.OpenFile.VBox
Gtk.VBox w1 = this.VBox;
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
this.filechooserwidget1 = new Gtk.FileChooserWidget(((Gtk.FileChooserAction)(0)));
this.filechooserwidget1.Name = "filechooserwidget1";
w1.Add(this.filechooserwidget1);
Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.filechooserwidget1]));
w2.Position = 0;
// Internal child Pimp.OpenFile.ActionArea
Gtk.HButtonBox w3 = this.ActionArea;
w3.Name = "dialog1_ActionArea";
w3.Spacing = 6;
w3.BorderWidth = ((uint)(5));
w3.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
this.buttonCancel = new Gtk.Button();
this.buttonCancel.CanDefault = true;
this.buttonCancel.CanFocus = true;
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.UseStock = true;
this.buttonCancel.UseUnderline = true;
this.buttonCancel.Label = "gtk-cancel";
this.AddActionWidget(this.buttonCancel, -6);
Gtk.ButtonBox.ButtonBoxChild w4 = ((Gtk.ButtonBox.ButtonBoxChild)(w3[this.buttonCancel]));
w4.Expand = false;
w4.Fill = false;
// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
this.buttonOk = new Gtk.Button();
this.buttonOk.CanDefault = true;
this.buttonOk.CanFocus = true;
this.buttonOk.Name = "buttonOk";
this.buttonOk.UseStock = true;
this.buttonOk.UseUnderline = true;
this.buttonOk.Label = "gtk-ok";
this.AddActionWidget(this.buttonOk, -5);
Gtk.ButtonBox.ButtonBoxChild w5 = ((Gtk.ButtonBox.ButtonBoxChild)(w3[this.buttonOk]));
w5.Position = 1;
w5.Expand = false;
w5.Fill = false;
if ((this.Child != null)) {
this.Child.ShowAll();
}
this.DefaultWidth = 627;
this.DefaultHeight = 448;
this.Show();
}
}
}

+ 68
- 0
pimp/Pimp/gtk-gui/generated.cs 查看文件

@@ -0,0 +1,68 @@
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------

namespace Stetic {
internal class Gui {
private static bool initialized;
internal static void Initialize(Gtk.Widget iconRenderer) {
if ((Stetic.Gui.initialized == false)) {
Stetic.Gui.initialized = true;
}
}
}
internal class IconLoader {
public static Gdk.Pixbuf LoadIcon(Gtk.Widget widget, string name, Gtk.IconSize size, int sz) {
Gdk.Pixbuf res = widget.RenderIcon(name, size, null);
if ((res != null)) {
return res;
}
else {
try {
return Gtk.IconTheme.Default.LoadIcon(name, sz, 0);
}
catch (System.Exception ) {
if ((name != "gtk-missing-image")) {
return Stetic.IconLoader.LoadIcon(widget, "gtk-missing-image", size, sz);
}
else {
Gdk.Pixmap pmap = new Gdk.Pixmap(Gdk.Screen.Default.RootWindow, sz, sz);
Gdk.GC gc = new Gdk.GC(pmap);
gc.RgbFgColor = new Gdk.Color(255, 255, 255);
pmap.DrawRectangle(gc, true, 0, 0, sz, sz);
gc.RgbFgColor = new Gdk.Color(0, 0, 0);
pmap.DrawRectangle(gc, false, 0, 0, (sz - 1), (sz - 1));
gc.SetLineAttributes(3, Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round);
gc.RgbFgColor = new Gdk.Color(255, 0, 0);
pmap.DrawLine(gc, (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)), ((sz - 1) - (sz / 4)));
pmap.DrawLine(gc, ((sz - 1) - (sz / 4)), (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)));
return Gdk.Pixbuf.FromDrawable(pmap, pmap.Colormap, 0, 0, 0, 0, sz, sz);
}
}
}
}
}
internal class ActionGroups {
public static Gtk.ActionGroup GetActionGroup(System.Type type) {
return Stetic.ActionGroups.GetActionGroup(type.FullName);
}
public static Gtk.ActionGroup GetActionGroup(string name) {
return null;
}
}
}

+ 435
- 0
pimp/Pimp/gtk-gui/gui.stetic 查看文件

@@ -0,0 +1,435 @@
<?xml version="1.0" encoding="utf-8"?>
<stetic-interface>
<configuration>
<images-root-path>..</images-root-path>
<target-gtk-version>2.12.1</target-gtk-version>
</configuration>
<widget class="Gtk.Window" id="MainWindow" design-size="840 680">
<action-group name="Default">
<action id="newAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes" />
<property name="Sensitive">False</property>
<property name="StockId">gtk-new</property>
</action>
<action id="openAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes" />
<property name="StockId">gtk-open</property>
<signal name="Activated" handler="OnOpenActionActivated" />
</action>
<action id="saveAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes" />
<property name="Sensitive">False</property>
<property name="StockId">gtk-save</property>
</action>
<action id="Action">
<property name="Type">Action</property>
<property name="Label" translatable="yes" />
</action>
<action id="FileAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">File</property>
<property name="ShortLabel" translatable="yes">File</property>
</action>
<action id="EditAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">Edit</property>
<property name="ShortLabel" translatable="yes">Edit</property>
</action>
<action id="ViewAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">View</property>
<property name="ShortLabel" translatable="yes">View</property>
</action>
<action id="HelpAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">Help</property>
<property name="ShortLabel" translatable="yes">Help</property>
</action>
<action id="NewAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">_New</property>
<property name="Sensitive">False</property>
<property name="ShortLabel" translatable="yes">_New</property>
<property name="StockId">gtk-new</property>
</action>
<action id="OpenAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">_Open</property>
<property name="ShortLabel" translatable="yes">_Open</property>
<property name="StockId">gtk-open</property>
<signal name="Activated" handler="OnOpenActionActivated" />
</action>
<action id="SaveAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">_Save</property>
<property name="Sensitive">False</property>
<property name="ShortLabel" translatable="yes">_Save</property>
<property name="StockId">gtk-save</property>
</action>
<action id="SaveAsAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">Save _As</property>
<property name="Sensitive">False</property>
<property name="ShortLabel" translatable="yes">Save _As</property>
<property name="StockId">gtk-save-as</property>
</action>
<action id="QuitAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">_Quit</property>
<property name="ShortLabel" translatable="yes">_Quit</property>
<property name="StockId">gtk-quit</property>
<signal name="Activated" handler="OnQuitActionActivated" />
</action>
<action id="HelpAction1">
<property name="Type">Action</property>
<property name="Label" translatable="yes">_Help</property>
<property name="Sensitive">False</property>
<property name="ShortLabel" translatable="yes">_Help</property>
<property name="StockId">gtk-help</property>
</action>
<action id="AboutAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">_About</property>
<property name="Sensitive">False</property>
<property name="ShortLabel" translatable="yes">_About</property>
<property name="StockId">gtk-about</property>
</action>
<action id="UndoAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">_Undo</property>
<property name="Sensitive">False</property>
<property name="ShortLabel" translatable="yes">_Undo</property>
<property name="StockId">gtk-undo</property>
</action>
<action id="RedoAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">_Redo</property>
<property name="Sensitive">False</property>
<property name="ShortLabel" translatable="yes">_Redo</property>
<property name="StockId">gtk-redo</property>
</action>
<action id="BestFitAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">Best _Fit</property>
<property name="Sensitive">False</property>
<property name="ShortLabel" translatable="yes">Best _Fit</property>
<property name="StockId">gtk-zoom-fit</property>
</action>
<action id="NormalSizeAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">_Normal Size</property>
<property name="Sensitive">False</property>
<property name="ShortLabel" translatable="yes">_Normal Size</property>
<property name="StockId">gtk-zoom-100</property>
</action>
<action id="ZoomOutAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">Zoom _Out</property>
<property name="Sensitive">False</property>
<property name="ShortLabel" translatable="yes">Zoom _Out</property>
<property name="StockId">gtk-zoom-out</property>
</action>
<action id="ZoomInAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">Zoom _In</property>
<property name="Sensitive">False</property>
<property name="ShortLabel" translatable="yes">Zoom _In</property>
<property name="StockId">gtk-zoom-in</property>
</action>
<action id="undoAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes" />
<property name="Sensitive">False</property>
<property name="StockId">gtk-undo</property>
</action>
<action id="redoAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes" />
<property name="Sensitive">False</property>
<property name="StockId">gtk-redo</property>
</action>
<action id="zoom100Action">
<property name="Type">Action</property>
<property name="Label" translatable="yes" />
<property name="Sensitive">False</property>
<property name="StockId">gtk-zoom-100</property>
</action>
<action id="zoomFitAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes" />
<property name="Sensitive">False</property>
<property name="StockId">gtk-zoom-fit</property>
</action>
<action id="zoomOutAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes" />
<property name="Sensitive">False</property>
<property name="StockId">gtk-zoom-out</property>
</action>
<action id="zoomInAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes" />
<property name="Sensitive">False</property>
<property name="StockId">gtk-zoom-in</property>
</action>
<action id="helpAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes" />
<property name="Sensitive">False</property>
<property name="StockId">gtk-help</property>
</action>
</action-group>
<property name="MemberName" />
<property name="Title" translatable="yes">The Pimp</property>
<property name="Icon">stock:stock_insert_image Menu</property>
<property name="WindowPosition">CenterOnParent</property>
<signal name="DeleteEvent" handler="OnDeleteEvent" />
<child>
<widget class="Gtk.VBox" id="vbox1">
<property name="MemberName" />
<child>
<widget class="Gtk.MenuBar" id="menubar1">
<property name="MemberName" />
<node name="menubar1" type="Menubar">
<node type="Menu" action="FileAction">
<node type="Menuitem" action="NewAction" />
<node type="Menuitem" action="OpenAction" />
<node type="Menuitem" action="SaveAction" />
<node type="Menuitem" action="SaveAsAction" />
<node type="Menuitem" action="QuitAction" />
</node>
<node type="Menu" action="EditAction">
<node type="Menuitem" action="UndoAction" />
<node type="Menuitem" action="RedoAction" />
</node>
<node type="Menu" action="ViewAction">
<node type="Menuitem" action="ZoomInAction" />
<node type="Menuitem" action="ZoomOutAction" />
<node type="Menuitem" action="BestFitAction" />
<node type="Menuitem" action="NormalSizeAction" />
</node>
<node type="Menu" action="HelpAction">
<node type="Menuitem" action="HelpAction1" />
<node type="Menuitem" action="AboutAction" />
</node>
</node>
</widget>
<packing>
<property name="Position">0</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
<child>
<widget class="Gtk.Toolbar" id="toolbar1">
<property name="MemberName" />
<property name="ShowArrow">False</property>
<property name="ButtonStyle">Icons</property>
<node name="toolbar1" type="Toolbar">
<node type="Toolitem" action="newAction" />
<node type="Toolitem" action="openAction" />
<node type="Toolitem" action="saveAction" />
<node type="Separator" />
<node type="Toolitem" action="undoAction" />
<node type="Toolitem" action="redoAction" />
<node type="Separator" />
<node type="Toolitem" action="zoomInAction" />
<node type="Toolitem" action="zoomOutAction" />
<node type="Toolitem" action="zoomFitAction" />
<node type="Toolitem" action="zoom100Action" />
<node type="Separator" />
<node type="Toolitem" action="helpAction" />
</node>
</widget>
<packing>
<property name="Position">1</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
<child>
<widget class="Gtk.HPaned" id="hpaned1">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Position">408</property>
<child>
<widget class="Gtk.Notebook" id="notebook1">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="CurrentPage">0</property>
<property name="BorderWidth">5</property>
<child>
<widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
<property name="MemberName" />
<property name="WidthRequest">640</property>
<property name="HeightRequest">480</property>
<property name="CanFocus">True</property>
<property name="ShadowType">In</property>
<child>
<widget class="Gtk.Viewport" id="GtkViewport">
<property name="MemberName" />
<property name="ShadowType">None</property>
<child>
<widget class="Gtk.DrawingArea" id="drawingarea1">
<property name="MemberName" />
</widget>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="Gtk.Label" id="label1">
<property name="MemberName" />
<property name="LabelProp" translatable="yes">Test tab</property>
</widget>
<packing>
<property name="type">tab</property>
</packing>
</child>
</widget>
<packing>
<property name="Resize">False</property>
</packing>
</child>
<child>
<widget class="Gtk.VPaned" id="vpaned1">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Position">60</property>
<child>
<widget class="Gtk.VBox" id="vbox2">
<property name="MemberName" />
<property name="BorderWidth">5</property>
<child>
<placeholder />
</child>
<child>
<placeholder />
</child>
<child>
<placeholder />
</child>
</widget>
<packing>
<property name="Resize">False</property>
</packing>
</child>
<child>
<widget class="Gtk.VBox" id="vbox3">
<property name="MemberName" />
<property name="BorderWidth">5</property>
<child>
<placeholder />
</child>
<child>
<placeholder />
</child>
<child>
<placeholder />
</child>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name="Position">2</property>
<property name="AutoSize">True</property>
</packing>
</child>
<child>
<widget class="Gtk.Statusbar" id="statusbar1">
<property name="MemberName" />
<property name="Spacing">6</property>
<child>
<placeholder />
</child>
<child>
<placeholder />
</child>
</widget>
<packing>
<property name="Position">3</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
<widget class="Gtk.Dialog" id="Pimp.OpenFile" design-size="627 448">
<property name="MemberName" />
<property name="Title" translatable="yes">Open File</property>
<property name="Icon">stock:gtk-open Menu</property>
<property name="TypeHint">Dialog</property>
<property name="WindowPosition">CenterOnParent</property>
<property name="Modal">True</property>
<property name="Buttons">2</property>
<property name="HelpButton">False</property>
<property name="HasSeparator">False</property>
<child internal-child="VBox">
<widget class="Gtk.VBox" id="dialog1_VBox">
<property name="MemberName" />
<property name="BorderWidth">2</property>
<child>
<widget class="Gtk.FileChooserWidget" id="filechooserwidget1">
<property name="MemberName" />
</widget>
<packing>
<property name="Position">0</property>
<property name="AutoSize">True</property>
</packing>
</child>
</widget>
</child>
<child internal-child="ActionArea">
<widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
<property name="MemberName" />
<property name="Spacing">6</property>
<property name="BorderWidth">5</property>
<property name="Size">2</property>
<property name="LayoutStyle">End</property>
<child>
<widget class="Gtk.Button" id="buttonCancel">
<property name="MemberName" />
<property name="CanDefault">True</property>
<property name="CanFocus">True</property>
<property name="UseStock">True</property>
<property name="Type">StockItem</property>
<property name="StockId">gtk-cancel</property>
<property name="ResponseId">-6</property>
<property name="label">gtk-cancel</property>
</widget>
<packing>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
<child>
<widget class="Gtk.Button" id="buttonOk">
<property name="MemberName" />
<property name="CanDefault">True</property>
<property name="CanFocus">True</property>
<property name="UseStock">True</property>
<property name="Type">StockItem</property>
<property name="StockId">gtk-ok</property>
<property name="ResponseId">-5</property>
<property name="label">gtk-ok</property>
</widget>
<packing>
<property name="Position">1</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
</stetic-interface>

+ 3
- 0
pimp/Pimp/pimp.in 查看文件

@@ -0,0 +1,3 @@
#!/bin/sh

exec mono "@expanded_libdir@/@PACKAGE@/Pimp.exe" "$@"

+ 30
- 0
pimp/Pipi/AssemblyInfo.cs 查看文件

@@ -0,0 +1,30 @@
// AssemblyInfo.cs created with MonoDevelop
// User: sam at 13:14 04/10/2008
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//
using System.Reflection;
using System.Runtime.CompilerServices;

// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.

[assembly: AssemblyTitle("Pipi")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// If the build and revision are set to '*' they will be updated automatically.

[assembly: AssemblyVersion("1.0.*.*")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.

[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]

+ 23
- 0
pimp/Pipi/Pipi.cs 查看文件

@@ -0,0 +1,23 @@
// MyClass.cs created with MonoDevelop
// User: sam at 13:14 04/10/2008
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//

using System;
using System.Runtime.InteropServices;
using System.Security;

namespace Pipi
{
public static class Libpipi
{
[DllImport("libpipi.dll", CallingConvention=CallingConvention.Cdecl),
SuppressUnmanagedCodeSecurity]
private static extern IntPtr pipi_get_version();
public static string getVersion()
{
return Marshal.PtrToStringAnsi(pipi_get_version());
}
}
}

+ 23
- 0
pimp/Pipi/Pipi.mdp 查看文件

@@ -0,0 +1,23 @@
<Project name="Pipi" fileversion="2.0" language="C#" clr-version="Net_2_0" ctype="DotNetProject">
<Configurations active="Debug">
<Configuration name="Debug" ctype="DotNetProjectConfiguration">
<Output directory="bin/Debug" assembly="pipi-sharp" />
<Build debugmode="True" target="Library" />
<Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" />
<CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
</Configuration>
<Configuration name="Release" ctype="DotNetProjectConfiguration">
<Output directory="bin/Release" assembly="pipi-sharp" />
<Build debugmode="False" target="Library" />
<Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" />
<CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
</Configuration>
</Configurations>
<Contents>
<File name="Pipi.cs" subtype="Code" buildaction="Compile" />
<File name="AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
</Contents>
<References>
<ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</References>
</Project>

+ 3
- 0
pimp/Pipi/pipi-sharp.dll.config 查看文件

@@ -0,0 +1,3 @@
<configuration>
<dllmap dll="libpipi.dll" target="../../../../pipi/.libs/libpipi.so.0" />
</configuration>

+ 6
- 0
pimp/Pipi/pipi.pc.in 查看文件

@@ -0,0 +1,6 @@
Name: Pipi
Description: Pipi
Version: 0.1

Requires:
Libs: -r:@expanded_libdir@/@PACKAGE@/pipi-sharp.dll

+ 4
- 0
pimp/config.log 查看文件

@@ -0,0 +1,4 @@
Looking for required packages
Checking for package 'glade-sharp-2.0'.. found.
Checking for package 'glib-sharp-2.0'.. found.
Checking for package 'gtk-sharp-2.0'.. found.

+ 9
- 0
pimp/config.make 查看文件

@@ -0,0 +1,9 @@
prefix=/usr/local
libdir=/usr/local/lib
bindir=/usr/local/bin
datadir=/usr/local/share
RUNTIME=mono
ASSEMBLY_VERSION=0.1.0.0
VERSION=0.1
PACKAGE=pimp
CONFIG=DEBUG

+ 159
- 0
pimp/configure 查看文件

@@ -0,0 +1,159 @@
#!/bin/bash
VERSION=0.1
PACKAGE=pimp
prefix=/usr/local
config=RELEASE
configurations=" RELEASE DEBUG"
common_packages=" glade-sharp-2.0;2.12.1 glib-sharp-2.0;2.12.1 gtk-sharp-2.0;2.12.1"


usage ()
{
echo "Usage : configure [OPTION]... [--config=CONFIG]"
echo
echo "Options:"
echo " --prefix=PREFIX install architecture-independent files in PREFIX"
echo " [/usr/local]"
echo " --bindir=DIR user executables [PREFIX/bin]"
echo " --datadir=DIR read-only architecture-independent data [PREFIX/share]"
echo " --libdir=DIR object code libraries [PREFIX/lib]"
echo
echo "Configurations available :"
for c in $configurations; do
if [ "$c" = "$config" ]; then
echo " $c (Default)"
else
echo " $c"
fi
done
}

validate_config ()
{
test -z "$1" && return 0
for c in $configurations; do
if [ "$c" = "$1" ]; then
return 1
fi
done
return 0
}

check_package ()
{
name=`echo $1 | cut -d\; -f1`
version=`echo $1 | cut -d\; -f2`

echo -n "Checking for package '$name'.." | tee -a config.log
pkg-config --atleast-version=$version $name
if [ $? -ne 0 ]; then
echo " ERROR: Package named '$name' >= $version not found." | tee -a config.log
echo "Try adjusting your PKG_CONFIG_PATH environment variable." | tee -a config.log
return 1
fi
echo " found." | tee -a config.log
}

check_required_packages ()
{
echo "Looking for required packages" | tee config.log
var=required_packages_$config
for pkg in $common_packages ${!var}; do
check_package $pkg
retval=$?
[ $retval -ne 0 ] && return $retval
done
return 0
}

while test x$1 != x; do
case $1 in
--prefix=*)
prefix=`echo $1 | sed 's/--prefix=//'`
;;
--prefix)
shift
prefix=$1
;;
--libdir=*)
libdir=`echo $1 | sed 's/--libdir=//'`
;;
--libdir)
shift
libdir=$1
;;
--bindir=*)
bindir=`echo $1 | sed 's/--bindir=//'`
;;
--bindir)
shift
bindir=$1
;;
--datadir=*)
datadir=`echo $1 | sed 's/--datadir=//'`
;;
--datadir)
shift
datadir=$1
;;
--config=*)
conf=`echo $1 | sed 's/--config=//'`
validate_config "$conf"
if [ $? -eq 1 ]; then
config=$conf
else
echo "Invalid config name - $conf"
usage
exit 1
fi
;;
--help)
usage
exit
;;
*)
echo Unknown argument $1 >&2
usage
exit 1
;;
esac
shift
done

check_required_packages
[ $? -eq 1 ] && exit 1

if [ -z "$libdir" ]; then
libdir=$prefix/lib
fi
if [ -z "$bindir" ]; then
bindir=$prefix/bin
fi
if [ -z "$datadir" ]; then
datadir=$prefix/share
fi

echo "prefix=$prefix" > config.make
echo "libdir=$libdir" >> config.make
echo "bindir=$bindir" >> config.make
echo "datadir=$datadir" >> config.make
echo "RUNTIME=mono" >> config.make
echo "ASSEMBLY_VERSION=$VERSION.0.0" >> config.make
echo "VERSION=$VERSION" >> config.make
echo "PACKAGE=$PACKAGE" >> config.make
echo "CONFIG=$config" >> config.make

echo
echo "$PACKAGE has been configured with "
echo " prefix = $prefix"
if [ "$libdir" != "$prefix/lib" ]; then
echo " libdir = $libdir"
fi
if [ "$bindir" != "$prefix/bin" ]; then
echo " bindir = $bindir"
fi
if [ "$datadir" != "$prefix/share" ]; then
echo " datadir = $datadir"
fi
echo " config = $config"
echo

+ 40
- 0
pimp/rules.make 查看文件

@@ -0,0 +1,40 @@
clean-local:
make pre-clean-local-hook
make $(CONFIG)_BeforeClean
-rm -f $(CLEANFILES)
make $(CONFIG)_AfterClean
make post-clean-local-hook

install-local:
uninstall-local:

dist-local:
make pre-dist-local-hook distdir=$$distdir
list='$(EXTRA_DIST)'; \
for f in Makefile $$list; do \
d=`dirname "$$f"`; \
test -d "$(distdir)/$$d" || \
mkdir -p "$(distdir)/$$d"; \
cp -p "$$f" "$(distdir)/$$d" || exit 1; \
done
make post-dist-local-hook distdir=$$distdir

dist-local-recursive:
for dir in $(SUBDIRS); do \
mkdir -p $(distdir)/$$dir || true; \
case $$dir in \
.) make dist-local distdir=$(distdir) || exit 1;; \
*) (cd $$dir; make dist-local distdir=$(distdir)/$$dir) || exit 1; \
esac \
done

#hooks: Available hooks - all, clean, install, uninstall and dist
# and their *-local variants
pre-%-hook: ; @:
post-%-hook: ; @:

#targets for custom commands
%_BeforeBuild: ; @:
%_AfterBuild: ; @:
%_BeforeClean: ; @:
%_AfterClean: ; @:

正在加载...
取消
保存