#
# Main PDFEdit configuration file
#
# User configuration is in ~/.pdfedit/pdfeditrc
# and can override anything defined here
# Note that ~/.pdfedit/pdfeditrc have similar,
# but slightly different format (no comments supported)
# and is automatically updated when the editor exits
#
# Any line starting with '#' is comment.
# '#' characters are not processed as comment,
# if they appear in middle of key or value,
# i.e. not starting on beginning of the line (excluding the whitespace)
#
# If the line contain section name in square brackets, it mean that the
# section name is used as prefix for any future keys, until another
# section name is encountered. Note that "/" character is added to
# the prefix, so for example:
#
#  [sect/one]
#  key1 = value1
#  key2 = anothervalue
#
# This will add two keys to settings:
#  key "sect/one/key1" with value "value1"
#  key "sect/one/key2" with value "anothervalue"
#
# Any whitespace characters from start or end of the line are stripped.
# Whitespaces between name of the key and "=" character are stripped too,
# as are whitespaces between "=" character and the value.
#
# It is assumed, that this file is in utf-8 encoding
#

[gui/items]

# Format of menu/toolbar lists: list [name],[child itemss...]
# Format of menu/toolbar items: item [name],[called script],[keyboard shortcut],[icon],[item classes]

# Main menu structure
MainMenu	= list Main menu,filemenu,editopersmenu,showmenu,pagemenu,toolsmenu,helpmenu

  #File submenu
  filemenu		= list &File,fload,fsave,fcopyrevision,fsaverev,fsaveastext,-,neww,closew,-,quit
    fload		= item &Open...		 , func_load()		,F3	, load.png
    fsave		= item &Save		 , func_save()		,F2	, save.png	 ,need_document
    fsaverev		= item Save new &revision, func_saverev()	,	, save.png	 ,need_document
    fcopyrevision		= item &Copy current revision	 , func_clonerevision()	,	, save.png	 ,need_document
    fsaveastext		= item Save as text...   , func_saveastext()	,	, save.png	 ,need_document
    neww		= item New &Window	 , newwindow()		,Ctrl+N	, new_window.png
    closew		= item Close Window	 , closewindow		,	, close.png
    quit		= item &Quit		 , quit
  #View submenu
  showmenu		= list &View,firstpage,prevpage,nextpage,lastpage,-,zoom_in,zoom_out,-,hideCmd,hideProp,hideTree,hideStatus,-,searchText
    firstpage		= item First Page			, PageSpace.firstPage()		, Ctrl+Home	, first.png 		,need_page
    prevpage		= item Prev Page			, PageSpace.prevPage()		, Ctrl+PgUp	, prev.png 		,need_page
    nextpage		= item Next Page			, PageSpace.nextPage()		, Ctrl+PgDown	, next.png 		,need_page
    lastpage		= item Last Page			, PageSpace.lastPage()		, Ctrl+End	, last.png 		,need_page
    zoom_in		= item Zoom &in				, PageSpace.zoomIn()		, Ctrl++	, zoom_in.png		,need_page
    zoom_out		= item Zoom &out			, PageSpace.zoomOut()		, Ctrl+-	, zoom_out.png		,need_page
    hideCmd		= item Show/Hide &commandline		, showHide('commandline'\,'hideCmd')	, F8		, hide_cmdline.png
    hideProp		= item Show/Hide &property editor	, showHide('propertyeditor'\,'hideProp')	, Ctrl+Alt+P	, hide_propedit.png
    hideTree		= item Show/Hide object &tree		, showHide('tree'\,'hideTree')		, Ctrl+Alt+T	, hide_tree.png
    hideStatus		= item Show/Hide &status bar		, showHide('statusbar'\,'hideStatus')		, Ctrl+Alt+S	, hide_statusbar.png
    searchText		= item &Find text			, findText()			, Ctrl+F	, searchText.png	,need_page
  #Tools submenu
  toolsmenu		= list &Tools,opts,mergeDoc
    opts		= item &Options,options(),F9,options.png
    mergeDoc		= item &Insert Pages from other document,mergeDocument(),,insert_pages.png,need_rw
  #Page submenu
  pagemenu		= list &Page,savepage,reloadpage,pagetext,-,rot-90,rot90,pageRemove,-,editPageMediaBox,addSystemFont,setpagetm,-,drawlinee,drawrecte,addtext,striketrough,highlightingtext
    savepage		= item Save page as image...	, savePageImage(false)	,	, save_page_as_image.png,need_page
    reloadpage		= item Reload Page (show changes), go()			, F5	, reload.png		,need_page_rw
    pagetext		= item Extract text from page	, viewPageText()	,	, page_text.png		,need_page
    rot-90		= item Rotate page 270 degrees	, rotatePage(-90)	,Ctrl+[	, page_rotate_-90.png	,need_page_rw
    rot90		= item Rotate page 90 degrees	, rotatePage(90)	,Ctrl+]	, page_rotate_90.png	,need_page_rw
    pageRemove		= item Remove page		, delCurrentPage()	,	, page_delete.png	,need_page_rw
    editPageMediaBox	= item Edit page metrics	, editPageMediaBox()	,	, page_edit_metrics.png	,need_page_rw
    setpagetm		= item Set page transformation matrix,setPageTm()	,	, page_settm.png	,need_page_rw
    addSystemFont	= item Add system font to page	, addSystemFont()	,	, page_add_font.png	,need_page_rw
  #Edit submenu
  editopersmenu		= list &Edit,selectAllObjects,selectGraphical,selectText,selectAnnot,-,opsetcolor,opsetfont,opsetposop,opsetpos,-,opsetdash,opsetlinewidth
    selectAllObjects	= item Select all objects		, onSelectMode_AllObjects()		, , selectmode_allobjects.png	,mode_button
    selectGraphical	= item Select graphical operators	, onSelectMode_GraphicalOperators()	, , selectmode_all_gfx.png	,mode_button
    selectText		= item Select text			, onSelectMode_Text()			, , selectmode_text.png		,mode_button
    selectAnnot		= item Select annotations		, onSelectMode_Annot()			, , selectmode_all.png		,mode_button
    opsetcolor		= item Set color		,setOpColor()		,	, operator_setcolor.png		,need_operator,need_rw
    opsetposop		= item Set relative position of operator,moveOperPos()	,	, operator_setrelposop.png	,need_operator,need_rw
    opsetpos		= item Change relative position	,moveTextPos()		,	, operator_setrelpos.png	,need_operator,need_rw
    opsetfont		= item Set font			,editFontProps()	,	, operator_editfont.png		,need_operator,need_rw
    opsetdash		= item Set line dash style	,setDashPattern()	,	, operator_dashpattern.png	,need_operator,need_rw
    opsetlinewidth	= item Set line width		,setLineWidth()		,	, operator_linewidth.png	,need_operator,need_rw
  #Help submenu
  helpmenu		= list &Help,help_about,help_index
    help_about		= item &About	,about()	,	, about.png
    help_index		= item &Help	,help()		, F1	, help.png

#Toolbars. Most toolbar items are items from menu

SelectionModeToolbar	= list Selection mode Toolbar,selectAllObjects,selectGraphical,selectText,selectAnnot
  # look in menu for definition of items

MainToolbar		= list Main Toolbar,fload,fsave,opts,closew,hideCmd
  # look in menu for definition of items

PageToolbar		= list Page Toolbar,reloadpage,-,rot-90,rot90,editPageMediaBox,addSystemFont,setpagetm,pagetext,-,zoom_out,_zoom_tool,zoom_in,-,pageMoveUp,pageMoveDown,pageRemove
PageRiderToolbar	= list PageRider Toolbar,firstpage,prevpage,_page_tool,nextpage,lastpage
  # _page_tool is special toolbar item to show/change current page
  # _zoom_tool is special toolbar item to show/change current zoom level
  # look in menu for definition of rest of items
  pageMoveUp		= item Move page up,movePage(page()\,-1);rootReload(),,page_move_up.png,need_page_rw
  pageMoveDown		= item Move page down,movePage(page()\,1);rootReload(),,page_move_down.png,need_page_rw

DrawToolbar		= list Draw Toolbar,drawlinee,drawarrowe,drawrecte,addtext,striketrough,highlightingtext,-,_color_tool fg,_color_tool bg,_number_tool linewidth
  drawline		= item Draw line		, onSelectMode_drawLine()		, , draw_line.png	,need_page,mode_button,need_rw
  drawlinee		= item Draw line		, onSelectMode_drawLinee()		, , draw_line.png	,need_page,mode_button,need_rw
  drawarrow		= item Draw arrow		, onSelectMode_drawArrow()		, , draw_arrow.png	,need_page,mode_button,need_rw
  drawarrowe		= item Draw arrow		, onSelectMode_drawArrowe()		, , draw_arrow.png	,need_page,mode_button,need_rw
  drawrect		= item Draw rectangle		, onSelectMode_drawRect()		, , draw_rect.png	,need_page,mode_button,need_rw
  drawrecte		= item Draw rectangle		, onSelectMode_drawRecte()		, , draw_rect.png	,need_page,mode_button,need_rw
  addtext		= item Add text			, onSelectMode_addText()		, , add_text.png	,need_page,mode_button,need_rw
  striketrough		= item Strike through		, onSelectMode_strikeTrough()		, , selectmode_strike.png	,need_page,mode_button,need_rw
  highlightingtext	= item Highlighting text	, onSelectMode_highlightingText()	, , selectmode_hilite.png	,need_page,mode_button,need_rw
  # _color_tool is special toolbar item to select current color
  # _number_tool is special toolbar item to select line width
  # look in menu for definition of rest of items

TextToolBar		= list Text Toolbar,_select_tool fontface,_number_tool fontsize
  # _select_tool is special toolbar item to select font face
  # _number_tool is special toolbar item to select font size
  # _edit_tool is special toolbar item to modify text

RevisionToolbar		= list Revision Toolbar,revlabel,_revision_tool
  revlabel		= label Revisions
  # _revision_tool is special toolbar item to list/change revisions

OperatorToolbar		= list Operator Toolbar,opsetcolor,opsetfont,opsetlinewidth
  # look in menu for definition of items

TreeViewToolbar		= list TreeView Toolbar,treeAdditem,treeDelitem
  treeAdditem		= item Add object	,add_obj_dlg()		, Ins	, item_add.png		,need_dict_or_array_p
  treeDelitem		= item Delete object	,deleteObjectsInTree()	, Del	, item_delete.png	,need_removable

DynamicToolBar		= list Dynamic Toolbar,streamAll,streamText,streamFont,streamGfx,_edit_tool text
  streamAll		= item Show all operators in stream		, streamMode('all')	,		, stream_mode_all.png	,need_contentstream_root
  streamText		= item Show only text operators in stream	, streamMode('text')	,		, stream_mode_text.png	,need_contentstream_root
  streamFont		= item Show only font operators in stream	, streamMode('font')	,		, stream_mode_font.png	,need_contentstream_root
  streamGfx		= item Show only graphical operators in stream	, streamMode('graphic')	,		, stream_mode_gfx.png	,need_contentstream_root

#Generic popup menu
popup_generic	= list Popup menu,tree_string,tree_type,tree_childs
  tree_string	= item Show String representation	,print(firstSelected().getText()),,string_representation.png
  tree_type	= item Show Item type			,print(firstSelectedItem().itemtype())	,,item_type.png
  tree_childs	= item Show Tree Childs			,printTreeChilds()			,,tree_childs.png

# Rest of this file is ordinary configuration

[gui]
#Which toolbars are available for use
toolbars	= MainToolbar,PageToolbar,DrawToolbar,RevisionToolbar,OperatorToolbar,SelectionModeToolbar,TextToolBar,TreeViewToolbar,PageRiderToolbar,DynamicToolBar

init_focus	= pagespace

[gui/PageSpace]
#Settings affecting preview window
ResizingZone	= 2
ViewedUnits	= cm

[gui/CommandLine]
# Commandline settings
HistoryFileItemSeparator	= <EndItem>
HistoryFile	= $HOME/.pdfedit/history
HistorySize	= 20
CmdShowEditor	= true
CmdShowHistory	= true
CmdShowLine	= true

[gui/windowstate]
main		= 796,608,10,2
spl_left	= 369,172
spl_main	= 517,269
spl_right	= 367,174
spl_cmd		= 81,74


[icon]
		  # Default icon theme
theme/current	= hicolor
		  # Application icon
app		= pdfedit_icon_32.png

[tree]
# What type of items to show in tree view
show_annot	= 1
show_dict	= 1
show_graphic	= 1
show_objdict	= 1
show_page	= 1
show_simple	= 1

[path]
	  # Icon path - where to search for icons?
icon	= $HOME/.pdfedit/icon;$PDFEDIT_DATA/icon;$PDFEDIT_BIN/icon
	  # Script path - where to search for scripts?
script	= $HOME/.pdfedit;$PDFEDIT_DATA;$PDFEDIT_BIN;.
	  # Help path - where to search for help files?
help	= $PDFEDIT_DATA/help/$LANG;$PDFEDIT_BIN/help/$LANG;$PDFEDIT_DATA/help;$PDFEDIT_BIN/help

[script]
	  	  # List of scripts which are executed on application start
init	  	= $PDFEDIT_DATA/init.qs;$PDFEDIT_BIN/init.qs;$HOME/.pdfedit/userinit.qs
		  # List of scripts which are executed on application start in console mode
init_console	= $PDFEDIT_DATA/init_console.qs;$PDFEDIT_BIN/init_console.qs;$HOME/.pdfedit/userinit_console.qs
		  # List of paths from which scripts are executed, GUI (see documentation for details)
init_path 	= $PDFEDIT_DATA/scripts;$PDFEDIT_BIN/scripts;$HOME/.pdfedit/scripts
		  # List of paths from which scripts are executed, console (see documentation for details)
init_path_console = $PDFEDIT_DATA/scripts/console;$PDFEDIT_BIN/scripts/console;$HOME/.pdfedit/scripts/console

[modecontroller]
	  # Modecontroller configuration files. First file that is found is used and the rest is ignored
config	= $HOME/.pdfedit/mode.conf;$PDFEDIT_DATA/mode.conf;$PDFEDIT_BIN/mode.conf

[operatorhint]
	  # Operator hinter configuration file (database) First file that is found is used and the rest is ignored
config	= $HOME/.pdfedit/operator.hint.$LANG;$PDFEDIT_DATA/operator.hint.$LANG;$PDFEDIT_BIN/operator.hint.$LANG;$HOME/.pdfedit/operator.hint;$PDFEDIT_DATA/operator.hint;$PDFEDIT_BIN/operator.hint
