Merge commit 'LUMIERA/master' into backend

* commit 'LUMIERA/master':
  Corrected some tabs, missing dependancies in src/gui/Makefile.am
  Initial implementation of I-Beam tool. Needs more work
  Reinstated a small efficiency
  Tidied and simplified video display widget, and added cursor support to
  Added a separator between tool groups
  Temporarily bodged the icon source directory
  Added code to render icons as part of the build process
  Added basic support for multiple tools in the timeline view
  Implemented new icon workflow
  Fixed scroll layout loop bug.
  Set the page size of the horizontal timeline scroll bar
  Retired VideoTrack - all tracks are the same
This commit is contained in:
Christian Thaeter 2008-08-10 14:17:04 +02:00
commit 746c03fb04
31 changed files with 2698 additions and 431 deletions

View file

@ -1,5 +1,6 @@
# Copyright (C) Lumiera.org
# 2007, Christian Thaeter <ct@pipapo.org>
# 2008, Joel Holdsworth <joel@airwebreathe.org.uk>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@ -47,6 +48,9 @@ include $(top_srcdir)/src/gui/Makefile.am
# plugins
#include $(top_srcdir)/src...
# resources
include $(top_srcdir)/icons/Makefile.am
# tests
include $(top_srcdir)/tests/common/Makefile.am
include $(top_srcdir)/tests/components/Makefile.am

175
admin/render-icon.py Executable file
View file

@ -0,0 +1,175 @@
#!/usr/bin/python
# render-icons.py - Icon rendering utility script
#
# Copyright (C) Lumiera.org
# 2008, Joel Holdsworth <joel@airwebreathe.org.uk>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
import sys
import getopt
from xml.dom import minidom
import os
import shutil
import cairo
import rsvg
#svgDir = "svg"
#prerenderedDir = "prerendered"
inkscapePath = "/usr/bin/inkscape"
artworkLayerPrefix = "artwork:"
def createDirectory( name ):
if os.path.exists(name) == False:
os.mkdir(name)
def copyMergeDirectory( src, dst ):
listing = os.listdir(src)
for file_name in listing:
src_file_path = os.path.join(src, file_name)
dst_file_path = os.path.join(dst, file_name)
shutil.copyfile(src_file_path, dst_file_path)
def getDocumentSize( svg_element ):
width = float(svg_element.getAttribute("width"))
height = float(svg_element.getAttribute("height"))
return [width, height]
def findChildLayerElement( parent_element ):
for node in parent_element.childNodes:
if node.nodeType == minidom.Node.ELEMENT_NODE:
if node.tagName == "g":
if node.getAttribute("inkscape:groupmode") == "layer":
return node
return None
def parsePlateLayer( layer ):
rectangles = []
for node in layer.childNodes:
if node.nodeType == minidom.Node.ELEMENT_NODE:
if node.tagName == "rect":
x = float(node.getAttribute("x"))
y = float(node.getAttribute("y"))
width = float(node.getAttribute("width"))
height = float(node.getAttribute("height"))
rectangles.append([x, y, width, height])
return rectangles
def parseSVG( file_path ):
print "Rendering " + file_path
svgdoc = minidom.parse(file_path)
for root_node in svgdoc.childNodes:
if root_node.nodeType == minidom.Node.ELEMENT_NODE:
if root_node.tagName == "svg":
size = getDocumentSize( root_node )
layer = findChildLayerElement( root_node )
if layer != None:
layer_name = layer.getAttribute("inkscape:label")
if layer_name[:len(artworkLayerPrefix)] == artworkLayerPrefix:
artwork_name = layer_name[len(artworkLayerPrefix):]
plate = findChildLayerElement( layer )
if plate != None:
return artwork_name, size, parsePlateLayer( plate )
return None
def renderSvgInkscape(file_path, out_dir, artwork_name, rectangle, doc_size):
# Calculate the rendering rectangle
x1 = rectangle[0]
y1 = doc_size[1] - rectangle[1] - rectangle[3]
x2 = x1 + rectangle[2]
y2 = y1 + rectangle[3]
# Call Inkscape to do the render
os.spawnlp(os.P_WAIT, inkscapePath, inkscapePath,
file_path,
"-z",
"-a %g:%g:%g:%g" % (x1, y1, x2, y2),
"-w %g" % (rectangle[2]), "-h %g" % (rectangle[3]),
"--export-png=" + os.path.join(out_dir, "%gx%g/%s.png" % (rectangle[2], rectangle[3], artwork_name)))
def renderSvgRsvg(file_path, out_dir, artwork_name, rectangle, doc_size):
# Prepare a Cairo context
width = int(rectangle[2])
height = int(rectangle[3])
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
context = cairo.Context(surface)
context.translate(-rectangle[0], -rectangle[1])
# Load an render the SVG
svg = rsvg.Handle(file=file_path)
svg.render_cairo(context)
# Output a PNG file
surface.write_to_png(os.path.join(out_dir,
"%ix%i/%s.png" % (width, height, artwork_name)))
def renderSvgIcon(file_path, out_dir):
artwork_name, doc_size, rectangles = parseSVG(file_path)
for rectangle in rectangles:
renderSvgRsvg(file_path, out_dir, artwork_name, rectangle, doc_size)
#def renderSvgIcons():
# listing = os.listdir(svgDir)
# for file_path in listing:
# [root, extension] = os.path.splitext(file_path)
# if extension.lower() == ".svg":
# renderSvgIcon(os.path.join(svgDir, file_path))
#def copyPrerenderedIcons():
# listing = os.listdir(prerenderedDir)
# for list_item in listing:
# src_dir = os.path.join(prerenderedDir, list_item)
# copyMergeDirectory(src_dir, list_item)
def printHelp():
print "render-icon.py - An icon rendering utility script for lumiera"
def parseArguments(argv):
optlist, args = getopt.getopt(argv, "")
if len(args) == 2:
return args[0], args[1]
printHelp()
return None, None
def main(argv):
in_path, out_dir = parseArguments(argv)
if in_path == None or out_dir == None:
return
if os.path.exists(out_dir) == False:
print "Directory not found: " + out_dir
return
# Create the icons folders
createDirectory(os.path.join(out_dir, "48x48"))
createDirectory(os.path.join(out_dir, "32x32"))
createDirectory(os.path.join(out_dir, "24x24"))
createDirectory(os.path.join(out_dir, "22x22"))
createDirectory(os.path.join(out_dir, "16x16"))
renderSvgIcon(in_path, out_dir)
# Copy in prerendered icons
#copyPrerenderedIcons()
if __name__=="__main__":
main(sys.argv[1:])

53
icons/Makefile.am Normal file
View file

@ -0,0 +1,53 @@
# Copyright (C) Lumiera.org
# 2008, Joel Holdsworth <joel@airwebreathe.org.uk>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
svgdir = $(top_srcdir)/icons/svg
prerendereddir = $(top_srcdir)/icons/prerendered
icondir = $(top_builddir)
iconcommand = python $(top_srcdir)/admin/render-icon.py
16x16 = $(icondir)/16x16
22x22 = $(icondir)/22x22
24x24 = $(icondir)/24x24
32x32 = $(icondir)/32x32
48x48 = $(icondir)/48x48
16x16pre = $(prerendereddir)/16x16
22x22pre = $(prerendereddir)/22x22
24x24pre = $(prerendereddir)/24x24
32x32pre = $(prerendereddir)/32x32
48x48pre = $(prerendereddir)/48x48
lumigui_DEPENDENCIES += \
$(16x16)/arrow.png $(22x22)/arrow.png $(24x24)/arrow.png $(32x32)/arrow.png $(48x48)/arrow.png \
$(16x16)/i-beam.png $(22x22)/i-beam.png $(24x24)/i-beam.png $(32x32)/i-beam.png $(48x48)/i-beam.png \
$(16x16)/assets-panel.png \
$(16x16)/timeline-panel.png \
$(16x16)/viewer-panel.png
$(16x16)/arrow.png $(22x22)/arrow.png $(24x24)/arrow.png $(32x32)/arrow.png $(48x48)/arrow.png : $(svgdir)/arrow.svg
$(iconcommand) $< $(icondir)
$(16x16)/i-beam.png $(22x22)/i-beam.png $(24x24)/i-beam.png $(32x32)/i-beam.png $(48x48)/i-beam.png : $(svgdir)/i-beam.svg
$(iconcommand) $< $(icondir)
$(16x16)/assets-panel.png:
cp $(16x16pre)/assets-panel.png $(16x16)
$(16x16)/timeline-panel.png:
cp $(16x16pre)/timeline-panel.png $(16x16)
$(16x16)/viewer-panel.png:
cp $(16x16pre)/viewer-panel.png $(16x16)

View file

Before

Width:  |  Height:  |  Size: 540 B

After

Width:  |  Height:  |  Size: 540 B

View file

Before

Width:  |  Height:  |  Size: 453 B

After

Width:  |  Height:  |  Size: 453 B

View file

Before

Width:  |  Height:  |  Size: 631 B

After

Width:  |  Height:  |  Size: 631 B

732
icons/svg/arrow.svg Normal file
View file

@ -0,0 +1,732 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="150"
height="100"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.46"
version="1.0"
sodipodi:docname="arrow.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs4">
<linearGradient
inkscape:collect="always"
id="linearGradient10554">
<stop
style="stop-color:white;stop-opacity:1;"
offset="0"
id="stop10556" />
<stop
style="stop-color:white;stop-opacity:0;"
offset="1"
id="stop10558" />
</linearGradient>
<linearGradient
id="linearGradient124">
<stop
style="stop-color:#ffffff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop125" />
<stop
style="stop-color:silver;stop-opacity:1;"
offset="1"
id="stop126" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient8773">
<stop
style="stop-color:black;stop-opacity:0.3137255"
offset="0"
id="stop8775" />
<stop
style="stop-color:black;stop-opacity:0;"
offset="1"
id="stop8777" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective10" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient14467"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.559542,1.292457,-0.3231142,0.1398855,-29.871557,-250.82036)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient14469"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.5869533,0,0,0.8448423,-29.87156,-250.82036)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient14471"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.7041896,0,0,0.7041896,-18.406429,-249.43017)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient14473"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-137.34366,-352.57235)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient14475"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2,0,0,0.5,-20.55174,-11.55357)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient14477"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.833516,0,0,1.199737,2.4375,-23.45032)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient14479"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient14481"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.125001,0,0,1.125001,-202.51184,-408.14432)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient14483"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9377063,0,0,1.3497053,-220.82833,-410.36528)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient14485"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.8939146,2.0648066,-0.5162016,0.2234786,-220.82833,-410.36529)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient14487"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient14489"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-144.34366,-395.57235)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient14491"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.6670334,0,0,2.399476,-491.25039,-801.09382)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient14493"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.5891814,3.6707672,-0.9176918,0.3972953,-491.25038,-801.09383)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient14495"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient7954"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient7960"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.3333333,0,0,1.3333333,-220.12487,-531.76312)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient7963"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1113546,0,0,1.5996493,-241.83329,-534.39538)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient7966"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0594534,2.447176,-0.611794,0.2648633,-241.83329,-534.39539)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient8746"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient8748"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0594534,2.447176,-0.611794,0.2648633,-241.83329,-534.39539)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient8750"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1113546,0,0,1.5996493,-241.83329,-534.39538)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient8752"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.3333333,0,0,1.3333333,-220.12487,-531.76312)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient8755"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.3333333,0,0,1.3333333,-220.1248,-531.60971)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient8758"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1113546,0,0,1.5996493,-241.83322,-534.24197)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient8761"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0594534,2.447176,-0.611794,0.2648633,-241.83322,-534.24198)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient8771"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0594534,2.447176,-0.611794,0.2648633,-241.83322,-534.24198)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient8773"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1113546,0,0,1.5996493,-241.83322,-534.24197)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient8775"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.3333333,0,0,1.3333333,-220.1248,-531.60971)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient8778"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.3333333,0,0,1.3333333,-220.3124,-531.60971)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient8781"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1113546,0,0,1.5996493,-242.02082,-534.24197)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient8784"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0594534,2.447176,-0.611794,0.2648633,-242.02082,-534.24198)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient8830"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient8832"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.5891814,3.6707672,-0.9176918,0.3972953,-491.25038,-801.09383)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient8834"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.6670334,0,0,2.399476,-491.25039,-801.09382)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient8836"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-144.34366,-395.57235)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient8838"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient8840"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0594534,2.447176,-0.611794,0.2648633,-242.02082,-534.24198)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient8842"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1113546,0,0,1.5996493,-242.02082,-534.24197)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient8844"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.3333333,0,0,1.3333333,-220.3124,-531.60971)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient8855"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-144.34366,-395.57235)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient8858"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.6670334,0,0,2.399476,-491.25039,-801.09382)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient8861"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.5891814,3.6707672,-0.9176918,0.3972953,-491.25038,-801.09383)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
gridtolerance="10000"
guidetolerance="10"
objecttolerance="10"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.6568543"
inkscape:cx="90.247594"
inkscape:cy="46.534319"
inkscape:document-units="px"
inkscape:current-layer="layer4"
showgrid="true"
inkscape:snap-nodes="false"
inkscape:snap-bbox="true"
inkscape:snap-global="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1679"
inkscape:window-height="977"
inkscape:window-x="1281"
inkscape:window-y="48">
<inkscape:grid
type="xygrid"
id="grid13478"
visible="true"
enabled="true"
spacingx="0.5px"
spacingy="0.5px"
empspacing="2" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="artwork:arrow"
style="display:inline">
<path
transform="matrix(0.989175,0,0,1.31555,167.22388,56.536408)"
d="M -49.76264,24.296782 A 8.087534,1.9003495 0 1 1 -65.937708,24.296782 A 8.087534,1.9003495 0 1 1 -49.76264,24.296782 z"
sodipodi:ry="1.9003495"
sodipodi:rx="8.087534"
sodipodi:cy="24.296782"
sodipodi:cx="-57.850174"
id="path8771"
style="opacity:0.7;fill:url(#radialGradient14479);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
sodipodi:type="arc" />
<g
style="display:inline"
id="g79"
transform="translate(-156.06247,-331.09622)">
<path
sodipodi:nodetypes="cccccccc"
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M 258.57812,401.60617 L 258.57812,417.04968 L 263.125,414.04968 L 265.90625,420.48718 L 268.1875,419.48718 L 265.46875,413.20593 L 269.56185,412.76843 L 258.57812,401.60617 z"
id="rect16" />
<path
sodipodi:nodetypes="ccccccccc"
id="rect91"
d="M 481.01295,-78.954349 L 484.11717,-79.645589 L 484.52504,-78.954349 L 491.01295,-78.954349 L 491.01998,-77.463121 L 484.28372,-77.462474 L 483.9729,-76.666406 L 481.00254,-77.462159 L 481.01295,-78.954349 z"
style="fill:url(#linearGradient14475);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.24999988;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
transform="matrix(0.397295,0.917691,-0.917691,0.397295,0,0)" />
<path
style="fill:url(#radialGradient14477);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
d="M 268.45834,412.37995 L 264.03447,412.8429 L 259.08804,416.09773 L 259.07888,402.85299 L 268.45834,412.37995 z"
id="path15"
sodipodi:nodetypes="ccccc" />
</g>
<path
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient14473);stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
d="M 111.38437,80.978458 L 107.31977,81.366268 L 103.50867,84.146458 L 103.49998,72.973838 L 111.38437,80.978458 z"
id="path7947"
sodipodi:nodetypes="ccccc" />
<g
style="display:inline"
id="g14435"
transform="translate(-22.000014,29.000022)">
<path
sodipodi:nodetypes="cccccccc"
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M 150.5,48.5 L 150.5,59.5 L 153.5,57.5 L 155.5,61.5 L 157.5,60.5 L 155.5,56.5 L 158.5,56.5 L 150.5,48.5 z"
id="path14451" />
<path
sodipodi:nodetypes="ccccccccc"
id="path14453"
d="M 154.008,54.448252 L 155.59103,55.96514 L 155.06871,56.768088 L 156.83361,60.279957 L 155.71008,60.83563 L 154.0092,57.369925 L 153.22923,57.090442 L 153.04079,54.858996 L 154.008,54.448252 z"
style="fill:url(#linearGradient14467);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.24999988;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1" />
<path
style="fill:url(#radialGradient14469);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
d="M 157.29014,55.997498 L 154.8557,55.999843 L 151.00417,58.559717 L 151.0033,49.735141 L 157.29014,55.997498 z"
id="path14455"
sodipodi:nodetypes="ccccc" />
<path
sodipodi:nodetypes="ccccc"
id="path14457"
d="M 156.09792,55.503506 L 154.63636,55.542223 L 151.51178,57.639513 L 151.50565,50.893522 L 156.09792,55.503506 z"
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient14471);stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline" />
</g>
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="plate#1"
style="display:none">
<rect
y="69"
x="97"
height="22"
width="22"
id="rect14465"
style="fill:#000000;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:3.7750001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;display:inline" />
<rect
style="fill:#000000;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:3.7750001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;display:inline"
id="rect72"
width="24"
height="24"
x="96"
y="68" />
<rect
y="76"
x="124"
height="16"
width="16"
id="rect14403"
style="fill:#000000;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:3.7750001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;display:inline" />
<rect
y="60"
x="60"
height="32"
width="32"
id="rect7952"
style="fill:#000000;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:3.7750001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;display:inline" />
<rect
style="fill:#000000;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:3.7750001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;display:inline"
id="rect14367"
width="48"
height="48"
x="8"
y="44" />
</g>
<g
style="display:inline"
id="g8787"
transform="translate(-31,31)">
<path
transform="matrix(1.3189,0,0,1.7540667,185.96524,13.868621)"
d="M -49.76264,24.296782 A 8.087534,1.9003495 0 1 1 -65.937708,24.296782 A 8.087534,1.9003495 0 1 1 -49.76264,24.296782 z"
sodipodi:ry="1.9003495"
sodipodi:rx="8.087534"
sodipodi:cy="24.296782"
sodipodi:cx="-57.850174"
id="path7938"
style="opacity:0.7;fill:url(#radialGradient8838);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
sodipodi:type="arc" />
<path
id="path7942"
d="M 99.5,32.5 L 99.5,53.5 L 105.5,49.5 L 109.5,57.5 L 112.5,56 L 108.5,48.5 L 114.5,47.5 L 99.5,32.5 z"
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
sodipodi:nodetypes="cccccccc" />
<path
style="fill:url(#linearGradient8840);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M 106.14218,43.762567 L 108.68314,47.878279 L 108.0534,48.743512 L 111.81444,55.783603 L 109.72399,56.828242 L 105.89701,49.207272 L 104.7583,49.248655 L 104.31084,44.540282 L 106.14218,43.762567 z"
id="path7944"
sodipodi:nodetypes="ccccccccc" />
<path
sodipodi:nodetypes="ccccc"
id="path7946"
d="M 113.46659,47.173634 L 106.30247,48.357306 L 100.0002,52.575985 L 99.998595,33.713208 L 113.46659,47.173634 z"
style="fill:url(#radialGradient8842);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
<path
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient8844);stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
d="M 112.42262,46.84474 L 106.10081,47.889164 L 100.50373,51.642958 L 100.52338,34.953163 L 112.42262,46.84474 z"
id="path7948"
sodipodi:nodetypes="ccccc" />
</g>
<path
transform="matrix(1.9783517,0,0,2.6311023,150.44787,21.072802)"
d="M -49.76264,24.296782 A 8.087534,1.9003495 0 1 1 -65.937708,24.296782 A 8.087534,1.9003495 0 1 1 -49.76264,24.296782 z"
sodipodi:ry="1.9003495"
sodipodi:rx="8.087534"
sodipodi:cy="24.296782"
sodipodi:cx="-57.850174"
id="path14357"
style="opacity:0.7;fill:url(#radialGradient8830);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
sodipodi:type="arc" />
<path
id="path14359"
d="M 21.0313,49.019882 L 21.0313,79.906929 L 30.125067,73.906919 L 35.687572,86.781929 L 40.250076,84.781929 L 34.812571,72.219419 L 42.998778,71.344419 L 21.0313,49.019882 z"
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
sodipodi:nodetypes="cccccccc" />
<path
style="fill:url(#linearGradient8861);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.24999988;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;display:inline"
d="M 30.994554,65.913749 L 35.187554,71.393389 L 34.416573,72.549189 L 39.58759,84.520119 L 35.94075,86.096749 L 30.602775,73.733639 L 29.099899,73.732579 L 28.247541,67.080319 L 30.994554,65.913749 z"
id="path14361"
sodipodi:nodetypes="ccccccccc" />
<path
sodipodi:nodetypes="ccccc"
id="path14363"
d="M 41.928178,70.962049 L 32.149196,71.998439 L 21.514496,79.013179 L 21.543527,50.266617 L 41.928178,70.962049 z"
style="fill:url(#radialGradient8858);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;display:inline" />
<path
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient8855);stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:inline"
d="M 40.852205,70.572499 L 31.965383,71.521739 L 22.007218,78.076499 L 22.08452,51.595929 L 40.852205,70.572499 z"
id="path14365"
sodipodi:nodetypes="ccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 28 KiB

690
icons/svg/i-beam.svg Normal file
View file

@ -0,0 +1,690 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="150"
height="100"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.46"
version="1.0"
sodipodi:docname="i-beam.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs4">
<linearGradient
inkscape:collect="always"
id="linearGradient10554">
<stop
style="stop-color:white;stop-opacity:1;"
offset="0"
id="stop10556" />
<stop
style="stop-color:white;stop-opacity:0;"
offset="1"
id="stop10558" />
</linearGradient>
<linearGradient
id="linearGradient124">
<stop
style="stop-color:#ffffff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop125" />
<stop
style="stop-color:silver;stop-opacity:1;"
offset="1"
id="stop126" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient8773">
<stop
style="stop-color:black;stop-opacity:0.3137255"
offset="0"
id="stop8775" />
<stop
style="stop-color:black;stop-opacity:0;"
offset="1"
id="stop8777" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
id="perspective10" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient14473"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-137.34366,-352.57235)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient14475"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2,0,0,0.5,-20.55174,-11.55357)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient14477"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.833516,0,0,1.199737,2.4375,-23.45032)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient14479"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient14481"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.125001,0,0,1.125001,-202.51184,-408.14432)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient14483"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9377063,0,0,1.3497053,-220.82833,-410.36528)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient14485"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.8939146,2.0648066,-0.5162016,0.2234786,-220.82833,-410.36529)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient14487"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient14489"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-144.34366,-395.57235)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient14491"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.6670334,0,0,2.399476,-491.25039,-801.09382)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient14493"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.5891814,3.6707672,-0.9176918,0.3972953,-491.25038,-801.09383)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient14495"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient7954"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient7960"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.3333333,0,0,1.3333333,-220.12487,-531.76312)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient7963"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1113546,0,0,1.5996493,-241.83329,-534.39538)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient7966"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0594534,2.447176,-0.611794,0.2648633,-241.83329,-534.39539)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient8746"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient8748"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0594534,2.447176,-0.611794,0.2648633,-241.83329,-534.39539)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient8750"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1113546,0,0,1.5996493,-241.83329,-534.39538)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient8752"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.3333333,0,0,1.3333333,-220.12487,-531.76312)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient8755"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.3333333,0,0,1.3333333,-220.1248,-531.60971)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient8758"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1113546,0,0,1.5996493,-241.83322,-534.24197)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient8761"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0594534,2.447176,-0.611794,0.2648633,-241.83322,-534.24198)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient8771"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0594534,2.447176,-0.611794,0.2648633,-241.83322,-534.24198)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient8773"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1113546,0,0,1.5996493,-241.83322,-534.24197)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient8775"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.3333333,0,0,1.3333333,-220.1248,-531.60971)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient8778"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.3333333,0,0,1.3333333,-220.3124,-531.60971)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient8781"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1113546,0,0,1.5996493,-242.02082,-534.24197)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient8784"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0594534,2.447176,-0.611794,0.2648633,-242.02082,-534.24198)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient8830"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient8832"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.5891814,3.6707672,-0.9176918,0.3972953,-491.25038,-801.09383)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient8834"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.6670334,0,0,2.399476,-491.25039,-801.09382)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient8836"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-144.34366,-395.57235)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient8838"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient8840"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0594534,2.447176,-0.611794,0.2648633,-242.02082,-534.24198)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient8842"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1113546,0,0,1.5996493,-242.02082,-534.24197)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient8844"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.3333333,0,0,1.3333333,-220.3124,-531.60971)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient8855"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-144.34366,-395.57235)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient8858"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.6670334,0,0,2.399476,-491.25039,-801.09382)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient8861"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.5891814,3.6707672,-0.9176918,0.3972953,-491.25038,-801.09383)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="linearGradient8753"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2,0,0,0.5,-20.55174,-11.55357)"
x1="253.75711"
y1="-129.52815"
x2="252.00447"
y2="-135.47408" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient124"
id="radialGradient8755"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.833516,0,0,1.199737,2.4375,-23.45032)"
cx="307.7507"
cy="361.47824"
fx="307.7507"
fy="361.47824"
r="12.509617" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10554"
id="linearGradient8757"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-137.34366,-378.85608)"
x1="240.9062"
y1="425.18195"
x2="248.28683"
y2="437.96558" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient8767"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient8778"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient8773"
id="radialGradient8788"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.234973,0,18.5877)"
cx="-57.850174"
cy="24.296782"
fx="-58.028885"
fy="27.01318"
r="8.087534" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
gridtolerance="10000"
guidetolerance="10"
objecttolerance="10"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="32"
inkscape:cx="135.70823"
inkscape:cy="18.300078"
inkscape:document-units="px"
inkscape:current-layer="layer4"
showgrid="true"
inkscape:snap-nodes="false"
inkscape:snap-bbox="true"
inkscape:snap-global="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1670"
inkscape:window-height="973"
inkscape:window-x="1285"
inkscape:window-y="48">
<inkscape:grid
type="xygrid"
id="grid13478"
visible="true"
enabled="true"
spacingx="0.5px"
spacingy="0.5px"
empspacing="2" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="artwork:i-beam"
style="display:inline">
<path
transform="matrix(0.989175,0,0,1.31555,164.72395,56.536408)"
d="M -49.76264,24.296782 A 8.087534,1.9003495 0 1 1 -65.937708,24.296782 A 8.087534,1.9003495 0 1 1 -49.76264,24.296782 z"
sodipodi:ry="1.9003495"
sodipodi:rx="8.087534"
sodipodi:cy="24.296782"
sodipodi:cx="-57.850174"
id="path8771"
style="opacity:0.7;fill:url(#radialGradient14479);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
sodipodi:type="arc" />
<g
inkscape:groupmode="layer"
id="layer4"
inkscape:label="plate#1"
style="display:none"
sodipodi:insensitive="true">
<rect
style="fill:#000000;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:3.7750001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;display:inline"
id="rect72"
width="24"
height="24"
x="96"
y="68" />
<rect
y="69"
x="97"
height="22"
width="22"
id="rect14465"
style="fill:#000000;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:3.7750001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;display:inline" />
<rect
style="fill:#000000;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:3.7750001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;display:inline"
id="rect7973"
width="16"
height="16"
x="124"
y="76.009514" />
<rect
y="60"
x="60"
height="32"
width="32"
id="rect8763"
style="fill:#000000;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:3.7750001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;display:inline" />
<rect
y="44"
x="8"
height="48"
width="48"
id="rect8782"
style="fill:#000000;fill-opacity:0.50196078;fill-rule:evenodd;stroke:none;stroke-width:3.7750001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;display:inline" />
</g>
<path
style="fill:#eeeeec;fill-rule:evenodd;stroke:#888a85;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
d="M 104.5,71.505242 C 104,71.505242 103.5,72.005242 103.5,72.5 C 103.5,73.005242 104,73.505242 104.5,73.505242 L 105.5,73.505242 C 106,73.505242 106.5,74.005242 106.5,74.505242 L 106.5,85.5 C 106.5,86 106,86.5 105.5,86.5 L 104.5,86.5 C 104,86.5 103.5,87 103.5,87.5 C 103.5,88.008876 104,88.5 104.5,88.5 L 106.5,88.5 C 107.02152,88.521523 107.5,88 107.5,87.5 C 107.5,88 108,88.5 108.5,88.5 L 110.5,88.490485 C 110.99999,88.488106 111.5,87.990485 111.5,87.5 C 111.5,86.990485 110.99998,86.485728 110.5,86.490485 L 109.5,86.5 C 109,86.5 108.5,86 108.5,85.5 L 108.5,74.505242 C 108.5,74.005242 109,73.505242 109.5,73.505242 L 110.5,73.5 C 110.99999,73.497379 111.5,73 111.5,72.515625 C 111.5,72 111,71.49869 110.5,71.5 L 108.5,71.505242 C 108,71.505242 107.5,72.005242 107.5,72.505242 C 107.5,72.005242 107,71.505242 106.5,71.505242 L 104.5,71.505242 z"
id="path7969"
sodipodi:nodetypes="cssccccssscccsssccccssscccs" />
<path
sodipodi:nodetypes="cssccccssscccsssccccssscccs"
id="path7977"
d="M 130.5,77.5 C 129.99037,77.5 129.5,78 129.5,78.5 C 129.5,79 130,79.5 130.5,79.5 L 130.5,79.5 C 131,79.5 131.5,80 131.5,80.5 L 131.5,87.5 C 131.5,88 131,88.5 130.5,88.5 L 130.5,88.5 C 130,88.5 129.5,89 129.5,89.5 C 129.5,90 130,90.5 130.5,90.5 L 131.5,90.5 C 132,90.5 132.5,90 132.5,89.5 C 132.5,90 133,90.5 133.5,90.5 L 134.5,90.5 C 135,90.5 135.5,90 135.5,89.5 C 135.5,89 135,88.5 134.5,88.5 L 134.5,88.5 C 134,88.5 133.5,88 133.5,87.5 L 133.5,80.5 C 133.5,80 134,79.5 134.5,79.5 L 134.5,79.5 C 135,79.5 135.5,79 135.5,78.5 C 135.5,78 135,77.5 134.5,77.5 L 133.5,77.5 C 133,77.5 132.5,78 132.5,78.5 C 132.5,78 132,77.5 131.5,77.5 L 130.5,77.5 z"
style="fill:#eeeeec;fill-rule:evenodd;stroke:#888a85;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:type="arc"
style="opacity:0.7;fill:url(#radialGradient8778);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
id="path8759"
sodipodi:cx="-57.850174"
sodipodi:cy="24.296782"
sodipodi:rx="8.087534"
sodipodi:ry="1.9003495"
d="M -49.76264,24.296782 A 8.087534,1.9003495 0 1 1 -65.937708,24.296782 A 8.087534,1.9003495 0 1 1 -49.76264,24.296782 z"
transform="matrix(1.3189,0,0,1.7540667,152.29859,44.715211)" />
<path
sodipodi:nodetypes="cssccccssscccsssccccssscccs"
id="path8765"
d="M 71.5,64.5 C 71,64.498835 70,65 70,66 C 70,67 71,67.5 71.5,67.5 L 73.5,67.5 C 74,67.5 74.5,68 74.5,68.506989 L 74.5,83.166666 C 74.5,83.833333 73.83333,84.5 73.16667,84.5 L 71.5,84.5 C 71,84.5 70,85 70,86 C 70,87 71,87.5 71.5,87.5 L 74.5,87.5 C 75.5,87.5 76,86.5 76,86 C 76,86.5 76.5,87.5 77.5,87.5 L 80.5,87.5 C 81,87.5 82,87 82,86 C 82,85 81,84.5 80.5,84.5 L 78.5,84.5 C 77.83333,84.5 77.5,83.826344 77.5,83.159677 L 77.5,68.5 C 77.5,68 78,67.5 78.5,67.5 L 80.5,67.5 C 81,67.5 82,67 82,66 C 82,65 81,64.5 80.5,64.5 L 77.5,64.5 C 76.5,64.5 76,65.5 76,66 C 76,65.5 75.5,64.5 74.5,64.506989 L 71.5,64.5 z"
style="fill:#eeeeec;fill-rule:evenodd;stroke:#888a85;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:type="arc"
style="opacity:0.7;fill:url(#radialGradient8788);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
id="path8780"
sodipodi:cx="-57.850174"
sodipodi:cy="24.296782"
sodipodi:rx="8.087534"
sodipodi:ry="1.9003495"
d="M -49.76264,24.296782 A 8.087534,1.9003495 0 1 1 -65.937708,24.296782 A 8.087534,1.9003495 0 1 1 -49.76264,24.296782 z"
transform="matrix(1.97835,0,0,2.6311,145.94789,21.072816)" />
<path
sodipodi:nodetypes="cssccccssscccsssccccssscccs"
id="path8786"
d="M 25.5,50.509196 C 24.5,50.509196 23.5,51.509196 23.5,52.498712 C 23.5,53.509196 24.5,54.509196 25.5,54.509196 L 27.5,54.509196 C 28.5,54.509196 29.5,55.509196 29.5,56.509196 L 29.5,78.498712 C 29.5,79.498712 28.5,80.498712 27.5,80.498712 L 25.5,80.498712 C 24.5,80.498712 23.5,81.498712 23.5,82.498712 C 23.5,83.516464 24.5,84.498712 25.5,84.498712 L 29.5,84.498712 C 30.54304,84.541758 31.5,83.498712 31.5,82.498712 C 31.5,83.498712 32.5,84.498712 33.5,84.498712 L 37.5,84.479682 C 38.49998,84.474924 39.5,83.479682 39.5,82.498712 C 39.5,81.479682 38.49996,80.470168 37.5,80.479682 L 35.5,80.498712 C 34.5,80.498712 33.5,79.498712 33.5,78.498712 L 33.5,56.509196 C 33.5,55.509196 34.5,54.509196 35.5,54.509196 L 37.5,54.498712 C 38.49998,54.49347 39.5,53.498712 39.5,52.529962 C 39.5,51.498712 38.5,50.496092 37.5,50.498712 L 33.5,50.509196 C 32.5,50.509196 31.5,51.509196 31.5,52.509196 C 31.5,51.509196 30.5,50.509196 29.5,50.509196 L 25.5,50.509196 z"
style="fill:#eeeeec;fill-rule:evenodd;stroke:#888a85;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 26 KiB

View file

@ -1,5 +1,5 @@
# Copyright (C) Lumiera.org
# 2007, Joel Holdsworth <joel@airwebreathe.org.uk>
# Copyright (C) Lumiera.org
# 2007, Joel Holdsworth <joel@airwebreathe.org.uk>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@ -22,74 +22,69 @@ lumigui_srcdir = $(top_srcdir)/src/gui
#lumigui_CPPFLAGS = -I$(top_srcdir)/src/
INCLUDES = \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
$(GTK_LUMIERA_CFLAGS)
bin_PROGRAMS += lumigui
lumigui_SOURCES = \
$(lumigui_srcdir)/gtk-lumiera.cpp \
$(lumigui_srcdir)/gtk-lumiera.hpp \
$(lumigui_srcdir)/window-manager.cpp \
$(lumigui_srcdir)/window-manager.hpp \
$(lumigui_srcdir)/workspace/actions.cpp \
$(lumigui_srcdir)/workspace/actions.hpp \
$(lumigui_srcdir)/workspace/workspace-window.cpp \
$(lumigui_srcdir)/workspace/workspace-window.hpp \
$(lumigui_srcdir)/dialogs/render.cpp \
$(lumigui_srcdir)/dialogs/render.hpp \
$(lumigui_srcdir)/dialogs/preferences-dialog.cpp \
$(lumigui_srcdir)/dialogs/preferences-dialog.hpp \
$(lumigui_srcdir)/panels/panel.cpp \
$(lumigui_srcdir)/panels/panel.hpp \
$(lumigui_srcdir)/panels/timeline-panel.cpp \
$(lumigui_srcdir)/panels/timeline-panel.hpp \
$(lumigui_srcdir)/panels/viewer-panel.cpp \
$(lumigui_srcdir)/panels/viewer-panel.hpp \
$(lumigui_srcdir)/panels/assets-panel.cpp \
$(lumigui_srcdir)/panels/asset-panels.hpp \
$(lumigui_srcdir)/widgets/video-display-widget.cpp \
$(lumigui_srcdir)/widgets/video-display-widget.hpp \
$(lumigui_srcdir)/widgets/timeline-widget.cpp \
$(lumigui_srcdir)/widgets/timeline-widget.hpp \
$(lumigui_srcdir)/widgets/timeline/header-container.cpp \
$(lumigui_srcdir)/widgets/timeline/header-container.hpp \
$(lumigui_srcdir)/widgets/timeline/track.cpp \
$(lumigui_srcdir)/widgets/timeline/track.hpp \
$(lumigui_srcdir)/widgets/timeline/video-track.cpp \
$(lumigui_srcdir)/widgets/timeline/video-track.hpp \
$(lumigui_srcdir)/widgets/timeline/timeline-body.cpp \
$(lumigui_srcdir)/widgets/timeline/timeline-body.hpp \
$(lumigui_srcdir)/widgets/timeline/timeline-ruler.cpp \
$(lumigui_srcdir)/widgets/timeline/timeline-ruler.hpp \
$(lumigui_srcdir)/model/project.cpp \
$(lumigui_srcdir)/model/project.hpp \
$(lumigui_srcdir)/output/displayer.cpp \
$(lumigui_srcdir)/output/displayer.hpp \
$(lumigui_srcdir)/output/gdkdisplayer.cpp \
$(lumigui_srcdir)/output/gdkdisplayer.hpp \
$(lumigui_srcdir)/output/xvdisplayer.cpp \
$(lumigui_srcdir)/output/xvdisplayer.hpp
lumigui_SOURCES = \
$(lumigui_srcdir)/gtk-lumiera.cpp \
$(lumigui_srcdir)/gtk-lumiera.hpp \
$(lumigui_srcdir)/window-manager.cpp \
$(lumigui_srcdir)/window-manager.hpp \
$(lumigui_srcdir)/workspace/actions.cpp \
$(lumigui_srcdir)/workspace/actions.hpp \
$(lumigui_srcdir)/workspace/workspace-window.cpp \
$(lumigui_srcdir)/workspace/workspace-window.hpp \
$(lumigui_srcdir)/dialogs/render.cpp \
$(lumigui_srcdir)/dialogs/render.hpp \
$(lumigui_srcdir)/dialogs/preferences-dialog.cpp \
$(lumigui_srcdir)/dialogs/preferences-dialog.hpp \
$(lumigui_srcdir)/panels/panel.cpp \
$(lumigui_srcdir)/panels/panel.hpp \
$(lumigui_srcdir)/panels/timeline-panel.cpp \
$(lumigui_srcdir)/panels/timeline-panel.hpp \
$(lumigui_srcdir)/panels/viewer-panel.cpp \
$(lumigui_srcdir)/panels/viewer-panel.hpp \
$(lumigui_srcdir)/panels/assets-panel.cpp \
$(lumigui_srcdir)/panels/asset-panels.hpp \
$(lumigui_srcdir)/widgets/video-display-widget.cpp \
$(lumigui_srcdir)/widgets/video-display-widget.hpp \
$(lumigui_srcdir)/widgets/timeline-widget.cpp \
$(lumigui_srcdir)/widgets/timeline-widget.hpp \
$(lumigui_srcdir)/widgets/timeline/header-container.cpp \
$(lumigui_srcdir)/widgets/timeline/header-container.hpp \
$(lumigui_srcdir)/widgets/timeline/track.cpp \
$(lumigui_srcdir)/widgets/timeline/track.hpp \
$(lumigui_srcdir)/widgets/timeline/timeline-body.cpp \
$(lumigui_srcdir)/widgets/timeline/timeline-body.hpp \
$(lumigui_srcdir)/widgets/timeline/timeline-ruler.cpp \
$(lumigui_srcdir)/widgets/timeline/timeline-ruler.hpp \
$(lumigui_srcdir)/widgets/timeline/timeline-tool.cpp \
$(lumigui_srcdir)/widgets/timeline/timeline-tool.hpp \
$(lumigui_srcdir)/widgets/timeline/timeline-arrow-tool.cpp \
$(lumigui_srcdir)/widgets/timeline/timeline-arrow-tool.hpp \
$(lumigui_srcdir)/widgets/timeline/timeline-ibeam-tool.cpp \
$(lumigui_srcdir)/widgets/timeline/timeline-ibeam-tool.hpp \
$(lumigui_srcdir)/model/project.cpp \
$(lumigui_srcdir)/model/project.hpp \
$(lumigui_srcdir)/output/displayer.cpp \
$(lumigui_srcdir)/output/displayer.hpp \
$(lumigui_srcdir)/output/gdkdisplayer.cpp \
$(lumigui_srcdir)/output/gdkdisplayer.hpp \
$(lumigui_srcdir)/output/xvdisplayer.cpp \
$(lumigui_srcdir)/output/xvdisplayer.hpp
lumigui_LDFLAGS =
lumigui_LDADD = $(GTK_LUMIERA_LIBS) liblumicommon.a liblumi.a
lumigui_DEPENDENCIES = \
$(top_builddir)/lumiera_ui.rc \
$(top_builddir)/assets-panel.png \
$(top_builddir)/timeline-panel.png \
$(top_builddir)/viewer-panel.png
lumigui_DEPENDENCIES = \
$(top_builddir)/lumiera_ui.rc \
$(top_builddir)/liblumicommon.a \
$(top_builddir)/liblumi.a
$(top_builddir)/lumiera_ui.rc:
cp $(lumigui_srcdir)/lumiera_ui.rc $(top_builddir)
$(top_builddir)/assets-panel.png:
cp $(top_srcdir)/icons/assets-panel.png $(top_builddir)
$(top_builddir)/timeline-panel.png:
cp $(top_srcdir)/icons/timeline-panel.png $(top_builddir)
$(top_builddir)/viewer-panel.png:
cp $(top_srcdir)/icons/viewer-panel.png $(top_builddir)

View file

@ -25,6 +25,7 @@
using namespace Gtk;
using namespace sigc;
using namespace lumiera::gui::widgets;
namespace lumiera {
namespace gui {
@ -34,26 +35,52 @@ const int TimelinePanel::ZoomToolSteps = 2; // 2 seems comfortable
TimelinePanel::TimelinePanel() :
Panel("timeline", _("Timeline"), "timeline_panel"),
arrowTool(Gtk::StockID("arrow")),
iBeamTool(Gtk::StockID("i_beam")),
zoomIn(Stock::ZOOM_IN),
zoomOut(Stock::ZOOM_OUT)
zoomOut(Stock::ZOOM_OUT),
updatingToolbar(false)
{
// Setup the toolbar
toolbar.append(arrowTool, mem_fun(this,
&TimelinePanel::on_arrow_tool));
toolbar.append(iBeamTool, mem_fun(this,
&TimelinePanel::on_ibeam_tool));
toolbar.append(seperator1);
toolbar.append(zoomIn, mem_fun(this, &TimelinePanel::on_zoom_in));
toolbar.append(zoomOut, mem_fun(this, &TimelinePanel::on_zoom_out));
toolbar.set_icon_size(IconSize(ICON_SIZE_SMALL_TOOLBAR));
toolbar.set_icon_size(IconSize(ICON_SIZE_LARGE_TOOLBAR));
toolbar.set_toolbar_style(TOOLBAR_ICONS);
// Add the toolbar
pack_start(toolbar, PACK_SHRINK);
pack_start(timelineWidget, PACK_EXPAND_WIDGET);
update_tool_buttons();
update_zoom_buttons();
}
void
TimelinePanel::on_arrow_tool()
{
if(updatingToolbar) return;
timelineWidget.set_tool(timeline::Arrow);
update_tool_buttons();
}
void
TimelinePanel::on_ibeam_tool()
{
if(updatingToolbar) return;
timelineWidget.set_tool(timeline::IBeam);
update_tool_buttons();
}
void
TimelinePanel::on_zoom_in()
{
timelineWidget.zoom_view(ZoomToolSteps);
update_zoom_buttons();
}
@ -65,6 +92,19 @@ TimelinePanel::on_zoom_out()
update_zoom_buttons();
}
void
TimelinePanel::update_tool_buttons()
{
if(!updatingToolbar)
{
updatingToolbar = true;
const timeline::ToolType tool = timelineWidget.get_tool();
arrowTool.set_active(tool == timeline::Arrow);
iBeamTool.set_active(tool == timeline::IBeam);
updatingToolbar = false;
}
}
void
TimelinePanel::update_zoom_buttons()
{

View file

@ -42,10 +42,14 @@ public:
private:
//----- Event Handlers -----//
void on_arrow_tool();
void on_ibeam_tool();
void on_zoom_in();
void on_zoom_out();
private:
void update_tool_buttons();
void update_zoom_buttons();
private:
@ -57,9 +61,17 @@ private:
TimelineWidget timelineWidget;
// Toolbar Widgets
Gtk::ToggleToolButton arrowTool;
Gtk::ToggleToolButton iBeamTool;
Gtk::SeparatorToolItem seperator1;
Gtk::ToolButton zoomIn;
Gtk::ToolButton zoomOut;
// Internals
bool updatingToolbar;
//----- Constants -----//
static const int ZoomToolSteps;
};

View file

@ -44,6 +44,8 @@ TimelineWidget::TimelineWidget() :
totalHeight(0),
horizontalAdjustment(0, 0, 0),
verticalAdjustment(0, 0, 0),
selectionStart(0),
selectionEnd(0),
horizontalScroll(horizontalAdjustment),
verticalScroll(verticalAdjustment)
{
@ -51,6 +53,8 @@ TimelineWidget::TimelineWidget() :
ENSURE(body != NULL);
headerContainer = new HeaderContainer(this);
ENSURE(headerContainer != NULL);
ruler = new TimelineRuler(this);
ENSURE(ruler != NULL);
horizontalAdjustment.signal_value_changed().connect( sigc::mem_fun(
this, &TimelineWidget::on_scroll) );
@ -58,11 +62,12 @@ TimelineWidget::TimelineWidget() :
this, &TimelineWidget::on_scroll) );
body->signal_motion_notify_event().connect( sigc::mem_fun(
this, &TimelineWidget::on_motion_in_body_notify_event) );
set_time_scale(GAVL_TIME_SCALE / 200);
set_selection(2000000, 4000000);
attach(*body, 1, 2, 1, 2, FILL|EXPAND, FILL|EXPAND);
attach(ruler, 1, 2, 0, 1, FILL|EXPAND, SHRINK);
attach(*ruler, 1, 2, 0, 1, FILL|EXPAND, SHRINK);
attach(*headerContainer, 0, 1, 1, 2, SHRINK, FILL|EXPAND);
attach(horizontalScroll, 1, 2, 2, 3, FILL|EXPAND, SHRINK);
attach(verticalScroll, 2, 3, 1, 2, SHRINK, FILL|EXPAND);
@ -71,14 +76,23 @@ TimelineWidget::TimelineWidget() :
tracks.push_back(&video2);
update_tracks();
set_tool(timeline::Arrow);
}
TimelineWidget::~TimelineWidget()
{
REQUIRE(body != NULL);
body->unreference();
if(body != NULL)
body->unreference();
REQUIRE(headerContainer != NULL);
headerContainer->unreference();
if(headerContainer != NULL)
headerContainer->unreference();
REQUIRE(ruler != NULL);
if(ruler != NULL)
ruler->unreference();
}
gavl_time_t
@ -90,9 +104,11 @@ TimelineWidget::get_time_offset() const
void
TimelineWidget::set_time_offset(gavl_time_t time_offset)
{
REQUIRE(ruler != NULL);
timeOffset = time_offset;
horizontalAdjustment.set_value(time_offset);
ruler.set_time_offset(time_offset);
ruler->update_view();
}
int64_t
@ -104,17 +120,14 @@ TimelineWidget::get_time_scale() const
void
TimelineWidget::set_time_scale(int64_t time_scale)
{
timeScale = time_scale;
ruler.set_time_scale(time_scale);
}
void
TimelineWidget::shift_view(int shift_size)
{
const int view_width = body->get_allocation().get_width();
REQUIRE(ruler != NULL);
set_time_offset(get_time_offset() +
shift_size * timeScale * view_width / 16);
timeScale = time_scale;
const int view_width = body->get_allocation().get_width();
horizontalAdjustment.set_page_size(timeScale * view_width);
ruler->update_view();
}
void
@ -148,11 +161,65 @@ TimelineWidget::zoom_view(int point, int zoom_size)
set_time_scale(new_time_scale);
}
void
TimelineWidget::shift_view(int shift_size)
{
const int view_width = body->get_allocation().get_width();
set_time_offset(get_time_offset() +
shift_size * timeScale * view_width / 16);
}
gavl_time_t
TimelineWidget::get_selection_start() const
{
return selectionStart;
}
gavl_time_t
TimelineWidget::get_selection_end() const
{
return selectionEnd;
}
void
TimelineWidget::set_selection(gavl_time_t start, gavl_time_t end)
{
if(start < end)
{
selectionStart = start;
selectionEnd = end;
}
else
{
// The selection is back-to-front, flip it round
selectionStart = end;
selectionEnd = start;
}
ruler->queue_draw();
body->queue_draw();
}
ToolType
TimelineWidget::get_tool() const
{
REQUIRE(body != NULL);
return body->get_tool();
}
void
TimelineWidget::set_tool(ToolType tool_type)
{
REQUIRE(body != NULL);
body->set_tool(tool_type);
}
void
TimelineWidget::on_scroll()
{
timeOffset = horizontalAdjustment.get_value();
ruler.set_time_offset(timeOffset);
ruler->update_view();
}
void
@ -163,6 +230,18 @@ TimelineWidget::on_size_allocate(Allocation& allocation)
update_scroll();
}
int
TimelineWidget::time_to_x(gavl_time_t time) const
{
return (int)((time - timeOffset) / timeScale);
}
gavl_time_t
TimelineWidget::x_to_time(int x) const
{
return (gavl_time_t)((int64_t)x * timeScale + timeOffset);
}
void
TimelineWidget::update_tracks()
{
@ -186,9 +265,14 @@ TimelineWidget::update_scroll()
//----- Horizontal Scroll ------//
// TEST CODE
horizontalAdjustment.set_upper(1000 * GAVL_TIME_SCALE / 200);
horizontalAdjustment.set_lower(-1000 * GAVL_TIME_SCALE / 200);
// Set the page size
horizontalAdjustment.set_page_size(
timeScale * body_allocation.get_width());
//----- Vertical Scroll -----//
// Calculate the vertical length that can be scrolled:
@ -204,10 +288,14 @@ TimelineWidget::update_scroll()
verticalAdjustment.set_upper(y_scroll_length);
// Hide the scrollbar if no scrolling is possible
if(y_scroll_length == 0 && verticalScroll.is_visible())
#if 0
// Having this code included seems to cause a layout loop as the
// window is shrunk
if(y_scroll_length <= 0 && verticalScroll.is_visible())
verticalScroll.hide();
else if(y_scroll_length != 0 && !verticalScroll.is_visible())
else if(y_scroll_length > 0 && !verticalScroll.is_visible())
verticalScroll.show();
#endif
}
int
@ -220,7 +308,7 @@ bool
TimelineWidget::on_motion_in_body_notify_event(GdkEventMotion *event)
{
REQUIRE(event != NULL);
ruler.set_mouse_chevron_offset(event->x);
ruler->set_mouse_chevron_offset(event->x);
return true;
}

View file

@ -30,8 +30,10 @@
#include "timeline/header-container.hpp"
#include "timeline/timeline-body.hpp"
#include "timeline/timeline-ruler.hpp"
#include "timeline/timeline-tool.hpp"
#include "timeline/timeline-arrow-tool.hpp"
#include "timeline/timeline-ibeam-tool.hpp"
#include "timeline/track.hpp"
#include "timeline/video-track.hpp"
namespace lumiera {
namespace gui {
@ -96,14 +98,30 @@ public:
**/
void shift_view(int shift_size);
gavl_time_t get_selection_start() const;
gavl_time_t get_selection_end() const;
void set_selection(gavl_time_t start, gavl_time_t end);
timeline::ToolType get_tool() const;
void set_tool(timeline::ToolType tool_type);
/* ===== Events ===== */
protected:
void on_scroll();
void on_size_allocate(Gtk::Allocation& allocation);
/* ===== Utilities ===== */
protected:
int time_to_x(gavl_time_t time) const;
gavl_time_t x_to_time(int x) const;
/* ===== Internals ===== */
protected:
private:
void update_tracks();
@ -114,23 +132,29 @@ protected:
bool on_motion_in_body_notify_event(GdkEventMotion *event);
protected:
// View State
gavl_time_t timeOffset;
int64_t timeScale;
// Selection State
gavl_time_t selectionStart;
gavl_time_t selectionEnd;
int totalHeight;
timeline::VideoTrack video1;
timeline::VideoTrack video2;
timeline::Track video1;
timeline::Track video2;
std::vector<timeline::Track*> tracks;
timeline::HeaderContainer *headerContainer;
timeline::TimelineBody *body;
timeline::TimelineRuler ruler;
timeline::TimelineRuler *ruler;
Gtk::Adjustment horizontalAdjustment, verticalAdjustment;
Gtk::HScrollbar horizontalScroll;
Gtk::VScrollbar verticalScroll;
/* ===== Constants ===== */
public:
static const int64_t MaxScale;
@ -142,6 +166,10 @@ protected:
friend class timeline::TimelineBody;
friend class timeline::HeaderContainer;
friend class timeline::TimelineRuler;
friend class timeline::Tool;
friend class timeline::ArrowTool;
friend class timeline::IBeamTool;
};
} // namespace widgets

View file

@ -39,7 +39,9 @@ HeaderContainer::HeaderContainer(lumiera::gui::widgets::TimelineWidget *timeline
{
REQUIRE(timeline_widget != NULL);
set_flags(Gtk::NO_WINDOW); // This widget will not have a window at first
// This widget will not have a window at first
set_flags(Gtk::NO_WINDOW);
set_redraw_on_allocate(false);
// Connect to the timeline widget's vertical scroll event,

View file

@ -46,80 +46,80 @@ class Track;
* associated with timeline tracks.
*/
class HeaderContainer : public Gtk::Container
{
public:
/**
* Constructor
*
* @param[in] timeline_widget A pointer to the owner timeline widget
*/
HeaderContainer(lumiera::gui::widgets::TimelineWidget *timeline_widget);
/**
* Attaches the header all the header widgets of root
* tracks to this control.
*
* @note This must be called when the track list changes
* to synchronise the headers with the timeline body and
* the backend.
*/
void update_headers();
/* ===== Overrides ===== */
private:
void on_realize();
void on_unrealize();
{
public:
/**
* Constructor
*
* @param[in] timeline_widget A pointer to the owner timeline widget
*/
HeaderContainer(lumiera::gui::widgets::TimelineWidget *timeline_widget);
void on_size_allocate (Gtk::Allocation& allocation);
void on_size_request (Gtk::Requisition* requisition);
void forall_vfunc(gboolean include_internals, GtkCallback callback,
gpointer callback_data);
/* ===== Events ===== */
private:
void on_scroll();
/**
* Attaches the header all the header widgets of root
* tracks to this control.
*
* @note This must be called when the track list changes
* to synchronise the headers with the timeline body and
* the backend.
*/
void update_headers();
/* ===== Overrides ===== */
private:
void on_realize();
void on_unrealize();
void on_size_allocate (Gtk::Allocation& allocation);
void on_size_request (Gtk::Requisition* requisition);
/* ===== Internals ===== */
private:
void forall_vfunc(gboolean include_internals, GtkCallback callback,
gpointer callback_data);
/**
* Moves all the header widgets to the correct position
* given scroll, stacking etc.
*/
void layout_headers();
/* ===== Events ===== */
private:
void on_scroll();
private:
/* ===== Internals ===== */
private:
/**
* Moves all the header widgets to the correct position
* given scroll, stacking etc.
*/
void layout_headers();
/**
* The owner TimelineWidget of which this class is a helper
*/
lumiera::gui::widgets::TimelineWidget *timelineWidget;
private:
/**
* A structure to represent a header widget and it's
* associated track
*/
struct RootHeader
{
Glib::RefPtr<Gtk::Widget> widget;
Track *track;
};
/**
* Contains a list of the root currently present on
* the timeline view
*/
std::vector< RootHeader > rootHeaders;
/**
* The owner TimelineWidget of which this class is a helper
*/
lumiera::gui::widgets::TimelineWidget *timelineWidget;
/**
* The widget's window object.
*
* @note This is needed for the sake of clipping when
* widgets are scrolled.
*/
Glib::RefPtr<Gdk::Window> gdkWindow;
/**
* A structure to represent a header widget and it's
* associated track
*/
struct RootHeader
{
Glib::RefPtr<Gtk::Widget> widget;
Track *track;
};
/**
* Contains a list of the root currently present on
* the timeline view
*/
std::vector< RootHeader > rootHeaders;
/**
* The widget's window object.
*
* @note This is needed for the sake of clipping when
* widgets are scrolled.
*/
Glib::RefPtr<Gdk::Window> gdkWindow;
};
} // namespace timeline
} // namespace widgets

View file

@ -1,5 +1,5 @@
/*
video-track.cpp - Implementation of the timeline video track object
timeline-arrow-tool.cpp - Implementation of the ArrowTool class
Copyright (C) Lumiera.org
2008, Joel Holdsworth <joel@airwebreathe.org.uk>
@ -20,38 +20,48 @@
* *****************************************************/
#include "video-track.hpp"
using namespace Gtk;
#include "timeline-arrow-tool.hpp"
namespace lumiera {
namespace gui {
namespace widgets {
namespace timeline {
VideoTrack::VideoTrack() :
headerWidget("HeaderTest")
{
ArrowTool::ArrowTool(TimelineBody *timeline_body) :
Tool(timeline_body)
{
}
}
Gtk::Widget&
VideoTrack::get_header_widget()
{
return headerWidget;
}
ToolType
ArrowTool::get_type() const
{
return Arrow;
}
int
VideoTrack::get_height()
{
return 100;
}
Gdk::Cursor
ArrowTool::get_cursor() const
{
return Gdk::Cursor(Gdk::ARROW);
}
void
VideoTrack::draw_track(Cairo::RefPtr<Cairo::Context> cairo)
{
}
ArrowTool::on_button_press_event(GdkEventButton* event)
{
Tool::on_button_press_event(event);
}
void
ArrowTool::on_button_release_event(GdkEventButton* event)
{
Tool::on_button_release_event(event);
}
void
ArrowTool::on_motion_notify_event(GdkEventMotion *event)
{
Tool::on_motion_notify_event(event);
}
} // namespace timeline
} // namespace widgets

View file

@ -1,5 +1,5 @@
/*
video-track.hpp - Declaration of the timeline video track object
timeline-arrow-tool.hpp - Declaration of the ArrowTool class
Copyright (C) Lumiera.org
2008, Joel Holdsworth <joel@airwebreathe.org.uk>
@ -19,40 +19,40 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/** @file video-track.hpp
** This file contains the definition of video track object
/** @file timeline-arrow-tool.hpp
** This file contains the definition of the arrow tool class
*/
#ifndef VIDEO_TRACK_HPP
#define VIDEO_TRACK_HPP
#ifndef TIMELINE_ARROW_TOOL_HPP
#define TIMELINE_ARROW_TOOL_HPP
#include "track.hpp"
#include <gtkmm.h>
#include "timeline-tool.hpp"
namespace lumiera {
namespace gui {
namespace widgets {
namespace timeline {
class VideoTrack : public Track
{
public:
VideoTrack();
class ArrowTool : public Tool
{
public:
ArrowTool(TimelineBody *timeline_body);
virtual Gtk::Widget& get_header_widget();
virtual int get_height();
virtual void draw_track(Cairo::RefPtr<Cairo::Context> cairo);
protected:
Gtk::Label headerWidget;
Gtk::Frame headerFrame;
};
ToolType get_type() const;
protected:
Gdk::Cursor get_cursor() const;
protected:
void on_button_press_event(GdkEventButton* event);
void on_button_release_event(GdkEventButton* event);
void on_motion_notify_event(GdkEventMotion *event);
};
} // namespace timeline
} // namespace widgets
} // namespace gui
} // namespace lumiera
#endif // VIDEO_TRACK_HPP
#endif // TIMELINE_ARROW_TOOL_HPP

View file

@ -27,6 +27,9 @@
#include "../timeline-widget.hpp"
#include "../../window-manager.hpp"
#include "timeline-arrow-tool.hpp"
#include "timeline-ibeam-tool.hpp"
using namespace Gtk;
using namespace std;
using namespace lumiera::gui;
@ -38,8 +41,10 @@ namespace gui {
namespace widgets {
namespace timeline {
TimelineBody::TimelineBody(lumiera::gui::widgets::TimelineWidget *timeline_widget) :
TimelineBody::TimelineBody(lumiera::gui::widgets::TimelineWidget
*timeline_widget) :
Glib::ObjectBase("TimelineBody"),
tool(NULL),
dragType(None),
mouseDownX(0),
mouseDownY(0),
@ -61,7 +66,51 @@ TimelineBody::TimelineBody(lumiera::gui::widgets::TimelineWidget *timeline_widge
"Track Background",
"The background colour of timeline tracks",
GDK_TYPE_COLOR, G_PARAM_READABLE));
}
TimelineBody::~TimelineBody()
{
REQUIRE(tool != NULL);
if(tool != NULL)
delete tool;
}
ToolType
TimelineBody::get_tool() const
{
REQUIRE(tool != NULL);
if(tool != NULL)
return tool->get_type();
return lumiera::gui::widgets::timeline::None;
}
void
TimelineBody::set_tool(timeline::ToolType tool_type)
{
// Tidy up old tool
if(tool != NULL)
{
// Do we need to change tools?
if(tool->get_type() == tool_type)
return;
delete tool;
}
// Create the new tool
switch(tool_type)
{
case timeline::Arrow:
tool = new ArrowTool(this);
break;
case timeline::IBeam:
tool = new IBeamTool(this);
break;
}
// Apply the cursor if possible
tool->apply_cursor();
}
void
@ -69,12 +118,15 @@ TimelineBody::on_realize()
{
Widget::on_realize();
// We wish to receive all event notifications
// We wish to receive event notifications
add_events(
Gdk::POINTER_MOTION_MASK |
Gdk::SCROLL_MASK |
Gdk::BUTTON_PRESS_MASK |
Gdk::BUTTON_RELEASE_MASK);
// Apply the cursor if possible
tool->apply_cursor();
}
void
@ -136,7 +188,12 @@ TimelineBody::on_button_press_event(GdkEventButton* event)
default:
dragType = None;
break;
}
}
// Forward the event to the tool
tool->on_button_press_event(event);
return true;
}
bool
@ -144,11 +201,16 @@ TimelineBody::on_button_release_event(GdkEventButton* event)
{
// Terminate any drags
dragType = None;
// Forward the event to the tool
tool->on_button_release_event(event);
return true;
}
bool
TimelineBody::on_motion_notify_event(GdkEventMotion *event)
{
{
REQUIRE(event != NULL);
switch(dragType)
@ -166,6 +228,9 @@ TimelineBody::on_motion_notify_event(GdkEventMotion *event)
}
}
// Forward the event to the tool
tool->on_motion_notify_event(event);
// false so that the message is passed up to the owner TimelineWidget
return false;
}
@ -173,6 +238,8 @@ TimelineBody::on_motion_notify_event(GdkEventMotion *event)
bool
TimelineBody::on_expose_event(GdkEventExpose* event)
{
Cairo::Matrix view_matrix;
REQUIRE(event != NULL);
REQUIRE(timelineWidget != NULL);
@ -194,6 +261,7 @@ TimelineBody::on_expose_event(GdkEventExpose* event)
// Translate the view by the scroll distance
cairo->translate(0, -get_vertical_offset());
cairo->get_matrix(view_matrix);
// Interate drawing each track
BOOST_FOREACH( Track* track, timelineWidget->tracks )
@ -215,8 +283,44 @@ TimelineBody::on_expose_event(GdkEventExpose* event)
// Shift for the next track
cairo->translate(0, height + TimelineWidget::TrackPadding);
}
}
//----- Draw the selection -----//
const int start_x = timelineWidget->time_to_x(
timelineWidget->get_selection_start());
const int end_x = timelineWidget->time_to_x(
timelineWidget->get_selection_end());
cairo->set_matrix(view_matrix);
// Draw the cover
if(end_x > 0 && start_x < allocation.get_width())
{
cairo->set_source_rgba(1.0, 0, 0, 0.5);
cairo->rectangle(start_x + 0.5, 0,
end_x - start_x, allocation.get_height());
cairo->fill();
}
cairo->set_source_rgb(1.0, 0, 0);
cairo->set_line_width(1);
// Draw the start
if(start_x >= 0 && start_x < allocation.get_width())
{
cairo->move_to(start_x + 0.5, 0);
cairo->line_to(start_x + 0.5, allocation.get_height());
cairo->stroke_preserve();
}
// Draw the end
if(end_x >= 0 && end_x < allocation.get_width())
{
cairo->move_to(end_x + 0.5, 0);
cairo->line_to(end_x + 0.5, allocation.get_height());
cairo->stroke_preserve();
}
return true;
}

View file

@ -27,6 +27,7 @@
#define TIMELINE_BODY_HPP
#include "../../gtk-lumiera.hpp"
#include "timeline-tool.hpp"
namespace lumiera {
namespace gui {
@ -40,6 +41,12 @@ class TimelineBody : public Gtk::DrawingArea
{
public:
TimelineBody(lumiera::gui::widgets::TimelineWidget *timeline_widget);
~TimelineBody();
ToolType get_tool() const;
void set_tool(ToolType tool_type);
/* ===== Events ===== */
protected:
@ -76,15 +83,20 @@ private:
Shift
};
// UI State Data
DragType dragType;
timeline::Tool *tool;
double mouseDownX, mouseDownY;
// Scroll State
DragType dragType;
gavl_time_t beginShiftTimeOffset;
int beginShiftVerticalOffset;
int beginShiftVerticalOffset;
GdkColor background;
lumiera::gui::widgets::TimelineWidget *timelineWidget;
friend class ArrowTool;
friend class IBeamTool;
};
} // namespace timeline

View file

@ -0,0 +1,101 @@
/*
timeline-ibeam-tool.cpp - Implementation of the IBeamTool class
Copyright (C) Lumiera.org
2008, Joel Holdsworth <joel@airwebreathe.org.uk>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "timeline-ibeam-tool.hpp"
#include "../timeline-widget.hpp"
namespace lumiera {
namespace gui {
namespace widgets {
namespace timeline {
IBeamTool::IBeamTool(TimelineBody *timeline_body) :
Tool(timeline_body)
{
}
ToolType
IBeamTool::get_type() const
{
return IBeam;
}
Gdk::Cursor
IBeamTool::get_cursor() const
{
return Gdk::Cursor(Gdk::XTERM);
}
void
IBeamTool::on_button_press_event(GdkEventButton* event)
{
Tool::on_button_press_event(event);
REQUIRE(timelineBody != NULL);
lumiera::gui::widgets::TimelineWidget *timeline_widget =
timelineBody->timelineWidget;
REQUIRE(timeline_widget != NULL);
if(event->button == 1)
{
drag_start_time = timeline_widget->x_to_time(event->x);
timeline_widget->set_selection(drag_start_time, drag_start_time);
}
}
void
IBeamTool::on_button_release_event(GdkEventButton* event)
{
Tool::on_button_release_event(event);
if(event->button == 1)
set_leading_x(event->x);
}
void
IBeamTool::on_motion_notify_event(GdkEventMotion *event)
{
Tool::on_motion_notify_event(event);
if(isDragging)
set_leading_x(event->x);
}
void IBeamTool::set_leading_x(const int x)
{
REQUIRE(timelineBody != NULL);
lumiera::gui::widgets::TimelineWidget *timeline_widget =
timelineBody->timelineWidget;
REQUIRE(timeline_widget != NULL);
const gavl_time_t time = timeline_widget->x_to_time(x);
if(time > drag_start_time)
timeline_widget->set_selection(drag_start_time, time);
else
timeline_widget->set_selection(time, drag_start_time);
}
} // namespace timeline
} // namespace widgets
} // namespace gui
} // namespace lumiera

View file

@ -0,0 +1,66 @@
/*
timeline-ibeam-tool.hpp - Declaration of the ArrowTool class
Copyright (C) Lumiera.org
2008, Joel Holdsworth <joel@airwebreathe.org.uk>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/** @file timeline-ibeam-tool.hpp
** This file contains the definition of ibeam tool class
** tool objects
*/
#ifndef TIMELINE_IBEAM_TOOL_HPP
#define TIMELINE_IBEAM_TOOL_HPP
#include <gtkmm.h>
#include "timeline-tool.hpp"
namespace lumiera {
namespace gui {
namespace widgets {
namespace timeline {
class IBeamTool : public Tool
{
public:
IBeamTool(TimelineBody *timeline_body);
ToolType get_type() const;
protected:
Gdk::Cursor get_cursor() const;
protected:
void on_button_press_event(GdkEventButton* event);
void on_button_release_event(GdkEventButton* event);
void on_motion_notify_event(GdkEventMotion *event);
private:
void set_leading_x(const int x);
protected:
//----- Internals -----//
gavl_time_t drag_start_time;
};
} // namespace timeline
} // namespace widgets
} // namespace gui
} // namespace lumiera
#endif // TIMELINE_IBEAM_TOOL_HPP

View file

@ -23,6 +23,7 @@
#include <cairomm-1.0/cairomm/cairomm.h>
#include "timeline-ruler.hpp"
#include "../timeline-widget.hpp"
#include "../../window-manager.hpp"
extern "C" {
@ -41,39 +42,24 @@ namespace gui {
namespace widgets {
namespace timeline {
TimelineRuler::TimelineRuler() :
TimelineRuler::TimelineRuler(
lumiera::gui::widgets::TimelineWidget *timeline_widget) :
Glib::ObjectBase("TimelineRuler"),
timeOffset(-1),
timeScale(1),
mouseChevronOffset(0),
annotationHorzMargin(0),
annotationVertMargin(0),
majorTickHeight(0),
minorLongTickHeight(0),
minorShortTickHeight(0),
minDivisionWidth(100)
{
minDivisionWidth(100),
timelineWidget(timeline_widget)
{
REQUIRE(timelineWidget != NULL);
// Install style properties
register_styles();
}
void
TimelineRuler::set_time_offset(gavl_time_t time_offset)
{
timeOffset = time_offset;
rulerImage.clear();
queue_draw();
}
void
TimelineRuler::set_time_scale(int64_t time_scale)
{
REQUIRE(time_scale > 0);
timeScale = time_scale;
rulerImage.clear();
queue_draw();
}
void
TimelineRuler::set_mouse_chevron_offset(int offset)
{
@ -81,6 +67,13 @@ TimelineRuler::set_mouse_chevron_offset(int offset)
queue_draw();
}
void
TimelineRuler::update_view()
{
rulerImage.clear();
queue_draw();
}
void
TimelineRuler::on_realize()
{
@ -132,8 +125,9 @@ TimelineRuler::on_expose_event(GdkEventExpose* event)
cairo->set_source(rulerImage, 0, 0);
cairo->paint();
// Draw the mouse chevron
// Draw the overlays
draw_mouse_chevron(cairo, allocation);
draw_selection(cairo, allocation);
return true;
}
@ -168,11 +162,15 @@ TimelineRuler::on_size_allocate(Gtk::Allocation& allocation)
void
TimelineRuler::draw_ruler(Cairo::RefPtr<Cairo::Context> cairo,
Gdk::Rectangle ruler_rect)
const Gdk::Rectangle ruler_rect)
{
REQUIRE(cairo);
REQUIRE(ruler_rect.get_width() > 0);
REQUIRE(ruler_rect.get_height() > 0);
REQUIRE(timelineWidget != NULL);
const gavl_time_t left_offset = timelineWidget->timeOffset;
const int64_t time_scale = timelineWidget->timeScale;
// Preparation steps
const int height = ruler_rect.get_height();
@ -187,7 +185,7 @@ TimelineRuler::draw_ruler(Cairo::RefPtr<Cairo::Context> cairo,
cairo->clip();
// Make sure we don't have impossible zoom
if(timeScale <= 0)
if(time_scale <= 0)
return;
// Render ruler annotations
@ -196,16 +194,16 @@ TimelineRuler::draw_ruler(Cairo::RefPtr<Cairo::Context> cairo,
const gavl_time_t major_spacing = calculate_major_spacing();
const gavl_time_t minor_spacing = major_spacing / 10;
int64_t time_offset = timeOffset - timeOffset % major_spacing;
if(timeOffset < 0)
int64_t time_offset = left_offset - left_offset % major_spacing;
if(left_offset < 0)
time_offset -= major_spacing;
int x = 0;
const int64_t x_offset = timeOffset / timeScale;
const int64_t x_offset = left_offset / time_scale;
do
{
x = (int)(time_offset / timeScale - x_offset);
x = (int)(time_offset / time_scale - x_offset);
cairo->set_line_width(1);
@ -241,7 +239,7 @@ TimelineRuler::draw_ruler(Cairo::RefPtr<Cairo::Context> cairo,
void
TimelineRuler::draw_mouse_chevron(Cairo::RefPtr<Cairo::Context> cairo,
Gdk::Rectangle ruler_rect)
const Gdk::Rectangle ruler_rect)
{
REQUIRE(cairo);
REQUIRE(ruler_rect.get_width() > 0);
@ -258,19 +256,55 @@ TimelineRuler::draw_mouse_chevron(Cairo::RefPtr<Cairo::Context> cairo,
cairo->move_to(mouseChevronOffset + 0.5,
ruler_rect.get_height());
cairo->line_to(mouseChevronOffset + mouseChevronSize + 0.5,
ruler_rect.get_height() - mouseChevronSize);
cairo->line_to(mouseChevronOffset - mouseChevronSize + 0.5,
ruler_rect.get_height() - mouseChevronSize);
cairo->rel_line_to(-mouseChevronSize, -mouseChevronSize);
cairo->rel_line_to(2 * mouseChevronSize, 0);
cairo->fill();
}
void
TimelineRuler::draw_selection(Cairo::RefPtr<Cairo::Context> cairo,
const Gdk::Rectangle ruler_rect)
{
REQUIRE(cairo);
REQUIRE(ruler_rect.get_width() > 0);
REQUIRE(ruler_rect.get_height() > 0);
REQUIRE(timelineWidget != NULL);
Glib::RefPtr<Style> style = get_style();
Gdk::Cairo::set_source_color(cairo, style->get_fg(STATE_NORMAL));
// Draw the selection start chevron
const int a = timelineWidget->time_to_x(
timelineWidget->selectionStart) + 1;
if(a >= 0 && a < ruler_rect.get_width())
{
cairo->move_to(a, ruler_rect.get_height());
cairo->rel_line_to(0, -mouseChevronSize);
cairo->rel_line_to(-mouseChevronSize, 0);
cairo->fill();
}
// Draw the selection end chevron
const int b = timelineWidget->time_to_x(
timelineWidget->selectionEnd);
if(b >= 0 && b < ruler_rect.get_width())
{
cairo->move_to(b, ruler_rect.get_height());
cairo->rel_line_to(0, -mouseChevronSize);
cairo->rel_line_to(mouseChevronSize, 0);
cairo->fill();
}
}
gavl_time_t
TimelineRuler::calculate_major_spacing() const
{
int i = 0;
int i;
REQUIRE(timelineWidget != NULL);
const int64_t time_scale = timelineWidget->timeScale;
const gavl_time_t major_spacings[] = {
GAVL_TIME_SCALE / 1000,
GAVL_TIME_SCALE / 400,
@ -298,7 +332,7 @@ TimelineRuler::calculate_major_spacing() const
for(i = 0; i < sizeof(major_spacings) / sizeof(gavl_time_t); i++)
{
const int64_t division_width = major_spacings[i] / timeScale;
const int64_t division_width = major_spacings[i] / time_scale;
if(division_width > minDivisionWidth)
break;

View file

@ -32,26 +32,16 @@
namespace lumiera {
namespace gui {
namespace widgets {
class TimelineWidget;
namespace timeline {
class TimelineRuler : public Gtk::DrawingArea
{
public:
TimelineRuler();
/**
* Sets the time offset. This is the time value displaid at the
* left-hand edge of the ruler.
*/
void set_time_offset(gavl_time_t time_offset);
/**
* Sets the time scale value.
* @param time_scale The scale factor, which is the number of
* microseconds per screen pixel. This value must be greater than
* zero.
*/
void set_time_scale(int64_t time_scale);
TimelineRuler(
lumiera::gui::widgets::TimelineWidget *timeline_widget);
/**
* Sets the offset of the mouse chevron in pixels from the left
@ -59,6 +49,8 @@ public:
* width, the chevron will not be visible.
*/
void set_mouse_chevron_offset(int offset);
void update_view();
/* ===== Events ===== */
protected:
@ -76,10 +68,13 @@ protected:
/* ===== Internals ===== */
private:
void draw_ruler(Cairo::RefPtr<Cairo::Context> cairo,
Gdk::Rectangle ruler_rect);
const Gdk::Rectangle ruler_rect);
void draw_mouse_chevron(Cairo::RefPtr<Cairo::Context> cairo,
Gdk::Rectangle ruler_rect);
const Gdk::Rectangle ruler_rect);
void draw_selection(Cairo::RefPtr<Cairo::Context> cairo,
const Gdk::Rectangle ruler_rect);
gavl_time_t calculate_major_spacing() const;
@ -88,9 +83,6 @@ private:
void read_styles();
private:
// View values
gavl_time_t timeOffset;
int64_t timeScale;
// Indicated values
int mouseChevronOffset;
@ -104,6 +96,9 @@ private:
int minDivisionWidth;
int mouseChevronSize;
// Owner
lumiera::gui::widgets::TimelineWidget *timelineWidget;
// Cached ruler image
Cairo::RefPtr<Cairo::ImageSurface> rulerImage;
};

View file

@ -0,0 +1,75 @@
/*
timeline-tool.hpp - Implementation of the Tool class
Copyright (C) Lumiera.org
2008, Joel Holdsworth <joel@airwebreathe.org.uk>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *****************************************************/
#include "timeline-tool.hpp"
#include "../timeline-widget.hpp"
namespace lumiera {
namespace gui {
namespace widgets {
namespace timeline {
Tool::Tool(TimelineBody *timeline_body) :
timelineBody(timeline_body),
isDragging(false)
{
REQUIRE(timeline_body != NULL);
}
bool
Tool::apply_cursor()
{
REQUIRE(timelineBody != NULL);
Glib::RefPtr<Gdk::Window> window =
timelineBody->get_window();
if(!window)
return false;
window->set_cursor(get_cursor());
return true;
}
void
Tool::on_button_press_event(GdkEventButton* event)
{
REQUIRE(event != NULL);
if(event->button == 1)
isDragging = true;
}
void
Tool::on_button_release_event(GdkEventButton* event)
{
REQUIRE(event != NULL);
if(event->button == 1)
isDragging = false;
}
} // namespace timeline
} // namespace widgets
} // namespace gui
} // namespace lumiera

View file

@ -0,0 +1,75 @@
/*
timeline-tool.hpp - Declaration of the Tool class
Copyright (C) Lumiera.org
2008, Joel Holdsworth <joel@airwebreathe.org.uk>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/** @file timeline-tool.hpp
** This file contains the definition of base class for timeline
** tool objects
*/
#ifndef TIMELINE_TOOL_HPP
#define TIMELINE_TOOL_HPP
#include "../../gtk-lumiera.hpp"
namespace lumiera {
namespace gui {
namespace widgets {
namespace timeline {
class TimelineBody;
enum ToolType
{
None,
Arrow,
IBeam
};
class Tool
{
protected:
Tool(TimelineBody *timeline_body);
public:
virtual ToolType get_type() const = 0;
bool apply_cursor();
virtual void on_button_press_event(GdkEventButton* event);
virtual void on_button_release_event(GdkEventButton* event);
virtual void on_motion_notify_event(GdkEventMotion *event) {}
protected:
virtual Gdk::Cursor get_cursor() const = 0;
protected:
bool isDragging;
TimelineBody *timelineBody;
};
} // namespace timeline
} // namespace widgets
} // namespace gui
} // namespace lumiera
#endif // TIMELINE_TOOL_HPP

View file

@ -27,28 +27,35 @@ namespace gui {
namespace widgets {
namespace timeline {
Track::Track()
{
}
Track::Track() :
label("XHeaderTest")
{
headerWidget.pack_start(label);
}
Gtk::Widget&
Track::get_header_widget()
{
return headerWidget;
}
Glib::ustring
Track::get_title()
{
return "Hello";
}
/*int
{
return "Hello";
}
int
Track::get_height()
{
return get_header_widget().get_allocation().get_height();
}*/
{
return 100;
}
void
Track::draw_track(Cairo::RefPtr<Cairo::Context> cairo)
{
}
{
}
} // namespace timeline
} // namespace widgets

View file

@ -34,20 +34,22 @@ namespace widgets {
namespace timeline {
class Track
{
public:
Track();
{
public:
Track();
Glib::ustring get_title();
Glib::ustring get_title();
virtual Gtk::Widget& get_header_widget() = 0;
Gtk::Widget& get_header_widget();
virtual int get_height() = 0;
int get_height();
virtual void draw_track(Cairo::RefPtr<Cairo::Context> cairo);
void draw_track(Cairo::RefPtr<Cairo::Context> cairo);
protected:
};
protected:
Gtk::VBox headerWidget;
Gtk::Label label;
};
} // namespace timeline

View file

@ -36,128 +36,67 @@ namespace gui {
namespace widgets {
VideoDisplayWidget::VideoDisplayWidget() :
gdkWindow(NULL),
displayer(NULL)
{
set_flags(Gtk::NO_WINDOW);
}
{
}
VideoDisplayWidget::~VideoDisplayWidget()
{
if(displayer != NULL)
delete displayer;
}
{
if(displayer != NULL)
delete displayer;
}
void
VideoDisplayWidget::on_realize()
{
set_flags(Gtk::NO_WINDOW);
{
// Call base class:
Gtk::Widget::on_realize();
// Call base class:
Gtk::Widget::on_realize();
// Set colors
modify_bg(Gtk::STATE_NORMAL, Gdk::Color("black"));
// Create the GdkWindow:
GdkWindowAttr attributes;
memset(&attributes, 0, sizeof(attributes));
if(displayer != NULL)
delete displayer;
displayer = createDisplayer(this, 320, 240);
Gtk::Allocation allocation = get_allocation();
// Set initial position and size of the Gdk::Window:
attributes.x = allocation.get_x();
attributes.y = allocation.get_y();
attributes.width = allocation.get_width();
attributes.height = allocation.get_height();
attributes.event_mask = get_events () | Gdk::EXPOSURE_MASK;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.wclass = GDK_INPUT_OUTPUT;
gdkWindow = Gdk::Window::create(get_window() /* parent */, &attributes,
GDK_WA_X | GDK_WA_Y);
unset_flags(Gtk::NO_WINDOW);
set_window(gdkWindow);
// Set colors
modify_bg(Gtk::STATE_NORMAL, Gdk::Color("black"));
// Make the widget receive expose events
gdkWindow->set_user_data(gobj());
if(displayer != NULL)
delete displayer;
displayer = createDisplayer(this, 320, 240);
add_events(Gdk::ALL_EVENTS_MASK);
}
void
VideoDisplayWidget::on_unrealize()
{
gdkWindow.clear();
//Call base class:
Gtk::Widget::on_unrealize();
}
add_events(Gdk::ALL_EVENTS_MASK);
}
bool
VideoDisplayWidget::on_button_press_event (GdkEventButton* event)
{
unsigned char buffer[320 * 240 * 4];
{
unsigned char buffer[320 * 240 * 4];
for(int i = 0; i < 320*240*4; i++)
buffer[i] = rand();
for(int i = 0; i < 320*240*4; i++)
buffer[i] = rand();
displayer->put((void*)buffer);
displayer->put((void*)buffer);
return true;
}
bool
VideoDisplayWidget::on_expose_event(GdkEventExpose* event)
{
// This is where we draw on the window
/*Glib::RefPtr<Gdk::Window> window = get_window();
if(window)
{
Cairo::RefPtr<Cairo::Context> cr = window->create_cairo_context();
if(event)
{
// clip to the area that needs to be re-exposed so we don't draw any
// more than we need to.
cr->rectangle(event->area.x, event->area.y,
event->area.width, event->area.height);
cr->clip();
}
// Paint the background
cr->set_source_rgb(0.0, 0.0, 0.0);
cr->paint();
}*/
return true;
}
return true;
}
Displayer*
VideoDisplayWidget::createDisplayer( Gtk::Widget *drawingArea, int width, int height )
{
REQUIRE(drawingArea != NULL);
REQUIRE(width > 0 && height > 0);
Displayer *displayer = NULL;
displayer = new XvDisplayer( drawingArea, width, height );
if ( !displayer->usable() )
{
delete displayer;
displayer = NULL;
}
{
REQUIRE(drawingArea != NULL);
REQUIRE(width > 0 && height > 0);
Displayer *displayer = NULL;
displayer = new XvDisplayer( drawingArea, width, height );
if ( !displayer->usable() )
{
delete displayer;
displayer = NULL;
}
if ( displayer == NULL )
{
displayer = new GdkDisplayer( drawingArea, width, height );
}
if ( displayer == NULL )
{
displayer = new GdkDisplayer( drawingArea, width, height );
}
return displayer;
}
return displayer;
}
} // namespace widgets
} // namespace gui

View file

@ -36,34 +36,29 @@ namespace lumiera {
namespace gui {
namespace widgets {
class VideoDisplayWidget : public Gtk::Widget
{
public:
VideoDisplayWidget();
class VideoDisplayWidget : public Gtk::DrawingArea
{
public:
VideoDisplayWidget();
~VideoDisplayWidget();
~VideoDisplayWidget();
/* ===== Overrides ===== */
private:
virtual void on_realize();
/* ===== Overrides ===== */
private:
virtual void on_realize();
virtual void on_unrealize();
virtual bool on_expose_event(GdkEventExpose* event);
// TEST CODE!!!!
virtual bool on_button_press_event (GdkEventButton* event);
// TEST CODE!!!!
virtual bool on_button_press_event (GdkEventButton* event);
/* ===== Internals ===== */
private:
static Displayer*
createDisplayer( Gtk::Widget *drawingArea, int width, int height );
/* ===== Internals ===== */
private:
static Displayer*
createDisplayer( Gtk::Widget *drawingArea, int width, int height );
private:
private:
Glib::RefPtr<Gdk::Window> gdkWindow;
Displayer *displayer;
};
Displayer *displayer;
};
} // namespace widgets
} // namespace gui

View file

@ -95,37 +95,65 @@ void
Actions::register_stock_items()
{
RefPtr<IconFactory> factory = IconFactory::create();
add_stock_item(factory, "assets-panel.png", "assets_panel", _("_Assets"));
add_stock_item(factory, "timeline-panel.png", "timeline_panel", _("_Timeline"));
add_stock_item(factory, "viewer-panel.png", "viewer_panel", _("_Viewer"));
add_stock_item_set(factory, "assets-panel.png", "assets_panel", _("_Assets"));
add_stock_item_set(factory, "timeline-panel.png", "timeline_panel", _("_Timeline"));
add_stock_item_set(factory, "viewer-panel.png", "viewer_panel", _("_Viewer"));
add_stock_item_set(factory, "arrow.png", "arrow", _("_Arrow"));
add_stock_item_set(factory, "i-beam.png", "i_beam", _("_I-Beam"));
factory->add_default(); //Add factory to list of factories.
}
void
Actions::add_stock_item(const Glib::RefPtr<IconFactory>& factory,
const Glib::ustring& filepath,
const Glib::ustring& id, const Glib::ustring& label)
bool
Actions::add_stock_item_set(const Glib::RefPtr<IconFactory>& factory,
const Glib::ustring& filename,
const Glib::ustring& id,
const Glib::ustring& label)
{
Gtk::IconSet icon_set;
add_stock_icon_source(icon_set, 16, filename);
add_stock_icon_source(icon_set, 22, filename);
add_stock_icon_source(icon_set, 24, filename);
add_stock_icon_source(icon_set, 32, filename);
add_stock_icon_source(icon_set, 48, filename);
if(!icon_set.get_sizes().empty())
{
const Gtk::StockID stock_id(id);
factory->add(stock_id, icon_set);
Gtk::Stock::add(Gtk::StockItem(stock_id, label));
return true;
}
return false;
}
bool
Actions::add_stock_icon_source(Gtk::IconSet &icon_set,
int size, const Glib::ustring& filename)
{
Gtk::IconSource source;
try
{
//This throws an exception if the file is not found:
source.set_pixbuf( Gdk::Pixbuf::create_from_file(filepath) );
source.set_pixbuf( Gdk::Pixbuf::create_from_file(
Glib::ustring::compose("%1x%1/%2", size, filename) ) );
}
catch(const Glib::Exception& ex)
{
g_message(ex.what().c_str());
return false;
}
source.set_size(Gtk::ICON_SIZE_SMALL_TOOLBAR);
source.set_size_wildcarded(); //Icon may be scaled.
source.set_size(IconSize(size));
//source.set_size_wildcarded(); // Icon may be scaled.
Gtk::IconSet icon_set;
icon_set.add_source(source); //More than one source per set is allowed.
icon_set.add_source(source);
const Gtk::StockID stock_id(id);
factory->add(stock_id, icon_set);
Gtk::Stock::add(Gtk::StockItem(stock_id, label));
return true;
}
void

View file

@ -53,9 +53,14 @@ class WorkspaceWindow;
* labels associated with IDs */
static void register_stock_items();
static void add_stock_item(const Glib::RefPtr<Gtk::IconFactory>& factory,
const Glib::ustring& filepath,
const Glib::ustring& id, const Glib::ustring& label);
static bool add_stock_item_set(
const Glib::RefPtr<Gtk::IconFactory>& factory,
const Glib::ustring& filename,
const Glib::ustring& id,
const Glib::ustring& label);
static bool add_stock_icon_source(Gtk::IconSet &icon_set,
int size, const Glib::ustring& filename);
/**
* Updates the state of the menu/toolbar actions