Commits

Herbert Breunung  committed 682bdd5

after first tries, failed status of inlining an xpm file

  • Participants
  • Parent commits 8df03e3
  • Branches sp2

Comments (0)

Files changed (72)

File data/jenne/app-exit.xpm

Added
New image

File data/jenne/bookmark0.xpm

Added
New image

File data/jenne/bookmark1.xpm

Added
New image

File data/jenne/bookmark2.xpm

Added
New image

File data/jenne/bookmark3.xpm

Added
New image

File data/jenne/bookmark4.xpm

Added
New image

File data/jenne/bookmark5.xpm

Added
New image

File data/jenne/bookmark6.xpm

Added
New image

File data/jenne/bookmark7.xpm

Added
New image

File data/jenne/bookmark8.xpm

Added
New image

File data/jenne/bookmark9.xpm

Added
New image

File data/jenne/clean-up.xpm

Added
New image

File data/jenne/colorpicker.xpm

Added
New image

File data/jenne/config-mode-full.xpm

Added
New image

File data/jenne/config-mode-html.xpm

Added
New image

File data/jenne/config-mode-perl.xpm

Added
New image

File data/jenne/config-preferences.xpm

Added
New image

File data/jenne/edit-bookmark.xpm

Added
New image

File data/jenne/edit-copy.xpm

Added
New image

File data/jenne/edit-cut.xpm

Added
New image

File data/jenne/edit-delete.xpm

Added
New image

File data/jenne/edit-edit.xpm

Added
New image

File data/jenne/edit-paste.xpm

Added
New image

File data/jenne/edit-redo.xpm

Added
New image

File data/jenne/edit-replace.xpm

Added
New image

File data/jenne/edit-undo.xpm

Added
New image

File data/jenne/editor-fullscreen.xpm

Added
New image

File data/jenne/empty.xpm

Added
New image

File data/jenne/favourite.xpm

Added
New image

File data/jenne/file-close.xpm

Added
New image

File data/jenne/file-new.xpm

Added
New image

File data/jenne/file-open.xpm

Added
New image

File data/jenne/file-print.xpm

Added
New image

File data/jenne/file-save-all.xpm

Added
New image

File data/jenne/file-save-as.xpm

Added
New image

File data/jenne/file-save.xpm

Added
New image

File data/jenne/find-next.xpm

Added
New image

File data/jenne/find-previous.xpm

Added
New image

File data/jenne/find-start.xpm

Added
New image

File data/jenne/go-fast-backward.xpm

Added
New image

File data/jenne/go-fast-forward.xpm

Added
New image

File data/jenne/go-first.xpm

Added
New image

File data/jenne/go-last.xpm

Added
New image

File data/jenne/go-next.xpm

Added
New image

File data/jenne/go-previous.xpm

Added
New image

File data/jenne/goto-last-edit.xpm

Added
New image

File data/jenne/goto-line.xpm

Added
New image

File data/jenne/help-documentation.xpm

Added
New image

File data/jenne/help-home.xpm

Added
New image

File data/jenne/help-info.xpm

Added
New image

File data/jenne/help-keyboard.xpm

Added
New image

File data/jenne/help-mail.xpm

Added
New image

File data/jenne/help-tip.xpm

Added
New image

File data/jenne/image.xpm

Added
New image

File data/jenne/line-wrap.xpm

Added
New image

File data/jenne/marker-next.xpm

Added
New image

File data/jenne/marker-previous.xpm

Added
New image

File data/jenne/marker.xpm

Added
New image

File data/jenne/note.xpm

Added
New image

File data/jenne/output-panel.xpm

Added
New image

File data/jenne/panel-close.xpm

Added
New image

File data/jenne/preview.xpm

Added
New image

File data/jenne/reload.xpm

Added
New image

File data/jenne/replace-next.xpm

Added
New image

File data/jenne/replace-previous.xpm

Added
New image

File data/jenne/replace-start.xpm

Added
New image

File data/jenne/run-skript.xpm

Added
New image

File data/jenne/stay-on-top.xpm

Added
New image

File data/proton.xpm

Added
New image
+use strict;
+use warnings;
+
+package ServusWelt;
+use Wx qw/ :everything /;
+use Wx::FS;
+use base qw(Wx::App);                       # von Wx::App ableiten
+
+sub OnInit {
+ my $app   = shift;
+ my $frame = Wx::Frame->new( undef, -1, 'Servus Welt', [-1, -1], [150, 150]);
+ my $panel = Wx::Panel->new( $frame, -1);
+
+	my $staticbox = Wx::StaticBox->new( $panel, -1, 'Wx::StaticBox' );
+	my $nsz = Wx::StaticBoxSizer->new( $staticbox, wxVERTICAL);
+	$panel->SetSizer($nsz);
+
+	Wx::InitAllImageHandlers();
+	load_bmp();
+	#my $bmp = Wx::Bitmap->new('memory:icon.xpm', wxBITMAP_TYPE_ANY );
+	my $icon = Wx::Icon->new();
+	$icon->LoadFile('file_edit.xpm', wxBITMAP_TYPE_ANY);
+	$frame->SetIcon( $icon );
+
+	$frame->Show(1);                        # Fenster zeichnen
+	$app->SetTopWindow($frame);             # Fenster als oberstes bestimmen
+	1;
+} # /OnInit
+
+sub load_bmp {
+	Wx::FileSystem::AddHandler( Wx::MemoryFSHandler->new );
+	#local $/;
+	Wx::MemoryFSHandler::AddTextFile( 'file_edit.xpm', <<'EOT' );
+/* XPM */
+static char * file_edit_xpm[] = {
+"16 16 25 1",
+" 	c None",
+".	c #5C6272",
+"+	c #996903",
+"@	c #6766CC",
+"#	c #FFFFFF",
+"$	c #FEDE7B",
+"%	c #0099FF",
+"&	c #CC9804",
+"*	c #7D4900",
+"=	c #362F2D",
+"-	c #A0A1A6",
+";	c #030353",
+">	c #B6B4B3",
+",	c #FBFBFC",
+"'	c #FEFEFE",
+")	c #F0D5C5",
+"!	c #F5F6F9",
+"~	c #EDF0F4",
+"{	c #E5EAF0",
+"]	c #DDE3EB",
+"^	c #D4DBE5",
+"/	c #CCD5E1",
+"(	c #C4CFDC",
+"_	c #BECAD9",
+":	c #BAC6D6",
+"                ",
+"  ..........+@@ ",
+"  .########+$%@ ",
+"  .#######+$&*= ",
+"  .######+$&*=- ",
+"  .#####+$&*=;- ",
+"  .####+$&*=#;- ",
+"  .###+$&*=##;- ",
+"  .##>$+*=##,;- ",
+"  .##=')=#,!~;- ",
+"  .##==>,!~{];- ",
+"  .###,!~{]^/;- ",
+"  .#,!~{]^/(_;- ",
+"  .!~{]^/(_::;- ",
+"  .;;;;;;;;;;;- ",
+"   ------------ "};
+
+EOT
+
+	my $xpm = 
+'static char * file_edit_xpm[] = {'.
+'"16 16 1 1",'.
+'" 	c None",'.
+'"                ",'.
+'"                ",'.
+'"                ",'.
+'"                ",'.
+'"                ",'.
+'"                ",'.
+'"                ",'.
+'"                ",'.
+'"                ",'.
+'"                ",'.
+'"                ",'.
+'"                ",'.
+'"                ",'.
+'"                ",'.
+'"                ",'.
+'"                "}';
+
+	my $bmp = Wx::Bitmap->new($xpm);
+
+}
+
+package main;
+ServusWelt->new->MainLoop;                # Programminstanz erzeugen und starten
+
+__END__
+
+
+/* XPM */
+static char * empty_xpm[] = {
+"16 16 1 1",
+" 	c None",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                "};
+
+
+

File lib/inlinexpm.pl

+#!usr/bin/perl
+use v5.12;
+use warnings;
+
+InlineXPM->new->MainLoop;
+
+package InlineXPM;
+use Wx;
+use Wx::FS;
+use Wx::STC;
+use base qw(Wx::App);
+
+sub OnInit {
+	my $app   = shift;
+	my $frame = Wx::Frame->new( undef, -1, __PACKAGE__, [-1,-1], [1000,800]);
+	
+	Wx::FileSystem::AddHandler( Wx::MemoryFSHandler->new );
+    local $/;
+	Wx::MemoryFSHandler::AddTextFile( 'file.xpm', <<'EOB' );
+/* XPM */
+static char * proton_xpm[] = {
+"32 32 5 1",
+" 	c None",
+".	c #808080",
+"+	c #FFFFFF",
+"@	c #000000",
+"#	c #000080",
+"................................",
+"................................",
+"..++++++++++++++++++++++++++++@.",
+"..++++++++++++++++++++++++++++@.",
+"..++++++++++++++++++++++++++++@.",
+"..++++++++++++++++++++++++++++@.",
+"..+++#################++++++++@.",
+"..+++#################++++++++@.",
+"..++++++++++++++++++++++++++++@.",
+"..++++++++++++++++++++++++++++@.",
+"..+++###################++++++@.",
+"..+++###################++++++@.",
+"..++++++++++++++++++++++++++++@.",
+"..++++++++++++++++++++++++++++@.",
+"..+++###############++++++++++@.",
+"..+++###############++++++++++@.",
+"..++++++++++++++++++++++++++++@.",
+"..++++++++++++++++++++++++++++@.",
+"..+++###################++++++@.",
+"..+++###################++++++@.",
+"..++++++++++++++++++++++++++++@.",
+"..++++++++++++++++++++++++++++@.",
+"..+++################+++++++++@.",
+"..+++################+++++++++@.",
+"..++++++++++++++++++++++++++++@.",
+"..++++++++++++++++++++++++++++@.",
+"..+++##################+++++++@.",
+"..+++##################+++++++@.",
+"..++++++++++++++++++++++++++++@.",
+"..++++++++++++++++++++++++++++@.",
+"..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.",
+"................................"};
+EOB
+
+	Wx::InitAllImageHandlers();
+	my $bmp = Wx::Bitmap->new(32,32);
+	$bmp->LoadFile('../data/proton.xpm', &Wx::wxBITMAP_TYPE_XPM);
+	#$bmp->LoadFile('memory:file.xpm', &Wx::wxBITMAP_TYPE_XPM);
+
+	my $pic = Wx::StaticBitmap->new($frame, -1, $bmp); 
+	my $ed = Wx::TextCtrl->new($frame, -1,'');
+	
+
+
+	$ed->LoadFile('../data/proton.xpm');
+	$ed->LoadFile('memory:file.xpm');	
+
+	#while(<DATA>){ print;} 	#local $/='';#print <DATA>;
+
+	my $sizer = Wx::BoxSizer->new(&Wx::wxVERTICAL);
+	$sizer->Add($pic, 0);
+	$sizer->Add($ed, 1, &Wx::wxGROW);
+	$frame->SetSizer($sizer);
+	$frame->Show(1);
+	$app->SetTopWindow($frame);
+	1;
+}
+
+__DATA__
+/* XPM */
+static char * edit_xpm[] = {
+"16 16 27 1",
+" 	c None",
+".	c #3B455E",
+"+	c #000000",
+"@	c #FFFFFF",
+"#	c #00C93C",
+"$	c #5ECB25",
+"%	c #FFFE9C",
+"&	c #32660D",
+"*	c #2A981B",
+"=	c #FEFECC",
+"-	c #FFC99A",
+";	c #FF9623",
+">	c #9F9FA2",
+",	c #9B6614",
+"'	c #525109",
+")	c #EDF0F4",
+"!	c #FEFEFE",
+"~	c #F0D5C5",
+"{	c #E5EAF0",
+"]	c #DDE3EB",
+"^	c #D4DBE5",
+"/	c #CCD5E1",
+"(	c #FBFBFC",
+"_	c #C4CFDC",
+":	c #BECAD9",
+"<	c #F5F6F9",
+"[	c #BAC6D6",
+"                ",
+" .......... ++  ",
+" .@@@@@@@@@+#$+ ",
+" .@@@@@@@@+%&*&+",
+" .@@@@@@@+=-;&+>",
+" .@@@@@@+%-;,+> ",
+" .@@@@@+=-;,+>  ",
+" .@@@@+%-;,+>>  ",
+" .@@@+=-;,+>+>  ",
+" .@@+=';,+>)+>  ",
+" .@@+!~++>{]+>  ",
+" .@@+++>>]^/+>  ",
+" .@(>>>]^/_:+>  ",
+" .<){]^/_:[[+>  ",
+" .+++++++++++>  ",
+"  >>>>>>>>>>>>  "};
 	$title .= ' *' if $status;
 	$self->SetTitle($title);
 }
-
 # autosave
 # status line
 # how insert edit functions