mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
fix problems with pixmaps/xpm files
git-svn-id: svn://localhost/trunk/ardour2@392 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e72e0caf99
commit
8d3fdc3c5b
12 changed files with 579 additions and 57 deletions
|
|
@ -230,8 +230,21 @@ ARDOUR_UI::set_engine (AudioEngine& e)
|
||||||
keyboard = new Keyboard;
|
keyboard = new Keyboard;
|
||||||
install_keybindings ();
|
install_keybindings ();
|
||||||
|
|
||||||
FastMeter::set_vertical_xpm (ARDOUR::find_data_file("v_meter_strip.xpm", "pixmaps"));
|
string meter_path;
|
||||||
FastMeter::set_horizontal_xpm (ARDOUR::find_data_file("h_meter_strip.xpm", "pixmaps"));
|
|
||||||
|
meter_path = ARDOUR::find_data_file("v_meter_strip.xpm", "pixmaps");
|
||||||
|
if (meter_path.empty()) {
|
||||||
|
error << _("no vertical meter strip image found") << endmsg;
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
FastMeter::set_vertical_xpm (meter_path);
|
||||||
|
|
||||||
|
meter_path = ARDOUR::find_data_file("h_meter_strip.xpm", "pixmaps");
|
||||||
|
if (meter_path.empty()) {
|
||||||
|
error << _("no horizontal meter strip image found") << endmsg;
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
FastMeter::set_horizontal_xpm (meter_path);
|
||||||
|
|
||||||
if (setup_windows ()) {
|
if (setup_windows ()) {
|
||||||
throw failed_constructor ();
|
throw failed_constructor ();
|
||||||
|
|
|
||||||
483
gtk2_ardour/pixmaps/v_meter_strip.xpm
Normal file
483
gtk2_ardour/pixmaps/v_meter_strip.xpm
Normal file
|
|
@ -0,0 +1,483 @@
|
||||||
|
/* XPM */
|
||||||
|
static const gchar * v_meter_strip_xpm[] = {
|
||||||
|
"5 250 230 2",
|
||||||
|
" c None",
|
||||||
|
". c #FE0000",
|
||||||
|
"+ c #FF0000",
|
||||||
|
"@ c #FE0100",
|
||||||
|
"# c #FD0200",
|
||||||
|
"$ c #FD0300",
|
||||||
|
"% c #FD0400",
|
||||||
|
"& c #FC0500",
|
||||||
|
"* c #FC0600",
|
||||||
|
"= c #FC0700",
|
||||||
|
"- c #FB0800",
|
||||||
|
"; c #FA0900",
|
||||||
|
"> c #FA0A00",
|
||||||
|
", c #FA0B00",
|
||||||
|
"' c #F90C00",
|
||||||
|
") c #F90D00",
|
||||||
|
"! c #F80E00",
|
||||||
|
"~ c #F80F00",
|
||||||
|
"{ c #F71000",
|
||||||
|
"] c #F71100",
|
||||||
|
"^ c #F61200",
|
||||||
|
"/ c #F61300",
|
||||||
|
"( c #F61400",
|
||||||
|
"_ c #F51600",
|
||||||
|
": c #F41700",
|
||||||
|
"< c #F41800",
|
||||||
|
"[ c #F31A00",
|
||||||
|
"} c #F31B00",
|
||||||
|
"| c #F21C00",
|
||||||
|
"1 c #F21E00",
|
||||||
|
"2 c #F11F00",
|
||||||
|
"3 c #F54A00",
|
||||||
|
"4 c #FFA900",
|
||||||
|
"5 c #FFAB00",
|
||||||
|
"6 c #FFAC01",
|
||||||
|
"7 c #FFAD02",
|
||||||
|
"8 c #FFAE02",
|
||||||
|
"9 c #FFAF03",
|
||||||
|
"0 c #FFB004",
|
||||||
|
"a c #FFB104",
|
||||||
|
"b c #FFB205",
|
||||||
|
"c c #FFB406",
|
||||||
|
"d c #FFB506",
|
||||||
|
"e c #FFB607",
|
||||||
|
"f c #FFB708",
|
||||||
|
"g c #FFB808",
|
||||||
|
"h c #FFB909",
|
||||||
|
"i c #FFBA0A",
|
||||||
|
"j c #FFBB0A",
|
||||||
|
"k c #FFBC0A",
|
||||||
|
"l c #FFBD0B",
|
||||||
|
"m c #FFBE0C",
|
||||||
|
"n c #FFBF0C",
|
||||||
|
"o c #FFC00D",
|
||||||
|
"p c #FFC10E",
|
||||||
|
"q c #FFC20F",
|
||||||
|
"r c #FFC30F",
|
||||||
|
"s c #FFC410",
|
||||||
|
"t c #FFC511",
|
||||||
|
"u c #FFC611",
|
||||||
|
"v c #FFC711",
|
||||||
|
"w c #FFC812",
|
||||||
|
"x c #FFC913",
|
||||||
|
"y c #FFCA13",
|
||||||
|
"z c #FFCB14",
|
||||||
|
"A c #FFCC15",
|
||||||
|
"B c #FFCD15",
|
||||||
|
"C c #FFCF16",
|
||||||
|
"D c #FFD017",
|
||||||
|
"E c #FFD117",
|
||||||
|
"F c #FFD218",
|
||||||
|
"G c #FFD319",
|
||||||
|
"H c #FFD419",
|
||||||
|
"I c #FFD51A",
|
||||||
|
"J c #FFD61B",
|
||||||
|
"K c #FFD71B",
|
||||||
|
"L c #FFD81C",
|
||||||
|
"M c #FFD91C",
|
||||||
|
"N c #FFDA1D",
|
||||||
|
"O c #FFDB1E",
|
||||||
|
"P c #FFDC1E",
|
||||||
|
"Q c #FFDD1F",
|
||||||
|
"R c #FFDE20",
|
||||||
|
"S c #FFDF20",
|
||||||
|
"T c #FFE021",
|
||||||
|
"U c #FFE222",
|
||||||
|
"V c #FFE322",
|
||||||
|
"W c #FFE423",
|
||||||
|
"X c #FFE524",
|
||||||
|
"Y c #FFE624",
|
||||||
|
"Z c #FFE725",
|
||||||
|
"` c #FFE826",
|
||||||
|
" . c #FFE926",
|
||||||
|
".. c #FFEA26",
|
||||||
|
"+. c #FFEB27",
|
||||||
|
"@. c #FFEC28",
|
||||||
|
"#. c #FFED28",
|
||||||
|
"$. c #FFEE29",
|
||||||
|
"%. c #FFEF2A",
|
||||||
|
"&. c #FFF02A",
|
||||||
|
"*. c #FFF12B",
|
||||||
|
"=. c #FFF22C",
|
||||||
|
"-. c #FFF32D",
|
||||||
|
";. c #FFF42D",
|
||||||
|
">. c #FDF42C",
|
||||||
|
",. c #FBF42C",
|
||||||
|
"'. c #FAF42C",
|
||||||
|
"). c #F8F42B",
|
||||||
|
"!. c #F6F42B",
|
||||||
|
"~. c #F4F42B",
|
||||||
|
"{. c #F3F42A",
|
||||||
|
"]. c #F1F42A",
|
||||||
|
"^. c #F0F429",
|
||||||
|
"/. c #EEF429",
|
||||||
|
"(. c #ECF429",
|
||||||
|
"_. c #EAF528",
|
||||||
|
":. c #E9F528",
|
||||||
|
"<. c #E7F528",
|
||||||
|
"[. c #E5F527",
|
||||||
|
"}. c #E3F527",
|
||||||
|
"|. c #E2F526",
|
||||||
|
"1. c #E0F526",
|
||||||
|
"2. c #DFF526",
|
||||||
|
"3. c #DDF525",
|
||||||
|
"4. c #DBF525",
|
||||||
|
"5. c #D9F525",
|
||||||
|
"6. c #D8F524",
|
||||||
|
"7. c #D6F624",
|
||||||
|
"8. c #D5F624",
|
||||||
|
"9. c #D3F624",
|
||||||
|
"0. c #D1F623",
|
||||||
|
"a. c #CFF623",
|
||||||
|
"b. c #CEF622",
|
||||||
|
"c. c #CCF622",
|
||||||
|
"d. c #CBF622",
|
||||||
|
"e. c #C9F621",
|
||||||
|
"f. c #C7F621",
|
||||||
|
"g. c #C5F621",
|
||||||
|
"h. c #C4F720",
|
||||||
|
"i. c #C2F720",
|
||||||
|
"j. c #C0F71F",
|
||||||
|
"k. c #BEF71F",
|
||||||
|
"l. c #BDF71F",
|
||||||
|
"m. c #BBF71E",
|
||||||
|
"n. c #BAF71E",
|
||||||
|
"o. c #B8F71E",
|
||||||
|
"p. c #B6F71D",
|
||||||
|
"q. c #B5F71D",
|
||||||
|
"r. c #B3F71D",
|
||||||
|
"s. c #B2F71C",
|
||||||
|
"t. c #B0F81C",
|
||||||
|
"u. c #AEF81B",
|
||||||
|
"v. c #ACF81B",
|
||||||
|
"w. c #ABF81B",
|
||||||
|
"x. c #A9F81A",
|
||||||
|
"y. c #A8F81A",
|
||||||
|
"z. c #A6F81A",
|
||||||
|
"A. c #A4F81A",
|
||||||
|
"B. c #A2F819",
|
||||||
|
"C. c #A1F819",
|
||||||
|
"D. c #9FF819",
|
||||||
|
"E. c #9EF818",
|
||||||
|
"F. c #9BF918",
|
||||||
|
"G. c #9AF917",
|
||||||
|
"H. c #98F917",
|
||||||
|
"I. c #97F917",
|
||||||
|
"J. c #95F916",
|
||||||
|
"K. c #93F916",
|
||||||
|
"L. c #91F916",
|
||||||
|
"M. c #90F915",
|
||||||
|
"N. c #8EF915",
|
||||||
|
"O. c #8DF914",
|
||||||
|
"P. c #8BF914",
|
||||||
|
"Q. c #89FA14",
|
||||||
|
"R. c #87FA13",
|
||||||
|
"S. c #86FA13",
|
||||||
|
"T. c #84FA13",
|
||||||
|
"U. c #83FA12",
|
||||||
|
"V. c #81FA12",
|
||||||
|
"W. c #7FFA12",
|
||||||
|
"X. c #7DFA12",
|
||||||
|
"Y. c #7CFA11",
|
||||||
|
"Z. c #7AFA11",
|
||||||
|
"`. c #78FA10",
|
||||||
|
" + c #76FA10",
|
||||||
|
".+ c #75FB10",
|
||||||
|
"++ c #73FB0F",
|
||||||
|
"@+ c #72FB0F",
|
||||||
|
"#+ c #70FB0F",
|
||||||
|
"$+ c #6EFB0E",
|
||||||
|
"%+ c #6DFB0E",
|
||||||
|
"&+ c #6BFB0E",
|
||||||
|
"*+ c #6AFB0D",
|
||||||
|
"=+ c #68FB0D",
|
||||||
|
"-+ c #66FB0C",
|
||||||
|
";+ c #64FB0C",
|
||||||
|
">+ c #63FB0C",
|
||||||
|
",+ c #61FC0B",
|
||||||
|
"'+ c #60FC0B",
|
||||||
|
")+ c #5EFC0B",
|
||||||
|
"!+ c #5CFC0A",
|
||||||
|
"~+ c #5AFC0A",
|
||||||
|
"{+ c #59FC09",
|
||||||
|
"]+ c #57FC09",
|
||||||
|
"^+ c #56FC09",
|
||||||
|
"/+ c #53FC09",
|
||||||
|
"(+ c #52FC08",
|
||||||
|
"_+ c #50FC08",
|
||||||
|
":+ c #4FFD08",
|
||||||
|
"<+ c #4DFD07",
|
||||||
|
"[+ c #4BFD07",
|
||||||
|
"}+ c #49FD07",
|
||||||
|
"|+ c #48FD06",
|
||||||
|
"1+ c #46FD06",
|
||||||
|
"2+ c #45FD05",
|
||||||
|
"3+ c #43FD05",
|
||||||
|
"4+ c #41FD05",
|
||||||
|
"5+ c #3FFD04",
|
||||||
|
"6+ c #3EFD04",
|
||||||
|
"7+ c #3CFD04",
|
||||||
|
"8+ c #3BFE03",
|
||||||
|
"9+ c #39FE03",
|
||||||
|
"0+ c #37FE02",
|
||||||
|
"a+ c #35FE02",
|
||||||
|
"b+ c #34FE02",
|
||||||
|
"c+ c #32FE01",
|
||||||
|
"d+ c #30FE01",
|
||||||
|
"e+ c #2EFE01",
|
||||||
|
"f+ c #2DFE00",
|
||||||
|
"g+ c #2BFE00",
|
||||||
|
". . + + + ",
|
||||||
|
". . + + + ",
|
||||||
|
"@ @ @ @ @ ",
|
||||||
|
"# # # # # ",
|
||||||
|
"$ $ $ $ $ ",
|
||||||
|
"% % % % % ",
|
||||||
|
"& & & & & ",
|
||||||
|
"* * * * * ",
|
||||||
|
"= = = = = ",
|
||||||
|
"- - - - - ",
|
||||||
|
"; ; ; ; ; ",
|
||||||
|
"> > > > > ",
|
||||||
|
", , , , , ",
|
||||||
|
"' ' ' ' ' ",
|
||||||
|
") ) ) ) ) ",
|
||||||
|
"! ! ! ! ! ",
|
||||||
|
"~ ~ ~ ~ ~ ",
|
||||||
|
"{ { { { { ",
|
||||||
|
"] ] ] ] ] ",
|
||||||
|
"^ ^ ^ ^ ^ ",
|
||||||
|
"/ / / / / ",
|
||||||
|
"( ( ( ( ( ",
|
||||||
|
"_ _ _ _ _ ",
|
||||||
|
": : : : : ",
|
||||||
|
": : : : : ",
|
||||||
|
"< < < < < ",
|
||||||
|
"[ [ [ [ [ ",
|
||||||
|
"} } } } } ",
|
||||||
|
"} } } } } ",
|
||||||
|
"| | | | | ",
|
||||||
|
"1 1 1 1 1 ",
|
||||||
|
"2 2 2 2 2 ",
|
||||||
|
"3 3 3 3 3 ",
|
||||||
|
"4 4 4 4 4 ",
|
||||||
|
"5 5 5 5 5 ",
|
||||||
|
"6 6 6 6 6 ",
|
||||||
|
"6 6 6 6 6 ",
|
||||||
|
"7 7 7 7 7 ",
|
||||||
|
"8 8 8 8 8 ",
|
||||||
|
"9 9 9 9 9 ",
|
||||||
|
"9 9 9 9 9 ",
|
||||||
|
"0 0 0 0 0 ",
|
||||||
|
"a a a a a ",
|
||||||
|
"a a a a a ",
|
||||||
|
"b b b b b ",
|
||||||
|
"c c c c c ",
|
||||||
|
"d d d d d ",
|
||||||
|
"d d d d d ",
|
||||||
|
"e e e e e ",
|
||||||
|
"f f f f f ",
|
||||||
|
"g g g g g ",
|
||||||
|
"g g g g g ",
|
||||||
|
"h h h h h ",
|
||||||
|
"i i i i i ",
|
||||||
|
"j j j j j ",
|
||||||
|
"k k k k k ",
|
||||||
|
"l l l l l ",
|
||||||
|
"m m m m m ",
|
||||||
|
"n n n n n ",
|
||||||
|
"n n n n n ",
|
||||||
|
"o o o o o ",
|
||||||
|
"p p p p p ",
|
||||||
|
"q q q q q ",
|
||||||
|
"q q q q q ",
|
||||||
|
"r r r r r ",
|
||||||
|
"s s s s s ",
|
||||||
|
"t t t t t ",
|
||||||
|
"u u u u u ",
|
||||||
|
"v v v v v ",
|
||||||
|
"w w w w w ",
|
||||||
|
"x x x x x ",
|
||||||
|
"x x x x x ",
|
||||||
|
"y y y y y ",
|
||||||
|
"z z z z z ",
|
||||||
|
"A A A A A ",
|
||||||
|
"A A A A A ",
|
||||||
|
"B B B B B ",
|
||||||
|
"C C C C C ",
|
||||||
|
"D D D D D ",
|
||||||
|
"D D D D D ",
|
||||||
|
"E E E E E ",
|
||||||
|
"F F F F F ",
|
||||||
|
"G G G G G ",
|
||||||
|
"G G G G G ",
|
||||||
|
"H H H H H ",
|
||||||
|
"I I I I I ",
|
||||||
|
"I I I I I ",
|
||||||
|
"J J J J J ",
|
||||||
|
"K K K K K ",
|
||||||
|
"L L L L L ",
|
||||||
|
"M M M M M ",
|
||||||
|
"N N N N N ",
|
||||||
|
"O O O O O ",
|
||||||
|
"P P P P P ",
|
||||||
|
"P P P P P ",
|
||||||
|
"Q Q Q Q Q ",
|
||||||
|
"R R R R R ",
|
||||||
|
"S S S S S ",
|
||||||
|
"S S S S S ",
|
||||||
|
"T T T T T ",
|
||||||
|
"U U U U U ",
|
||||||
|
"V V V V V ",
|
||||||
|
"V V V V V ",
|
||||||
|
"W W W W W ",
|
||||||
|
"X X X X X ",
|
||||||
|
"Y Y Y Y Y ",
|
||||||
|
"Y Y Y Y Y ",
|
||||||
|
"Z Z Z Z Z ",
|
||||||
|
"` ` ` ` ` ",
|
||||||
|
" . . . . .",
|
||||||
|
"..........",
|
||||||
|
"+.+.+.+.+.",
|
||||||
|
"@.@.@.@.@.",
|
||||||
|
"#.#.#.#.#.",
|
||||||
|
"#.#.#.#.#.",
|
||||||
|
"$.$.$.$.$.",
|
||||||
|
"%.%.%.%.%.",
|
||||||
|
"&.&.&.&.&.",
|
||||||
|
"&.&.&.&.&.",
|
||||||
|
"*.*.*.*.*.",
|
||||||
|
"=.=.=.=.=.",
|
||||||
|
"-.-.-.-.-.",
|
||||||
|
";.;.;.;.;.",
|
||||||
|
";.;.;.;.;.",
|
||||||
|
">.>.>.>.>.",
|
||||||
|
",.,.,.,.,.",
|
||||||
|
"'.'.'.'.'.",
|
||||||
|
").).).).).",
|
||||||
|
"!.!.!.!.!.",
|
||||||
|
"~.~.~.~.~.",
|
||||||
|
"{.{.{.{.{.",
|
||||||
|
"].].].].].",
|
||||||
|
"^.^.^.^.^.",
|
||||||
|
"/././././.",
|
||||||
|
"(.(.(.(.(.",
|
||||||
|
"_._._._._.",
|
||||||
|
":.:.:.:.:.",
|
||||||
|
"<.<.<.<.<.",
|
||||||
|
"[.[.[.[.[.",
|
||||||
|
"}.}.}.}.}.",
|
||||||
|
"|.|.|.|.|.",
|
||||||
|
"1.1.1.1.1.",
|
||||||
|
"2.2.2.2.2.",
|
||||||
|
"3.3.3.3.3.",
|
||||||
|
"4.4.4.4.4.",
|
||||||
|
"5.5.5.5.5.",
|
||||||
|
"6.6.6.6.6.",
|
||||||
|
"7.7.7.7.7.",
|
||||||
|
"8.8.8.8.8.",
|
||||||
|
"9.9.9.9.9.",
|
||||||
|
"0.0.0.0.0.",
|
||||||
|
"a.a.a.a.a.",
|
||||||
|
"b.b.b.b.b.",
|
||||||
|
"c.c.c.c.c.",
|
||||||
|
"d.d.d.d.d.",
|
||||||
|
"e.e.e.e.e.",
|
||||||
|
"f.f.f.f.f.",
|
||||||
|
"g.g.g.g.g.",
|
||||||
|
"h.h.h.h.h.",
|
||||||
|
"i.i.i.i.i.",
|
||||||
|
"j.j.j.j.j.",
|
||||||
|
"k.k.k.k.k.",
|
||||||
|
"l.l.l.l.l.",
|
||||||
|
"m.m.m.m.m.",
|
||||||
|
"n.n.n.n.n.",
|
||||||
|
"o.o.o.o.o.",
|
||||||
|
"p.p.p.p.p.",
|
||||||
|
"q.q.q.q.q.",
|
||||||
|
"r.r.r.r.r.",
|
||||||
|
"s.s.s.s.s.",
|
||||||
|
"t.t.t.t.t.",
|
||||||
|
"u.u.u.u.u.",
|
||||||
|
"v.v.v.v.v.",
|
||||||
|
"w.w.w.w.w.",
|
||||||
|
"x.x.x.x.x.",
|
||||||
|
"y.y.y.y.y.",
|
||||||
|
"z.z.z.z.z.",
|
||||||
|
"A.A.A.A.A.",
|
||||||
|
"B.B.B.B.B.",
|
||||||
|
"C.C.C.C.C.",
|
||||||
|
"D.D.D.D.D.",
|
||||||
|
"E.E.E.E.E.",
|
||||||
|
"F.F.F.F.F.",
|
||||||
|
"G.G.G.G.G.",
|
||||||
|
"H.H.H.H.H.",
|
||||||
|
"I.I.I.I.I.",
|
||||||
|
"J.J.J.J.J.",
|
||||||
|
"K.K.K.K.K.",
|
||||||
|
"L.L.L.L.L.",
|
||||||
|
"M.M.M.M.M.",
|
||||||
|
"N.N.N.N.N.",
|
||||||
|
"O.O.O.O.O.",
|
||||||
|
"P.P.P.P.P.",
|
||||||
|
"Q.Q.Q.Q.Q.",
|
||||||
|
"R.R.R.R.R.",
|
||||||
|
"S.S.S.S.S.",
|
||||||
|
"T.T.T.T.T.",
|
||||||
|
"U.U.U.U.U.",
|
||||||
|
"V.V.V.V.V.",
|
||||||
|
"W.W.W.W.W.",
|
||||||
|
"X.X.X.X.X.",
|
||||||
|
"Y.Y.Y.Y.Y.",
|
||||||
|
"Z.Z.Z.Z.Z.",
|
||||||
|
"`.`.`.`.`.",
|
||||||
|
" + + + + +",
|
||||||
|
".+.+.+.+.+",
|
||||||
|
"++++++++++",
|
||||||
|
"@+@+@+@+@+",
|
||||||
|
"#+#+#+#+#+",
|
||||||
|
"$+$+$+$+$+",
|
||||||
|
"%+%+%+%+%+",
|
||||||
|
"&+&+&+&+&+",
|
||||||
|
"*+*+*+*+*+",
|
||||||
|
"=+=+=+=+=+",
|
||||||
|
"-+-+-+-+-+",
|
||||||
|
";+;+;+;+;+",
|
||||||
|
">+>+>+>+>+",
|
||||||
|
",+,+,+,+,+",
|
||||||
|
"'+'+'+'+'+",
|
||||||
|
")+)+)+)+)+",
|
||||||
|
"!+!+!+!+!+",
|
||||||
|
"~+~+~+~+~+",
|
||||||
|
"{+{+{+{+{+",
|
||||||
|
"]+]+]+]+]+",
|
||||||
|
"^+^+^+^+^+",
|
||||||
|
"/+/+/+/+/+",
|
||||||
|
"(+(+(+(+(+",
|
||||||
|
"_+_+_+_+_+",
|
||||||
|
":+:+:+:+:+",
|
||||||
|
"<+<+<+<+<+",
|
||||||
|
"[+[+[+[+[+",
|
||||||
|
"}+}+}+}+}+",
|
||||||
|
"|+|+|+|+|+",
|
||||||
|
"1+1+1+1+1+",
|
||||||
|
"2+2+2+2+2+",
|
||||||
|
"3+3+3+3+3+",
|
||||||
|
"4+4+4+4+4+",
|
||||||
|
"5+5+5+5+5+",
|
||||||
|
"6+6+6+6+6+",
|
||||||
|
"7+7+7+7+7+",
|
||||||
|
"8+8+8+8+8+",
|
||||||
|
"9+9+9+9+9+",
|
||||||
|
"0+0+0+0+0+",
|
||||||
|
"a+a+a+a+a+",
|
||||||
|
"b+b+b+b+b+",
|
||||||
|
"c+c+c+c+c+",
|
||||||
|
"d+d+d+d+d+",
|
||||||
|
"e+e+e+e+e+",
|
||||||
|
"f+f+f+f+f+",
|
||||||
|
"g+g+g+g+g+"};
|
||||||
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
#include <fstream>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include <libart_lgpl/art_misc.h>
|
#include <libart_lgpl/art_misc.h>
|
||||||
#include <gtkmm/window.h>
|
#include <gtkmm/window.h>
|
||||||
#include <gtkmm/combo.h>
|
#include <gtkmm/combo.h>
|
||||||
|
|
@ -589,3 +591,4 @@ get_xpm (std::string name)
|
||||||
|
|
||||||
return (xpm_map[name]);
|
return (xpm_map[name]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,5 +79,6 @@ bool key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev);
|
||||||
|
|
||||||
Glib::RefPtr<Gdk::Pixbuf> get_xpm(std::string);
|
Glib::RefPtr<Gdk::Pixbuf> get_xpm(std::string);
|
||||||
static std::map<std::string, Glib::RefPtr<Gdk::Pixbuf> > xpm_map;
|
static std::map<std::string, Glib::RefPtr<Gdk::Pixbuf> > xpm_map;
|
||||||
|
const char* const *get_xpm_data (std::string path);
|
||||||
|
|
||||||
#endif /* __ardour_gtk_utils_h__ */
|
#endif /* __ardour_gtk_utils_h__ */
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,8 @@ using namespace Glib;
|
||||||
using namespace Gtkmm2ext;
|
using namespace Gtkmm2ext;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
string FastMeter::v_image_path;
|
||||||
|
string FastMeter::h_image_path;
|
||||||
RefPtr<Pixmap> FastMeter::v_pixmap;
|
RefPtr<Pixmap> FastMeter::v_pixmap;
|
||||||
RefPtr<Bitmap> FastMeter::v_mask;
|
RefPtr<Bitmap> FastMeter::v_mask;
|
||||||
gint FastMeter::v_pixheight = 0;
|
gint FastMeter::v_pixheight = 0;
|
||||||
|
|
@ -56,16 +58,8 @@ FastMeter::FastMeter (long hold, unsigned long dimen, Orientation o)
|
||||||
pixrect.x = 0;
|
pixrect.x = 0;
|
||||||
pixrect.y = 0;
|
pixrect.y = 0;
|
||||||
|
|
||||||
if (orientation == Vertical) {
|
request_width = dimen;
|
||||||
pixrect.width = min (v_pixwidth, (gint) dimen);
|
request_height = dimen;
|
||||||
pixrect.height = v_pixheight;
|
|
||||||
} else {
|
|
||||||
pixrect.width = h_pixwidth;
|
|
||||||
pixrect.height = min (h_pixheight, (gint) dimen);
|
|
||||||
}
|
|
||||||
|
|
||||||
request_width = pixrect.width;
|
|
||||||
request_height= pixrect.height;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FastMeter::~FastMeter ()
|
FastMeter::~FastMeter ()
|
||||||
|
|
@ -73,31 +67,57 @@ FastMeter::~FastMeter ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FastMeter::set_vertical_xpm (const std::string& xpm_file)
|
FastMeter::on_realize ()
|
||||||
{
|
{
|
||||||
if (v_pixmap == 0) {
|
DrawingArea::on_realize ();
|
||||||
|
|
||||||
|
Glib::RefPtr<Gdk::Drawable> drawable = Glib::RefPtr<Gdk::Window>::cast_dynamic (get_window());
|
||||||
|
Gdk::Color transparent;
|
||||||
|
|
||||||
|
if (!v_image_path.empty() && v_pixmap == 0) {
|
||||||
gint w, h;
|
gint w, h;
|
||||||
|
|
||||||
v_pixmap = Pixmap::create_from_xpm(get_bogus_drawable(), Colormap::get_system(), v_mask, Gdk::Color(), xpm_file);
|
v_pixmap = Pixmap::create_from_xpm (drawable, Colormap::get_system(), v_mask, transparent, v_image_path);
|
||||||
v_pixmap->get_size(w, h);
|
v_pixmap->get_size(w, h);
|
||||||
|
|
||||||
v_pixheight = h;
|
v_pixheight = h;
|
||||||
v_pixwidth = w;
|
v_pixwidth = w;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void
|
if (!h_image_path.empty() && h_pixmap == 0) {
|
||||||
FastMeter::set_horizontal_xpm (const std::string& xpm_file)
|
|
||||||
{
|
|
||||||
if (h_pixmap == 0) {
|
|
||||||
gint w, h;
|
gint w, h;
|
||||||
|
|
||||||
h_pixmap = Pixmap::create_from_xpm(get_bogus_drawable(), Colormap::get_system(), h_mask, Gdk::Color(), xpm_file);
|
h_pixmap = Pixmap::create_from_xpm (drawable, Colormap::get_system(), h_mask, transparent, h_image_path);
|
||||||
h_pixmap->get_size(w, h);
|
h_pixmap->get_size(w, h);
|
||||||
|
|
||||||
h_pixheight = h;
|
h_pixheight = h;
|
||||||
h_pixwidth = w;
|
h_pixwidth = w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (orientation == Vertical) {
|
||||||
|
pixrect.width = min (v_pixwidth, request_width);
|
||||||
|
pixrect.height = v_pixheight;
|
||||||
|
} else {
|
||||||
|
pixrect.width = h_pixwidth;
|
||||||
|
pixrect.height = min (h_pixheight, request_height);
|
||||||
|
}
|
||||||
|
|
||||||
|
request_width = pixrect.width;
|
||||||
|
request_height= pixrect.height;
|
||||||
|
|
||||||
|
set_size_request (request_width, request_height);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
FastMeter::set_vertical_xpm (std::string path)
|
||||||
|
{
|
||||||
|
v_image_path = path;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
FastMeter::set_horizontal_xpm (std::string path)
|
||||||
|
{
|
||||||
|
h_image_path = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -46,14 +46,17 @@ class FastMeter : public Gtk::DrawingArea {
|
||||||
long hold_count() { return hold_cnt; }
|
long hold_count() { return hold_cnt; }
|
||||||
void set_hold_count (long);
|
void set_hold_count (long);
|
||||||
|
|
||||||
static void set_horizontal_xpm (const std::string&);
|
static void set_horizontal_xpm (std::string);
|
||||||
static void set_vertical_xpm (const std::string&);
|
static void set_vertical_xpm (std::string);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool on_expose_event (GdkEventExpose*);
|
bool on_expose_event (GdkEventExpose*);
|
||||||
void on_size_request (GtkRequisition*);
|
void on_size_request (GtkRequisition*);
|
||||||
|
void on_realize ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
static std::string h_image_path;
|
||||||
|
static std::string v_image_path;
|
||||||
static Glib::RefPtr<Gdk::Pixmap> h_pixmap;
|
static Glib::RefPtr<Gdk::Pixmap> h_pixmap;
|
||||||
static Glib::RefPtr<Gdk::Bitmap> h_mask;
|
static Glib::RefPtr<Gdk::Bitmap> h_mask;
|
||||||
static gint h_pixheight;
|
static gint h_pixheight;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ class Pix
|
||||||
int refcnt;
|
int refcnt;
|
||||||
bool generated;
|
bool generated;
|
||||||
std::vector<std::string *> *files;
|
std::vector<std::string *> *files;
|
||||||
std::vector<const char **> data;
|
std::vector<const char* const*> data;
|
||||||
bool from_files;
|
bool from_files;
|
||||||
int pixmap_count;
|
int pixmap_count;
|
||||||
int last_pixmap;
|
int last_pixmap;
|
||||||
|
|
@ -29,21 +29,21 @@ class Pix
|
||||||
|
|
||||||
Pix (const std::string &dirpath, const std::string ®exp,
|
Pix (const std::string &dirpath, const std::string ®exp,
|
||||||
bool homogenous = true);
|
bool homogenous = true);
|
||||||
Pix (std::vector<const char **> xpm_data, bool homogenous = true);
|
Pix (std::vector<const char* const*> xpm_data, bool homogenous = true);
|
||||||
virtual ~Pix();
|
virtual ~Pix();
|
||||||
|
|
||||||
friend Pix *get_pix (const std::string &dirpath,
|
friend Pix *get_pix (const std::string &dirpath,
|
||||||
const std::string ®exp,
|
const std::string ®exp,
|
||||||
bool homogenous);
|
bool homogenous);
|
||||||
friend Pix *get_pix (std::string name,
|
friend Pix *get_pix (std::string name,
|
||||||
std::vector<const char **> xpm_data,
|
std::vector<const char* const*> xpm_data,
|
||||||
bool homogenous);
|
bool homogenous);
|
||||||
friend void finish_pix (Pix *);
|
friend void finish_pix (Pix *);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Pix (bool homogenous = true);
|
Pix (bool homogenous = true);
|
||||||
|
|
||||||
void generate ();
|
void generate (Glib::RefPtr<Gdk::Drawable>&);
|
||||||
int n_pixmaps() { return pixmap_count; }
|
int n_pixmaps() { return pixmap_count; }
|
||||||
int max_pixmap() { return last_pixmap; }
|
int max_pixmap() { return last_pixmap; }
|
||||||
bool homogenous () { return _homegenous; }
|
bool homogenous () { return _homegenous; }
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,14 @@ class PixScroller : public Gtk::DrawingArea
|
||||||
bool on_button_press_event (GdkEventButton*);
|
bool on_button_press_event (GdkEventButton*);
|
||||||
bool on_button_release_event (GdkEventButton*);
|
bool on_button_release_event (GdkEventButton*);
|
||||||
void on_size_request (GtkRequisition*);
|
void on_size_request (GtkRequisition*);
|
||||||
|
void on_realize ();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Gtk::Adjustment& adj;
|
Gtk::Adjustment& adj;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Pix& pix;
|
||||||
|
|
||||||
Glib::RefPtr<Gdk::Pixmap> rail;
|
Glib::RefPtr<Gdk::Pixmap> rail;
|
||||||
Glib::RefPtr<Gdk::Pixmap> slider;
|
Glib::RefPtr<Gdk::Pixmap> slider;
|
||||||
Glib::RefPtr<Gdk::Bitmap> rail_mask;
|
Glib::RefPtr<Gdk::Bitmap> rail_mask;
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ Pix::Pix (bool homog)
|
||||||
_homegenous = homog;
|
_homegenous = homog;
|
||||||
}
|
}
|
||||||
|
|
||||||
Pix::Pix (vector<const char **> xpm_data, bool homog)
|
Pix::Pix (vector<const char* const*> xpm_data, bool homog)
|
||||||
{
|
{
|
||||||
if (xpm_data.size() == 0) {
|
if (xpm_data.size() == 0) {
|
||||||
throw failed_constructor();
|
throw failed_constructor();
|
||||||
|
|
@ -132,25 +132,23 @@ Pix::~Pix ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Pix::generate ()
|
Pix::generate (Glib::RefPtr<Gdk::Drawable>& drawable)
|
||||||
|
|
||||||
{
|
{
|
||||||
if (generated) {
|
if (generated) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < pixmap_count; i++) {
|
for (int i = 0; i < pixmap_count; i++) {
|
||||||
if (from_files) {
|
|
||||||
pixmaps[i] = Gdk::Pixmap::create_from_xpm (get_bogus_drawable(), Gdk::Colormap::get_system(),
|
|
||||||
bitmaps[i], Gdk::Color(), *(*files)[i]);
|
|
||||||
} else {
|
|
||||||
gchar **xpm;
|
|
||||||
xpm = const_cast<gchar **> (data[i]);
|
|
||||||
|
|
||||||
pixmaps[i] = Gdk::Pixmap::create_from_xpm(Gdk::Colormap::get_system(),
|
Gdk::Color transparent;
|
||||||
bitmaps[i], Gdk::Color(), xpm);
|
|
||||||
|
if (from_files) {
|
||||||
|
pixmaps[i] = Gdk::Pixmap::create_from_xpm(drawable, bitmaps[i], transparent, *(*files)[i]);
|
||||||
|
} else {
|
||||||
|
pixmaps[i] = Gdk::Pixmap::create_from_xpm(drawable, Gdk::Colormap::get_system(), bitmaps[i], Gdk::Color(), data[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int w, h;
|
int w, h;
|
||||||
pixmaps[i]->get_size(w, h);
|
pixmaps[i]->get_size(w, h);
|
||||||
if (w > max_pixwidth) max_pixwidth = w;
|
if (w > max_pixwidth) max_pixwidth = w;
|
||||||
|
|
@ -161,7 +159,7 @@ Pix::generate ()
|
||||||
}
|
}
|
||||||
|
|
||||||
Pix *
|
Pix *
|
||||||
Gtkmm2ext::get_pix (string name, vector<const char **> xpm_data, bool homog)
|
Gtkmm2ext::get_pix (string name, vector<const char* const*> xpm_data, bool homog)
|
||||||
{
|
{
|
||||||
Pix *ret = 0;
|
Pix *ret = 0;
|
||||||
Pix::PixCache::iterator iter;
|
Pix::PixCache::iterator iter;
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,9 @@ using namespace std;
|
||||||
using namespace Gtk;
|
using namespace Gtk;
|
||||||
using namespace Gtkmm2ext;
|
using namespace Gtkmm2ext;
|
||||||
|
|
||||||
PixScroller::PixScroller (Adjustment& a, Pix& pix)
|
PixScroller::PixScroller (Adjustment& a, Pix& p)
|
||||||
: adj (a)
|
: adj (a),
|
||||||
|
pix (p)
|
||||||
{
|
{
|
||||||
dragging = false;
|
dragging = false;
|
||||||
add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::POINTER_MOTION_MASK|Gdk::SCROLL_MASK);
|
add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::POINTER_MOTION_MASK|Gdk::SCROLL_MASK);
|
||||||
|
|
@ -38,7 +39,16 @@ PixScroller::PixScroller (Adjustment& a, Pix& pix)
|
||||||
adj.signal_value_changed().connect (mem_fun (*this, &PixScroller::adjustment_changed));
|
adj.signal_value_changed().connect (mem_fun (*this, &PixScroller::adjustment_changed));
|
||||||
default_value = adj.get_value();
|
default_value = adj.get_value();
|
||||||
|
|
||||||
pix.generate ();
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PixScroller::on_realize ()
|
||||||
|
{
|
||||||
|
DrawingArea::on_realize ();
|
||||||
|
|
||||||
|
Glib::RefPtr<Gdk::Drawable> drawable = Glib::RefPtr<Gdk::Window>::cast_dynamic (get_window());
|
||||||
|
|
||||||
|
pix.generate (drawable);
|
||||||
|
|
||||||
rail = *(pix.pixmap (0));
|
rail = *(pix.pixmap (0));
|
||||||
rail_mask = *(pix.shape_mask (0));
|
rail_mask = *(pix.shape_mask (0));
|
||||||
|
|
@ -61,6 +71,8 @@ PixScroller::PixScroller (Adjustment& a, Pix& pix)
|
||||||
|
|
||||||
sliderrect.set_y((int) rint ((overall_height - sliderrect.get_height()) * (adj.get_upper() - adj.get_value())));
|
sliderrect.set_y((int) rint ((overall_height - sliderrect.get_height()) * (adj.get_upper() - adj.get_value())));
|
||||||
railrect.set_x((sliderrect.get_width() / 2) - 2);
|
railrect.set_x((sliderrect.get_width() / 2) - 2);
|
||||||
|
|
||||||
|
set_size_request (sliderrect.get_width(), overall_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,6 @@ SliderController::SliderController (Pix *pixset,
|
||||||
bind_statemask (Gdk::CONTROL_MASK)
|
bind_statemask (Gdk::CONTROL_MASK)
|
||||||
|
|
||||||
{
|
{
|
||||||
pixset->generate ();
|
|
||||||
|
|
||||||
signal_button_press_event().connect (mem_fun (this, &SliderController::button_press));
|
signal_button_press_event().connect (mem_fun (this, &SliderController::button_press));
|
||||||
spin.set_name ("SliderControllerValue");
|
spin.set_name ("SliderControllerValue");
|
||||||
spin.set_size_request (70,-1); // should be based on font size somehow
|
spin.set_size_request (70,-1); // should be based on font size somehow
|
||||||
|
|
|
||||||
|
|
@ -83,15 +83,3 @@ void Gtkmm2ext::set_treeview_header_as_default_label(Gtk::TreeViewColumn* c)
|
||||||
gtk_tree_view_column_set_widget( c->gobj(), GTK_WIDGET(0) );
|
gtk_tree_view_column_set_widget( c->gobj(), GTK_WIDGET(0) );
|
||||||
}
|
}
|
||||||
|
|
||||||
Glib::RefPtr<Gdk::Drawable>
|
|
||||||
Gtkmm2ext::get_bogus_drawable()
|
|
||||||
{
|
|
||||||
static Gtk::Button* button = 0;
|
|
||||||
|
|
||||||
if (button == 0) {
|
|
||||||
button = new Gtk::Button ("blah"); //bogus button to extract a Gdk::Drawable from
|
|
||||||
}
|
|
||||||
static Glib::RefPtr<Gdk::Drawable> drawable = button->get_window();
|
|
||||||
return drawable;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue