Difference between revisions of "Foobar2000:Components 0.9/Panel Stack Splitter (foo uie panel splitter)"

From Hydrogenaudio Knowledgebase
Jump to: navigation, search
(added the Japanese read me translation)
(37 intermediate revisions by 7 users not shown)
Line 2: Line 2:
 
{{stub}}
 
{{stub}}
  
'''foo_uie_panel_splitter''' is an extension for Columns UI that allows you to place objects freely within the foobar2000 window, including panels, text (e.g., track info), and images.
+
Panel Stack Splitter is a ColumnsUI extension for advanced placement and scripting of panels.  It functions as a splitter in the ColumnsUI panel hierarchy (i.e., it can contain other panels).
  
foobar2000 v0.9.4.3+, Columns UI0.1.3 beta1 v7+
+
= Function and Use =
 +
Panel Stack Splitter is an extension for ColumnsUI which allows for greater control over the arrangement of panels. Not only can any panel be positioned freely within the Foobar2000 window, but the splitters themselves can be scripted, the panels can be resized using the cursor or by scripted actions, and panels can be hidden and displayed according to your script. It includes functions which make it easy to create graphical buttons and dynamic layouts. It can replace any number of more specific panels, such as those intended for displaying album art or track information.
  
= Requirements =
+
Common uses include the creation of interfaces which reconfigure themselves automatically depending on the window size, panel-switching arrangements, and of course, all manner of window dressing.  It's often used alongside other plugins such as [[Foobar2000:Components 0.9/ELplaylist panel (foo uie elplaylist) | ELPlaylist]] and [[Foobar2000:Components 0.9/WSH panel (foo uie wsh panel)| WSH Panel]] to construct elaborate custom interfaces, but be warned that the results of such efforts are, unlike Foobar2000 itself, not always efficient or stable.
* [http://www.foobar2000.org/ foobar2000 0.9.4.3+]
+
* Columns UI 0.1.3 beta1 v7+
+
  
 +
= Authorship =
 +
Panel Splitter was written by '''ssenna''', who is also the author of [[Foobar2000:Components 0.9/ELplaylist panel (foo uie elplaylist) | ELPlaylist]].  Many of the functions are similar and both plug-ins work well together.<!--Columns UI panel to place the splitter
 +
And without borders, or a little over a panel and set the highest possible degree of freedom.
 +
Has been stable or loose?-->
  
 +
= Requirements =
 +
* foo_uie_panel_splitter.dll v0.3.8.3a (2009/12/11)
 +
* [http://www.foobar2000.org/ foobar2000 v0.9.5.2+]
 +
* [http://yuo.be/columns.php Columns UI 0.3+]
  
= Read me (translated from the Japanese original) =
+
= Reference =
 +
The following documentation is an imperfect translation and adaptation from the original Japanese readme.  Until the page has been more thoroughly re-written, expect some confusing passages.
  
foo_uie_panel_splitter.dll v0.3.6.3 (alpha ver)
+
== Introduction ==
  for foobar2000 v0.9.5.1 +, Columns UI0.3 +, WindowsXP +
+
After installing the plug-in, in the options dialog under ColumnsUI's Layout tab you'll be able to add a Panel Stack Splitter to your layout and configure it. Once you've added a Panel Stack Splitter you can also edit it by right-clicking the panel and choosing ''Configure'' from the context menuThe relationship between Panel Stack Splitters and the resulting layout may initially be confusing. In theory, one could place all their panels under a single Panel Stack Splitter to achieve any layout, but in practice you will generally want to employ them more like traditional horizontal and vertical splitters, nesting hierarchically.
  
Columns UI panel to place the splitter
+
== Splitter Settings dialog ==
And without borders, or a little over a panel and set the highest possible degree of freedom.  
+
The Splitter Settings dialog has four tabs, ''PanelList, Script, Behavior'' and ''Global variables''.
Has been stable or loose?
+
  
 +
''PanelList'' shows subordinate panels and allows you to define their names, positions and sizes.  ''Script'' allows you to script the Splitter panel itself; this is where you would define buttons, text to display, or scripts which alter the layout or operate invisibly.  ''Behavior'' presents options related to how the Splitter is rendered and how it executes scripts, and ''Global variables'' lets you view and delete currently active global variables. <!--Placement of the panel and automatic alignment mode, forced mode is set. Auto-deploy mode, a horizontal (Horizontal) or placed in a vertical direction (Vertical) or choose a place. Forced layout mode that is placed on the force placed on the panel.-->
  
 +
=== PanelList ===
 +
You can't add subordinate panels from this tab -- for this you must return to the ColumnsUI layout options.  But once you've added panels, you can select them from the left box in this tab and define their display parameters at the right.  Note that there is one option on this tab which is for the Splitter itself rather than its children; this is ''Panel placement mode'', which allows you to select horizontal or vertical position.  This parameter is irrelevant for forced layouts.
  
Description
+
All fields accept numbers as pixel positions and widths by default, though you can switch to percentage values instead when in forced modeYou can use Titleformatting Script in all of these fields, which is often important for forced layouts if you want them to be resizeable.
Add and remove panels from the basic layout of the ColumnsUI do.  
+
  They can add from the context menu.  
+
  
  Placement of the panel and automatic alignment mode, forced mode is set.  
+
; Caption : This allows you to assign a unique name to the panel in question. In addition to providing a convenient label for the panel for when you're editing, this allows you make direct reference to the panel is scripts later on, for example if you wanted to display, hide or resize it.
  Auto-deploy mode, a horizontal (Horizontal) or placed in a vertical direction (Vertical) or choose a place.  
+
; Size : Defines the size of the panel, but only if you are using a non-forced layout.  Size means width when in horizontal panel placement mode and height when in vertical panel placement mode.
  forced layout mode that is placed on the force placed on the panel.  
+
; Padding : These values define padding between the edges of the panel's allotted space (''size'') and the actual panel.
 +
; Lock size : This disables the user from resizing the panel using the mouse. Only applies to non-forced layout mode; in forced-layout mode this is already defaultThe original documentation provides further details about this option, including a caveat that seems to address the possibility of blurred pixels, but the auto-translation is garbled.<!-- a place without scaling.
 +
** off when the size of each panel to be placed according to the Splitter and the appropriate scaling for size.
 +
** ± 1 to lock the current situation that would blur pixel minutes.
 +
*** So hard to fix, could not fix.-->
 +
; Forced layout : This option allows you to directly determine the position and size of a panel.  Turning it on disables ''Size'' and (by default) padding and makes ''panel placement mode'' irrelevant.  Panels can even overlap, though you generally would only want to do this if you intend to provide a way to switch between them.  Left and Right are measurements from the upper-left (0,0) of the panel.
 +
:* [[Foobar2000:Title Formatting Reference | Title Formatting script]] is enabled and you can use <tt>%_width%</tt> and <tt>%_height%</tt> to call the current width and height of the Splitter itself.
 +
:* If two panels overlap, by default the one that renders in front is determined by the sequence of panels as defined in the ColumnsUI options. ''[?]''
 +
:* '''Example.''' This would always expand the panel to the width of the splitter minus 400 pixels:
 +
        Width: $sub(%_width%,400)
 +
:* '''Example.''' This would make the panel always fill the lower half of the available space:
 +
        Top: $div(%_height%,2)
 +
        Height: $div(%_height%,2)
 +
; Use percentage value : This option makes Panel Splitter interpret the values in Left, Top, Width and Height as percentages of available space instead of pixel measurements. Thus the second example above could be written as ''Top: 50'' and ''Height: 50''.
 +
; Enable padding settings: This option re-enables the padding values defined for non-forced-layout mode.  Though this may seem redundant when you can simply include the padding in your position and size values, it may be useful for percentage-based layouts.
 +
; Ignore panel size limits : ''This seems to be undocumented'', but allows for sizes lower or higher than default caps. For example, the seekbar will display as 20px high if any value below 20px is entered into the Height field unless this box is checked.
 +
; Hide panel on startup : This rather straight-forward option does precisely what its name indicates.  To later make the panel visible, you would use a script function such as <tt>$showpanel_c</tt>.
 +
<!--If you stacked the panel appears on the front panel as a list of the top panel (But depends on the implementation of the child panel. I have come to the front panel profusely.)
 +
%_width% %_height% in the horizontal width of the Panel Stack Splitter, you can see the vertical width.
 +
Example:
 +
left: $div(%_width%,4)
 +
top: $div(%_height%,4)
 +
width: $div(%_width%,2)
 +
height: $div(%_height%,2)
  
 +
Also, Splitter mode to specify a value relative to size.
 +
is on the use percentage value is, Splitter percentage for the size of the [0-100] can be specified.
 +
use percentage value of setting example:
 +
left: 25
 +
top: 25
 +
width: 50
 +
height: 50
 +
-->
  
size: size of the display panel (Horizontal size if horizontal, Vertical Vertical size of it)
+
=== Script Tab ===
lock size: a place without scaling.
+
              off when the size of each panel to be placed according to the Splitter and the appropriate scaling for size.
+
              ± 1 to lock the current situation that would blur pixel minutes.
+
              -> So hard to fix, could not fix.
+
  
forced layout: left Top width right under it to force the panel to be placed in the specified range.  
+
titleformat mode on startup: when you start the TitleFormat PerTrack modes.
              (size and auto-scaling is disabled)  
+
* now playing TF play that track
 +
* follow cursor on the selected tracks in playlist
 +
* last mode at the end of the previous mode (the switch mode button to save)
  
              If you stacked the panel appears on the front panel as a list of the top panel
 
              (But depends on the implementation of the child panel. I have come to the front panel profusely.)
 
              Title Formatting is enabled.
 
              % _width%% _height% in the horizontal width of the Panel Stack Splitter, you can see the vertical width.
 
              Example:
 
              left: $ div (% _width%, 4)
 
              top: $ div (% _height%, 4)
 
              width: $ div (% _width%, 2)
 
              height: $ div (% _height%, 2)
 
  
              Also, Splitter mode to specify a value relative to size.  
+
* title formatting script:
              is on the use parsentage value is, Splitter percentage for the size of the [0-100] can be specified.  
+
Titleformat here to describe, and decorative backgrounds. However, the child is on the panel can not be drawn.
              use parsentage value of setting the example on:
+
              left: 25
+
              top: 25
+
              width: 50
+
              height: 50
+
  
 +
Extended Command Reference
 +
Sensitive argument, or optional, and not implemented.
 +
Note: Do not waste the space. (Carriage return accepted)
  
padding: Add a space around the panel.  
+
in title formatting script is evaluated,
              Title Formatting to put the numbers are fixed, so invalid.  
+
* Today
              If the automatic alignment panels, padding can be resized with the mouse as if the border is set.  
+
* Per Track: track and play and play·When the user changes the size of the state changed when paused. Function when the REFRESH button.
              enable resizable border with on / off can be
+
* Per Second: second, when a change in the state play in the function when the REFRESH button.
  
caption: The name of the panel, the identifier
+
[Note]
use background color: the color specified, the background fill.  
+
* Per Second, especially that not only can handle high-stress functions.
use image: specify a fixed background image. TitleFormatting is disabled.
+
* GDI is recommended that you use the drawing functions.
pseudo transparent: splitter to simulate a transparent background. (splitter and if you use the nest)
+
  
[Note]
+
=== Behaviour Tab ===
  ColumnsUI in the panel is to present the panel with the transparent background feature,
+
* use background color: the color specified, the background fill.
  use background color or use image backgrounds are often not transparent and does not use the panel.
+
* use image: specify a fixed background image. TitleFormatting is disabled.
 +
* pseudo transparent: splitter to simulate a transparent background. (splitter and if you use the nest)
  
 +
[Note]
 +
* ColumnsUI in the panel is to present the panel with the transparent background feature, use background color or use image backgrounds are often not transparent and does not use the panel.
  
titleformat mode on startup: when you start the TitleFormat PerTrack modes.
+
=== Global variables Tab ===
      now playing TF play that track
+
      follow cursor on the selected tracks in playlist
+
      last mode at the end of the previous mode (the switch mode button to save)
+
+
  
title formatting script:
+
== Fields ==
Titleformat here to describe, and decorative backgrounds. However, the child is on the panel can not be drawn.
+
  
Extended Command Reference
+
=== %ps_width% ===
Sensitive argument, or optional, and not implemented.
+
Returns the width of the Splitter
Note: Do not waste the space. (Carriage return accepted)
+
  
in title formatting script is evaluated,
+
=== %ps_height% ===
Today
+
Returns the height of the Splitter
Per Track: track and play and play・When the user changes the size of the state changed when paused. Function when the REFRESH button.
+
Per Second: second, when a change in the state play in the function when the REFRESH button.
+
  
[Note]
+
=== %ps_tfmode% ===
Per Second, especially that not only can handle high-stress functions.  
+
TF mode returns. (Per Track when enabled)
GDI is recommended that you use the drawing functions.
+
* 0 nowplaying mode
 +
* 1 follow cursor mode
  
[Field]
+
=== %ps_isplaying% ===
% ps_width%  
+
Whether during playback
  Returns the width of the Splitter
+
  
 +
=== %ps_ispause% ===
 +
Whether suspended
  
% ps_height%  
+
=== %ps_foobar2000_path% ===
  Returns the height of the Splitter
+
Foobar2000 executable path
  
 +
=== %ps_user_profile_path% ===
 +
User profile path
  
% ps_tfmode%  
+
=== %ps_playback_order% ===
    TF mode returns. (Per Track when enabled)  
+
Returns the playback order.
    0 nowplaying mode
+
However, playback order can not be immediately reflected in the change.(REFRESH commands are required)
    1 follow cursor mode
+
  
 +
=== %ps_track_state% ===
 +
TF mode returns state of the player, whether a track is present or not.
 +
* 0 no error
 +
* 1 no track
 +
* 2 dummy track (for mainly legacy metadb_display_hook API)
  
% ps_isplaying%
+
== Functions ==
Whether during playback
+
  
% ps_ispause%
+
=== $init_ps_global(name,value) ===
Whether suspended
+
  
 +
Valid only if there is no global variable name specified.
  
% ps_foobar2000_path%
+
All global variables are shared between each of the TF although the PanelStackSplitter evaluation order is undefined.
Foobar2000 executable path
+
Persistency = 1 variable is set, $delete_ps_gobal you use will be saved until you delete from the settings dialog.
 +
$Init_ps_global(name,value) is, $if($get_ps_global(name),,$set_ps_global(name,value)) and almost equivalent.
  
 +
=== $init_ps_global(name,value,persistency) ===
  
[Function]
+
Persistency - whether to save at the end.
$ font (name, size, OPTIONS)  
+
* 0 not saved on exit
Font settings.
+
* 1 saved on exit (default)
OPTIONS: bold italic underline strikeout
+
  
Example: $ font (Tahoma, 10, bold italic)  
+
$init_ps_global(NAME,VALUE,0) implies that the global variable "NAME" is deleted when quitting foobar2000.
  
 +
=== $set_ps_global(name,value) ===
  
$ drawstring (text, x, y, W, H, rgba, OPTIONS [, OPTIONS2])
+
=== $get_ps_global(nameor %name% ===
String drawing functions.
+
Text coordinates (x, y) to draw on.
+
  [Note] This function is a string and DrawText drawtextex not only in view.
+
  Maybe only TrueType fonts.
+
  
OPTIONS: Alain specified, the specified quality of drawing, and to specify the clip.
+
=== $delete_ps_global(name) ===
Alain left hcenter right specified horizontal
+
Alain specified top vcenter bottom vertical
+
  
nowrap not wraparound
+
=== $font(name,size,OPTIONS) ===
 +
Font settings.
 +
* OPTIONS: bold italic underline strikeout
 +
* Example: $font(Tahoma,10,bolditalic)
  
  noaa ClearType and disable anti-aliasing.
+
=== $drawstring(text,x,y,W,H,rgba,OPTIONS[,OPTIONS2]) ===
aa put the anti-aliasing mode. ClearType font such as resistance to the anti-aliasing.
+
Draws a string at the coordinates '''(x,y)'''. The size of the text field is defined by width '''(W)''' and height '''(H)'''.
hq high quality rendering mode. ClearType mode. (default now)  
+
glow_aa glow option to use a special mode. (noaa, aa, hq exclusive)  
+
  
If you set the trimming trimchar trimword fit the display range
+
''Note:'' This function is a string and there is also a GDI version of the same functions available [[#$drawtext(text,x,y,W,H,r-g-b,OPTIONS) | $drawtext]] and [[#$drawtextex(text,x,y,W,H,r-g-b,OPTIONS) | $drawtextex]]. This function might work for TrueType fonts, only.
elipchar elipword the last to fit the display range If・・・set to replace the  
+
  
mempos getlastpos, to be able to get the coordinates of the drawing.  
+
'''OPTIONS''':
 +
Align specified, the specified quality of drawing, and to specify the clip.
 +
* Align: ''left hcenter right specified horizontal''
 +
* Align: ''specified top vcenter bottom vertical''
 +
* ''nowrap'': disables text wrap
 +
* ''noaa'': ClearType and disable anti-aliasing.
 +
* ''aa'': put the anti-aliasing mode. ClearType font such as resistance to the anti-aliasing.
 +
* ''hq'': high quality rendering mode. ClearType mode. (default)
 +
* ''glow_aa'' glow option to use a special mode. (noaa, aa, hq exclusive)
  
  OPTIONS2 (optional experimental, experimental option)
+
* ''trimchar'' and ''trimword'': Trimming of the text to fit the display range
Specifying the terms of the glow effect.  
+
* ''elipchar'' and ''elipword'': Shortens the text to fit the the display range. If set the end of the line will be replaced with ''"···"''
Specified in the OPTIONS glow_aa only, outline and semibold is available.
+
* ''mempos getlastpos'': to be able to get the coordinates of the drawing
  
glow: expand: colour [: strength] glow options  
+
'''OPTIONS2''' - specifying the glow effect (experimental stage):
Expand - [0-5]  
+
* ''glow:expand:colour[:strength]'': glow options
Colour - r-g-b  
+
** ''Expand'' - [0-5]
Strength - [0-3] glow_aa case of disabled  
+
** ''Colour'' - r-g-b
 +
** ''Strength'' - [0-3] glow_aa case of disabled
  
Offset: x: y  
+
Offset:x:y
X - glow in the horizontal offset  
+
* ''X'' - glow in the horizontal offset
Y - glow in the vertical offset  
+
* ''Y'' - glow in the vertical offset
  
↓ glow_aa be used only when the specified
+
Glow is a heavy process. (Especially the pseudo transparent)
outline: colour color draws a thin border of the specified character (if glow_aa)  
+
Colour r-g-b
+
  
semibold to the characters a little thick (if glow_aa)  
+
* glow_aa be used only when the specified
 +
* outline: colour color draws a thin border of the specified character (if glow_aa)
 +
* Colour r-g-b
 +
* semibold to the characters a little thick (if glow_aa)
  
 +
These specifications may be changed.
 +
Changes in the glow, especially drawing, and semibold outline and may be discontinued.
  
※ These specifications may be changed.
+
Examples:
Changes in the glow, especially drawing, and semibold outline and may be discontinued.
+
* $drawstring(abcd,10,10,,,255-128-64-128,)
glow is a heavy process. (Especially the pseudo transparent)  
+
* $drawstring(abcd,10,10,,,255-128-64-128,leftvcenter,glow:2:255-255-255)
 +
* $drawstring(efgh,10,10,,,255-255-255,vcenterglow_aa,glow:1:32-168-268semibold)
 +
* $drawstring(wxyz,10,10,,,255-255-255,glow_aa,glow:0:32-168-268semiboldoffset:2:1outline:32-168-268)
 +
* $drawstring(wxyz,10,10,,,255-255-255,,glow:2:32-168-268:1)
 +
* $drawstring(wxyz,10,10,,,255-255-255,elipchar)
  
Example, $ drawstring (abcd, 10,10,, ,255-128-64-128,)
+
=== $drawrect(x,y,w,h,R1-G1-B1-A1,R2-G2-B2-A2,OPTIONS) ===
$ drawstring (abcd, 10,10,, ,255-128-64-128, left vcenter, glow :2:255-255-255)
+
$ drawstring (efgh, 10,10,, ,255-255-255, vcenter glow_aa, glow :1:32-168-268 semibold)
+
$ drawstring (wxyz, 10,10,, ,255-255-255, glow_aa, glow :0:32-168-268 semibold offset: 2:1 outline :32-168-268)
+
$ drawstring (wxyz, 10,10,, ,255-255-255,, glow :2:32-168-268: 1)
+
$ drawstring (wxyz, 10,10,, ,255-255-255, elipchar)  
+
  
 +
Rectangular drawing function.  Coordinates (x,y) size (w,h) Draws a rectangle.
 +
* '''R1-G1-B1-A1''' internal color
 +
* '''R2-G2-B2-A2''' border color
  
$ drawrect (x, y, w, h, R1-G1-B1-A1, R2-G2-B2-A2, OPTIONS)
+
'''OPTIONS''':
Rectangular drawing functions.  
+
* Aa - enable [http://en.wikipedia.org/wiki/Spatial_anti-aliasing anti aliasing]
Coordinates (x, y) size (w, h) Draws a rectangle.  
+
R1-G1-B1-A1 internal color
+
R2-G2-B2-A2 Border Color
+
  
OPTIONS
+
Example:
Aa - put ANCHIERIASU
+
* $drawrect(0,50,50,50,255-128-64-128,,aa)
  
Example $ drawrect (0,50,50,50,255-128-64-128,, aa)  
+
=== $gradientrect(x,y,w,h,r1-g1-b1-a1,r2-g2-b2-a2,OPTIONS,PEAK) ===
  
 +
Draws a rectangle with gradient fill at the coordinates '''(x,y)''' and size '''(w,h)'''
 +
* '''r1-g1-b1-a1''' gradient start color
 +
* '''r2-g2-b2-a2''' peak color gradient
  
$ gradientrect (x, y, w, h, r1-g1-b1-a1, r2-g2-b2-a2, OPTIONS, peak_point)
+
'''OPTIONS''':
Gradient fill in the drawing functions in the rectangle.
+
* ''vertical'': vertical gradient
Coordinates (x, y) size (w, h) Draws a rectangle.  
+
* ''horizontal'': horizontal gradient
R1-g1-b1-a1 Gradient start color
+
* ''aa'': enable [http://en.wikipedia.org/wiki/Spatial_anti-aliasing anti aliasing]
R2-g2-b2-a2 Gradient end color
+
* ''nonlinear'': nonlinear gradient
  
OPTIONS
+
'''PEAK''': 0-100
Vertical gradient of vertical
+
* Shifted the peak position of the gradient.
Gradient horizontal horizontal
+
** 0 by default, to end at peak color.
Aa put ANCHIERIASU
+
** 50 When is the peak of color.
how nonlinear nonlinear gradient
+
  
Peak_point: 0-100
+
Example:
Shifted the position of the gradient endpoints.
+
* $gradientrect(0,50,50,50255-128-64-128255-255-255,vertical aa)
0 by default, r1-g1-b1-a1 -> r2-g2-b2-a2
+
* $gradientrect(0,50,50,50255-128-64-128255-255-255,,10)
50 is when, r1-g1-b1-a1 -> r2-g2-b2-a2 -> r1-g1-b1-a1, and.
+
  
Example: $ gradientrect (0,50,50,50255-128-64-128255-255-255, vertical aa)
+
=== $drawblurrect(x,y,w,h,colour,level) ===
$ gradientrect (0,50,50,50255-128-64-128255-255-255,, 10)  
+
  
 +
Draws a rectangle with a blured outline at the coordinates '''(x,y)''' and size '''(w,h)'''
 +
* '''Colour''' [r1-g1-b1-a1]: blur colour
 +
* '''Level''' [1-7]: blur level
  
  $ drawblurrect (x, y, w, h, colour, level)  
+
=== $drawfocusrect(x,y,w,h) ===
Filling a rectangle drawing functions to blur the outline.  
+
Function to draw a dotted line shows the focus rectangle frame specified.
Level [1-7]
+
  
 +
=== $drawthemerect(x,y,w,h,control_name,partId,stateId) ===
  
$ drawfocusrect (x, y, w, h)  
+
Visual Style in a rectangle with a control (button or progress bar) function to draw. The only practical to draw a picture may be low. Visual Style not defined in control will not be drawn. At least WindowXP required.
Function to draw a dotted line shows the focus rectangle frame specified.  
+
  
 +
control_name:
 +
* Specify the name of the type of control you want to draw. One of the following:
 +
* window button rebar toolbar status listview header progress tab trackbar tooltip treeview spin scrollbar
 +
* edit combobox taskbar taskband startpanel explorerbar
  
$ drawthemerect (x, y, w, h, control_name, partId, stateId)
+
PartId:
VisualStyle in the rectangle with a control (button or progress bar) function to draw.  
+
* the parts you want to draw ID. Could we use the following number in the range for each control as a guide.
The only practical to draw a picture may be low.  
+
* In most cases, less than what I have defined.
VisualStyle not defined in control will not be drawn.  
+
* Window: 1-37
At least WindowXP required.
+
* Button rebar listview tooltip: 1-5
 +
* Toolbar: 1-6
 +
* Status treeview taskband: 1-3
 +
* Header spin: 1-4
 +
* Progress: 1-4
 +
* Tab trackbar scrollbar :1-10
 +
* Edit: 1-2
 +
* Combobox: 1
 +
* Taskbar: 1-8
 +
* Startpanel: 1-11
 +
* Explorerbar: 1-12
  
control_name: Specify the name of the type of control you want to draw. One of the following.  
+
StateId:
window button rebar toolbar status listview header progress tab trackbar tooltip treeview spin scrollbar
+
* the state and selected ID. If the component does not have to specify the state is 0.
edit combobox taskbar taskband startpanel explorerbar
+
* stateId is 0 or 1 or 2 would not be drawn in, the parts are not defined.
  
PartId: the parts you want to draw ID. Could we use the following number in the range for each control as a guide.
+
Examples:
In most cases, less than what I have defined.
+
* $drawthemerect (0,0,%el_width%,%el_height%,tab,10,0) / / tab of body parts drawn
Window: 1-37
+
* $drawthemerect (,,,,progress,3,0) / / Draw the progress bar bar
Button rebar listview tooltip: 1-5
+
Toolbar: 1-6
+
Status treeview taskband: 1-3  
+
Header spin: 1-4
+
Progress: 1-4
+
Tab trackbar scrollbar :1-10
+
Edit: 1-2
+
Combobox: 1
+
Taskbar: 1-8
+
Startpanel: 1-11
+
Explorerbar: 1-12
+
  
StateId: the state and selected ID. If the component does not have to specify the state is 0.
+
=== $drawroundrect(x,y,w,h,w2,h2,R1-G1-B1-A1,R2-G2-B2-A2,RESERVED) ===
stateId is 0 or 1 if not drawn in, the parts are not defined.
+
  
Example: $ drawthemerect (0,0,% el_width%,% el_height%, tab, 10,0) / / tab of body parts drawn
+
Draws a rectangle with rounded corners at coordinates (x,y) and size (w, h). The degree of roundness is defined by (w2,h2).
$ drawthemerect (,,,, progress, 3,0) / / Draw the progress bar bar
+
* In order to achieve a decent effect the condition w>4*w2 and h>4*h2 should be matched.
 +
* '''R1-G1-B1-A1''' internal color
 +
* '''R2-G2-B2-A2''' border color
  
 +
Example:
 +
* $drawroundrect(10,20,50,50,4,4,255-255-128-255,,)
  
$ drawroundrect (x, y, w, h, w2, h2, R1-G1-B1-A1, R2-G2-B2-A2, RESERVED)  
+
=== $drawellipse(x,y,w,h,R1-G1-B1-A1,R2-G2-B2-A2,RESERVED) ===
Draw a rectangle rolled angle function.
+
Coordinates (x, y) size (w, h) to draw a rectangle with the corners rolled.
+
Rounded the corner, w2, h2 can be adjusted.
+
w> 4 * w2 & & h> 4 * h2 satisfy the need.
+
R1-G1-B1-A1 internal color
+
R2-G2-B2-A2 Border Color
+
  
    Example $ drawroundrect (10,20,50,50,4,4255-255-128-255,,)
+
Draws an ellipse at coordinates '''(x,y)''' with size '''(w,h)'''.
 +
* '''R1-G1-B1-A1''' internal color
 +
* '''R2-G2-B2-A2''' border Color
  
 +
=== $drawtriangle(x1,y1,x2,y2,x3,y3,R1-G1-B1-A1,R2-G2-B2-A2,OPTIONS) ===
  
$ drawellipse (x, y, w, h, R1-G1-B1-A1, R2-G2-B2-A2, RESERVED)  
+
Draw a triangle and vertex function.
Ellipse drawing functions.
+
* '''(x1,y1),(x2,y2),(x3,y3)'''
Coordinates (x, y) size (w, h) draws an ellipse.
+
* '''R1-G1-B1-A1''' internal color
R1-G1-B1-A1 internal color  
+
* '''R2-G2-B2-A2''' Border Color
R2-G2-B2-A2 Border Color  
+
  
 +
'''OPTIONS''':
 +
* ''aa'': enable [http://en.wikipedia.org/wiki/Spatial_anti-aliasing anti aliasing]
  
$ drawtriangle (x1, y1, x2, y2, x3, y3, R1-G1-B1-A1, R2-G2-B2-A2, OPTIONS)  
+
Example:
(x1, y1), (x2, y2), (x3, y3) Draw a triangle and vertex function.
+
* $drawtriangle(10,5,20,10,10,15,200-100-100,,aa)
R1-G1-B1-A1 internal color
+
R2-G2-B2-A2 Border Color
+
  
OPTIONS  
+
=== $imageabs(x,y,w,h,path,OPTIONS,n,alpha,OPTIONS2) ===
Aa - put ANCHIERIASU
+
  
Example: $ drawtriangle (10,5,20,10,10,15200-100-100,, aa)  
+
Displays an image '''(path)''' at coordinates '''(x,y)''' with size '''(w,h)'''. By default, an image is expanded to the maximum size allowed by (w,h) without changing the aspect ratio of the image.  After the image has been resized (if indeed it has been), the resized version is cached in the memory, which means any further references to it will return the modified rather than original values. <!-- The image is referenced, the memory is removed from them. (w,h) in the original image size is omitted, and the cache.  (However, w, h if you are already cached in memory and then the image size to be directly cached)-->
 +
<!--?ITAI a reduced rate if more than one. Poor quality and will be expanded after the reduction.
 +
''Nodisplay'', ''noexpansion'' and use, Cache memory may be the largest reduction in the rate of reduction in the rate of use.
 +
If there are images true, if false is returned.-->
  
 +
'''Path''' is the absolute path of the image. It can also point to an audio file if it has an embedded image or if you are using one of the "artreader" options, and the path can include compressed archives if the "archive" option is active (see below).
  
$ imageabs (x, y, w, h, path, OPTIONS, n, alpha, OPTIONS2)
+
'''Options''' are flags which you separate with a space.
Coordinates (x, y) size (w, h) show the images in the path is specified.
+
* '''Resizing options'''
Retained in memory and after resizing the image, if you raise the efficiency of the process see below.  
+
** ''nokeepaspect'' ignores the image's aspect ratio and expands the image to fill both width and height regardless of distortion ''(nodisplay, archive, icon options and non-exclusive) [?]''
The image is referenced, the memory is removed from them.
+
** ''noexpansion'' prevents resizing to fill the space if the image turns out to be smaller than the specified width and height.
w, h in the original image size is omitted, and the cache.
+
(However, w, h if you are already cached in memory and then the image size to be directly cached)
+
  
扱ITAI a reduced rate if more than one
+
* '''Alignment options'''
Poor quality and will be expanded after the reduction.  
+
** ''left'' and ''right'' determine horizontal alignment (left is default).
Nodisplay noexpansion and use,
+
** ''top'' and ''bottom'' determine vertical alignment (top is default).
Cache memory may be the largest reduction in the rate of reduction in the rate of use.  
+
  
If there are images true, if false is returned.  
+
* '''Miscellaneous options'''
 +
** ''wc'' enables wildcard characters (*,?).
 +
** ''nodisplay'' caches the image without actually displaying it.
  
Dipsplays the image specified by path.  
+
* '''Read-mode (path-related) options'''
  after the image is resized, it is cached on the memory.  
+
** ''archive'' allows references to compressed archives to be included in the path. The path format is the absolute path of the archive followed by the base path within the archive file, using a pipe (|) as the separator. For example: ''C:\aaa\image.zip|bbb/ccc.jpg''
 +
** ''icon'' indicates that the path is specified in the icon file (*.ico) ''[?]''.
 +
** ''artreader'' uses embedded images or the default album art paths you've defined in Foobar2000's options to determine the image to be displayed. The path supplied should be that of an audio file (typically, this would be %path%). <!--artreader path specified by the embedded image file foobar2000 loaded at the core of the artwork reader. If you do not have embedded images, audio files to load the images folder. However slow.-->
 +
*** ''artreader_front, artreader_back, artreader_disc'' and ''artreader_icon'' are variations on this option which select the specific corresponding album art.  However, the original documentation suggests one avoid these options because they seem to be slow. <!--* (artreader_*** are currently not recommended options because these seem to be slow)-->
  
path: absolute path of the image (or an embedded image of AudioFile path)
+
'''n''': rotateflip Index for:
 +
* ''1'': 90°
 +
* ''2'': 180°
 +
* ''3'': 270°
 +
* ''4'': flip horizontal
 +
* ''5'': 90° + flip horizontal
 +
* ''6'': Flipped vertically
 +
* ''7'': 90° + Flip Vertically
  
OPTIONS
+
'''Alpha''' (Opacity)
■ <appearance>
+
* ''0-255''
nokeepaspect not maintain the aspect ratio (nodisplay, archive, icon options and non-exclusive).
+
Hide nodisplay read only memory.
+
noexpansion will reduce, not increase.
+
  
■ <align> exclusive.
+
'''OPTIONS2''' (shadow effect)
Left right horizontal aryne specified.
+
* ''Glow:expand:colour''
Specify vertical aryne top bottom.
+
* ''Offset:x:y''
  
■ <misc>
+
Examples:
wc wildcard (*,?) enabled.  
+
* $imageabs(10,10,50,50,C:\%album%.jpg)
 +
* $imageabs(10,10,50,50,C:\%album%.jpg,left top)
 +
* $imageabs(10,10,50,50,C:\%album%.jpg,,6)
 +
* $imageabs(10,10,50,50,C:\%album%.*,wc,6)
 +
* $imageabs(10,10,50,50,C:\%album%.jpg,bottom,,128)
 +
* $imageabs(10,10,50,50,C:\%album%.jpg,bottom,,,glow :2:0-0-0 offset: 4:4)
 +
* $imageabs(10,10,50,50,%path%,artreader)
  
■ <read engine> exclusive.
+
=== $imageabs_rc(rw,rh,srcx,srcy,srcw,srch,x,y,path,OPTIONS,n,alpha,OPTIONS2) ===
archive archive reader through the path of the images.
+
The format of the archive reader is path dependent, the absolute path of the archive | base path in the archive file.
+
Example: C: \ aaa \ image.zip | bbb / ccc.jpg
+
icon path is specified in the icon file (*. ico) to appear.
+
  
Audio artreader path specified by the embedded image file foobar2000 loaded at the core of the artwork reader.
+
To view the clip and resize images. Path specified by the image size (rw, rh) after resizing, portion of the area (srcx, srcy, srcw, srch) coordinates (x, y) size (srcw, srch) to display.
If you do not have embedded images, Audio files to load the images folder. However slow.
+
In memory (rw, rh) cache. When you evaluate the TF (rw, rh) with changes in, to refresh the image. Therefore, rw, rh is to specify a fixed value. If there are images true, if false is returned.
Audio artreader_front path specified by the embedded image file foobar2000 loaded at the core of the artwork reader.  
+
Audio artreader_back path specified by the embedded image file foobar2000 loaded at the core of the artwork reader.  
+
Audio artreader_disc path specified by the embedded image file foobar2000 loaded at the core of the artwork reader.
+
Audio artreader_icon path specified by the embedded image file foobar2000 loaded at the core of the artwork reader.  
+
(artreader *** are currently disrecommended options because these option seem to be slow)
+
  
N rotateflip Index for
+
'''OPTIONS''' (imageabs):
One ninety
+
* ''nokeepaspect'': not maintain the aspect ratio
2: 180
+
* ''nodisplay'': Hide read only memory
3: 270
+
* ''archive''
4: flip horizontal
+
* ''Icon''
Five ninety + flip horizontal
+
* ''Horizontal Alignment''
6: Flipped vertically
+
** left
Seven ninety Flip Vertically +
+
** hcener
 +
** right
 +
* ''Vertical Alignment''
 +
** top
 +
** vcenter
 +
** bottom
  
Alpha 0-255
+
'''N''' rotateflip Index for:
Opacity
+
* 1: 90°
 +
* 2: 180°
 +
* 3: 270°
 +
* 4: flip horizontal
 +
* 5: 90° + flip horizontal
 +
* 6: Flipped vertically
 +
* 7: 90° + Flip Vertically
  
OPTIONS2 (shadow effect)  
+
'''Alpha''' (Opacity)
Glow: expand: colour
+
* 0-255
Offset: x: y
+
  
 +
'''Examples''':
 +
* $imageabs_rc(200,100,0,0,100,50,10,10,C:\%album%.jpg,,6,192)
 +
* $imageabs_rc(200,100,0,0,200,100,10,10,C:\%album%.jpg,,)  ( = $imageabs(10,10,200,100,C:\%album%.jpg,left top,,) )
 +
* $imageabs_rc(150,120,0,0,150,120,20,15,C:\%album%.jpg,hcenter vcenter,)  ( = $imageabs(20,15,150,120,C:\%album%.jpg,,,) )
  
    Example $ imageabs (10,10,50,50, C: \% album%. Jpg)
+
===  $drawimage(x,y,w,h,path,OPTIONS,n,alpha) ===
        $ imageabs (10,10,50,50, C: \% album%. jpg, left top)
+
        $ imageabs (10,10,50,50, C: \% album%. jpg,, 6)
+
        $ imageabs (10,10,50,50, C: \% album%. jpg, bottom,, 128)
+
        $ imageabs (10,10,50,50, C: \% album%. jpg, bottom,,, glow :2:0-0-0 offset: 4:4)
+
        $ imageabs (10,10,50,50,% path%, artreader)  
+
  
 +
Displays an image at Coordinates (x,y) with size (w,h) specified by path.
 +
The function is similar to $imageabs.
 +
w and h show the size of the original if omitted.
 +
Removed from memory immediately after being displayed.
 +
TF to be reloaded each time the images are evaluated.
  
$ imageabs_rc (rw, rh, srcx, srcy, srcw, srch, x, y, path, OPTIONS, n, alpha, OPTIONS2)
+
You can see a huge image, the amount of occupied memory?RASHITAKATTARI to see more pictures, $imageabs for those who do not like the resizing process.
To view the clip and resize images.
+
path specified by the image size (rw, rh) after resizing,
+
Portion of the area (srcx, srcy, srcw, srch) coordinates (x, y) size (srcw, srch) to display.  
+
  
In memory (rw, rh) cache.
+
'''OPTIONS''':
When you evaluate the TF (rw, rh) with changes in, to refresh the image.
+
* ''nokeepaspect'': not to maintain aspect ratio
Therefore, rw, rh is to specify a fixed value.
+
* Alignment
 +
** Left
 +
** Right
 +
** Top
 +
** Bottom
  
If there are images true, if false is returned.
+
'''n''': rotateflip index for
 +
* ''1'': 90°
 +
* ''2'': 180°
 +
* ''3'': 270°
 +
* ''4'': flip horizontal
 +
* ''5'': 90° + flip horizontal
 +
* ''6'': Flipped vertically
 +
* ''7'': 90° + Flip Vertically
  
OPTIONS (imageabs).
+
alpha: 0-255
nokeepaspect not maintain the aspect ratio
+
* Opacity (transparency)
Hide nodisplay read only memory
+
Archive
+
Icon
+
    (Left
+
      Hcener
+
        Right
+
        Top
+
        Vcenter
+
            bottom)  
+
N rotateflip Index for
+
One ninety
+
2: 180
+
3: 270
+
4: flip horizontal
+
Five ninety + flip horizontal
+
6: Flipped vertically
+
Seven ninety Flip Vertically +
+
  
  Alpha 0-255
+
== Additional drawing functions ==
        Opacity
+
   
+
Example:
+
$ imageabs_rc (200100,0,0100,50,10,10, C: \% album%. jpg,, 6192)
+
$ imageabs_rc (200100,0,0200100,10,10, C: \% album%. jpg,,) (= $ imageabs (10,10200100, C: \% album%. jpg, left top,,))
+
$ imageabs_rc (150120,0,0150120,20,15, C: \% album%. jpg, hcenter vcenter,) (= $ imageabs (20,15150120, C: \% album%. jpg,,,))
+
  
  
$ drawimage (x, y, w, h, path, OPTIONS, n, aplha)  
+
=== $getlastpos(elem) ===
Coordinates (x, y) size (w, h) show the images in the path is specified.
+
$ Imageabs similar.
+
w and h show the size of the original omitted.
+
From memory immediately after display processing will be removed.
+
TF to be reloaded each time the images are evaluated.
+
+
    ※ You can see a huge image, the amount of occupied memory減RASHITAKATTARI to see more pictures,
+
      imageabs for those who do not like the resizing process.
+
  
OPTIONS: nokeepaspect not maintain aspect ratio
+
Display function imageabs, imageabs_rc right after, to get the coordinates to draw a picture. Also, ''[[#$measurestring(text,x,y,W,H,OPTIONS) | $measurestring]]'' use them when you get the results. If you are drawString, mempos available only immediately after the specified coordinates.
Left
+
Right
+
Top
+
Bottom
+
  
    n: rotateflip index for
+
Elem element to retrieve.
        One ninety
+
X: left
        2: 180
+
Y: top
        3: 270
+
W: width
        4: flip horizontal
+
H: height
        Five ninety + flip horizontal
+
R: right
        6: Flipped vertically
+
B: bottom
        Seven ninety Flip Vertically +
+
  
    alpha 0-255  
+
Example:
        Opacity (transparency)  
+
$setworldtransform(2)
 +
$puts(img_path,C:\%album%.jpg)
 +
$imageabs(10,4,100,100,$get(img_path),top noexpansion,)
 +
$imageabs($getlastpos(x),$getlastpos(b),$getlastpos(w),20,$get(img_path),top nokeepaspect,6)
 +
$gradientrect($getlastpos(x),$getlastpos(y),$getlastpos(w),$getlastpos(h),%el_backcolour%-128,%el_backcolour%-255)
 +
$setworldtransform(0)
  
● auxiliary drawing
+
=== $measurestring(text,x,y,W,H,OPTIONS) ===
  
$ getlastpos (elem)
+
''$drawstring'' to calculate the area when drawing text. As a result, returns to the horizontal width of the viewing area. The display area is to get ''[[#$getlastpos(elem) | $getlastpos]]''. '''OPTIONS''' is the same as $drawstring. If $drawstring uses the ''glow_aa'' or ''glow'' options, the ''$measurestring'' value returned may not be accurate.
Display function imageabs, imageabs_rc right after, to get the coordinates to draw a picture.  
+
Also, measurestring use them when you get the results.  
+
If you are drawString, mempos available only immediately after the specified coordinates.  
+
  
    Elem element to retrieve.
+
=== $getimagewidth(path),$getimageheight(path) ===
X: left
+
Y: top
+
W: width
+
H: height
+
R: right
+
B: bottom
+
  
Example:
+
The image path is specified in ''$imageabs'' ''$imageabs_rc'' of cache memory. If the image has been resized in the horizontal width and vertical width it returns the respective values. This means that only have ''$imageabs'' ''$imageabs_rc'' behind. ''nokeepaspect'' may be able to calculate the aspect ratio should be applied.
$ Setworldtransform (2)
+
$ Puts (img_path, C: \% album%. Jpg)
+
$ imageabs (10,4100100, $ get (img_path), top noexpansion,)
+
$ imageabs ($ getlastpos (x), $ getlastpos (b), $ getlastpos (w), 20, $ get (img_path), top nokeepaspect, 6)
+
$ gradientrect ($ getlastpos (x), $ getlastpos (y), $ getlastpos (w), $ getlastpos (h),% el_backcolour% -128,% el_backcolour% -255)
+
$ Setworldtransform (0)
+
  
 +
=== $setpercentmode(bx,by,bw,bh) ===
 +
Set the mode to specify the coordinates.
 +
Window space
 +
(0,0) ~ (%_width%,%_height%) where a, percentage specified in the mode, (0,0) to (100100) mapping.
 +
*x,y,W,H, can be set individually.
 +
*x,y,W,H, all affect the function of one argument.
  
$ measurestring (text, x, y, W, H, OPTIONS)
+
* bx x coordinate specified mode
$ drawstring to calculate the area when drawing text.
+
** 0: Splitter mode specified in absolute coordinates
As a result, returns to the horizontal width of the viewing area.  
+
** 1: Splitter value relative to the size (percentage) and designated.
The display area is to get $ getlastpos.
+
* mode specified by y coordinates
OPTIONS is the same as $ drawstring.
+
* bw w coordinates specified mode
Also, drawstring in, glow_aa glow if put in effect,
+
* bh h coordinates specified mode
Measurestring see the range of results and may not match.
+
  
 +
=== $getsyscolour (index) ===
 +
The r-g-b color system in the fo
  
$ getimagewidth (path), $ getimageheight (path)
+
index: [0-30] color index system
The image path is specified in $ imageabs $ imageabs_rc of cache memory
+
If the image has been resized in the horizontal width and vertical width returns.
+
This means that only have $ imageabs $ imageabs_rc behind.
+
nokeepaspect may be able to calculate the aspect ratio should be applied.
+
  
 +
=== $averagecolour(colour1,colour2[,···]) ===
  
$ setparcentmode (bx, by, bw, bh)
+
Calculates the average color ''R-g-b-a'' of a given set of colors.
    Set the mode to specify the coordinates.
+
    Window space
+
    (0,0) ~ (% _width%,% _height%) where a,
+
    Percentage specified in the mode, (0,0) to (100100) mapping.
+
    x, y, w, h can be set individually.
+
    x, y, w, h all affect the function of one argument.  
+
  
    bx x coordinate specified mode
+
''(Colour1 + colour2 +···) / N''
        0: Splitter mode specified in absolute coordinates
+
        1: Splitter value relative to the size (percentage) and designated.
+
    mode specified by y coordinates
+
    bw w coordinates specified mode
+
    bh h coordinates specified mode
+
  
$ getsyscolour (index)  
+
=== $blendcolour(colour1,w1,colour2,w2,[,···]) ===
The r-g-b color system in the form of returns.
+
  
index: [0-30] color index system
+
Calculates the average weighted ''w1,w2[,···]'' color ''R-g-b-a'' of a given set of colors.
  
 +
''(w1 * colur1 + w2 * colour2 +···+ wN * colourN) / (w1 + w2 +···+ wN)''
  
$ averagecolour (colour1, colour2 [,・・・])  
+
=== $addcolour(colour1,colour2[,···]) ===
R-g-b-a to the average color of the form.
+
(Colour1 + colour2 +・・・) / N
+
  
 +
Adds colors ''r-g-b-a'' of a given set.
  
$ blendcolour (colour1, w1, colour2, w2, [,・・・])
+
''Colour1 + colour2 + ··· + colourN''
R-g-b-a return with the average weight in the form.
+
(w1 * colur1 + w2 * colour2 +・・・+ wN * colourN) / (w1 + w2 +・・・+ wN)
+
  
 +
=== $subcolour(colour1,colour2[,···]) ===
  
$ addcolour (colour1, colour2 [,・・・])
+
Substracts colors ''r-g-b-a'' of a given set.
R-g-b-a to add the color of the form.  
+
・・・Colour1 + colour2 + + colourN
+
  
 +
''Colour1 - colour2 - colour3···- colourN''
  
$ subcolour (colour1, colour2 [,・・・])
+
== General-purpose system functions ==
R-g-b-a to form a color subtraction.
+
Colour1 - colour2 - colour3・・・- colourN
+
  
 +
=== $findfile(path,[path2,path3,...]) ===
  
$ findfile (path, [path2, path3 ,...])  
+
Determinates whether the specified file(s) exist(s) and returns the first file. If you do not have the file does not return anything. (Strictly speaking, "false" returns). Path can be specified. The ''path'' allows wildcards.
path (wildcards accepted) to be specified in the file exists, returns the first file.  
+
<!--Elplaylist lists here $el_scale(val,factor[,DIV]) as another function -->
If you do not have the file does not return anything. (Strictly speaking, "false" returns)  
+
Path can be specified.  
+
  
 +
== Function buttons ==
  
● function button  
+
=== $textbutton(x,y,w,h,text,mover_text,command,options1,options2) ===
 +
Create a button.
 +
Per Track only available. Per Second is not to write.
  
$ textbutton (x, y, w, h, text, mover_text, command, options1, options2)
+
* '''text''': the button label
    Create a button.
+
* '''mover_text''': the button label when mouse over
    Per Track only available. Per Second is not to write.
+
  
    text: the button label
+
command: "Type of instruction: arguments" specified in the form of
    mover_text: the button label when mouse over
+
* be no extra spaces
 +
* Going to be separated by a specified multiple orders.
 +
* A few instructions that can be specified.
 +
* Very difficult to implement. . .
 +
* And the splitter so that the characters and words in these arguments, could not parse well.
  
    command: "Type of instruction: arguments" specified in the form of
+
Note 1: Do not specify the order processing time.
              ※ be no extra spaces
+
Note 2: If you specify more than one instruction, the instruction execution order is not guaranteed. Especially if WINDOWSIZE and COMMAND is specified, WINDOWSIZE probably be better to run. COMMAND, CONTEXT and others, the order may be warranted.
              ; Going to be separated by a specified multiple orders.
+
              A few instructions that can be specified.
+
              Very difficult to implement. . .
+
              : And; the splitter so that the characters and words in these arguments,  
+
              Could not parse well.  
+
  
    Note 1: Do not specify the order processing time.  
+
'''Command''': command_path
    Note 2: If you specify more than one instruction, the instruction execution order is not guaranteed.  
+
* command_path to run the command specified by menu.
              Especially if WINDOWSIZE and COMMAND is specified, WINDOWSIZE probably be better to run.
+
* COMMAND: View / Equalizer and COMMAND: File / Preferences; COMMAND: Playback / Play
              COMMAND, CONTEXT and others, the order may be warranted.  
+
* To specify that you can use the input help in setting some of them.
 +
* TF command_path Note also that as COMMAND: 'View / Equalizer' and it's recommended.
  
      COMMAND: command_path
+
'''Context''': context_path
              command_path to run the command specified by menu.  
+
* context_path KONTEKISUTOMENYUKOMANDO be designated to perform.
              COMMAND: View / Equalizer and
+
* Handles the context menu of the currently playing track.
              COMMAND: File / Preferences; COMMAND: Playback / Play
+
* CONTEXT: Properties to specify the like.
              To specify that.
+
* TF context_path Note also that as
              ※ You can use the input help in setting some of them. . .  
+
              TF command_path Note also that as  
+
              COMMAND: 'View / Equalizer' and it's recommended.
+
  
      CONTEXT: context_path
+
'''Panelshow''': cap: sh
              context_path KONTEKISUTOMENYUKOMANDO be designated to perform.
+
*The caption of the child panel cap / hide.
              Handles the context menu of the currently playing track.  
+
*sh: 0 hide
              CONTEXT: Properties to specify the like.  
+
**    1.
              TF context_path Note also that as
+
**  -1 Show / hide toggle
  
 +
'''TFMode''': mode
 +
*Per Track titleformat to change the mode.
 +
*mode: 0 nowplaying mode
 +
** 1 follow curosr mode
 +
** -1 Toggle
  
      PANELSHOW: cap: sh
+
'''Windowsize''': width:height
              The caption of the child panel cap / hide.  
+
* Sets the size of the entire foobar2000 window.
              sh: 0 hide
+
                  1.
+
                  -1 Show / hide toggle
+
  
      TFMODE: mode
+
'''Setglobal''': name:value
              Per Track titleformat to change the mode.
+
              mode: 0 nowplaying mode
+
                    1 follow curosr mode
+
                    -1 Toggle
+
  
      REFRESH: TF of PerTrack, PerSecond update.  
+
'''Refresh''': TF of PerTrack, PerSecond update.
  
 +
'''options1'''
  
 +
specify the default decoration (can specify more than one, separated by spaces)
 +
* fontcolor: r-g-b color of the text
 +
* brushcolor: r-g-b-a color fills the rectangle button
 +
* pencolor: r-g-b-a color button border
 +
* left top bottom right position of the text
  
      options1 specify the default decoration (can specify more than one, separated by spaces)
+
'''options2''':
                fontcolor: r-g-b-color of the text
+
                brushcolor: rgba color fills the rectangle button
+
                pencolor: r-g-b-a color button border
+
                left top bottom right position of the text
+
  
      options2: decorative specify when mouse over (can specify more than one, separated by spaces)  
+
decorative specify when mouse over (can specify more than one, separated by spaces)
                fontcolor: r-g-b-color of the text  
+
* fontcolor: r-g-b color of the text
                brushcolor: rgba color fills the rectangle button  
+
* brushcolor: r-g-b-a color fills the rectangle button
                pencolor: r-g-b-a color button border  
+
* pencolor: r-g-b-a color button border
                left top bottom right position of the text  
+
* left top bottom right position of the text
  
  
    Example $ textbutton (0,0,80,20, play, play, COMMAND: Playback / Play, fontcolor :64-64-64 brushcolor :192-192-192-128 pencolor :0-0-0, fontcolor: 32 -- 32-32)  
+
'''Examples''':
$ textbutton (100,0,80,20, Resize, Resize, PANELSHOW: aaa: -1; REFRESH, fontcolor :64-64-64 left bottom, fontcolor :32-32-32)  
+
* $textbutton (0,0,80,20,play,play,COMMAND: Playback / Play,fontcolor:64-64-64 brushcolor:192-192-192-128 pencolor:0-0-0-0,fontcolor:32-32-32)
 +
* $textbutton (100,0,80,20,Resize,Resize,PANELSHOW:aaa:-1;REFRESH,fontcolor:64-64-64 left bottom,fontcolor:32-32-32)
  
 +
=== $imagebutton(x,y,w,h,path,mover_path,command,options1,options2) ===
 +
Create an image button.
 +
Per Track only available. Per Second is not to write.
 +
The internal processing of the images are treated equally and $imageabs will be cached in memory.
 +
w, h is omitted, path to original image size is specified.
 +
textbutton command is common.
  
 +
Display options:
 +
 +
OPTIONS1
 +
* nokeepaspect
 +
* left
 +
* top
 +
* bottom
 +
* right
  
$ imagebutton (x, y, w, h, path, mover_path, command, options1, options2)
+
OPTIONS2:
    Create an image button.
+
    Per Track only available. Per Second is not to write.
+
    The internal processing of the images are treated equally and $ imageabs will be cached in memory.
+
    w, h is omitted, path to original image size is specified.
+
    textbutton command is common.
+
  
      Display options options1
+
When mouse over the image display options
                nokeepaspect
+
* nokeepaspect
                left top bottom right
+
* left  
      options2: When mouse over the image display options  
+
* top  
                nokeepaspect  
+
* bottom  
                left top bottom right  
+
* right
  
 +
== GDI drawing functions ==
  
● GDI drawing functions of
+
Using the Windows System Component [http://en.wikipedia.org/wiki/Graphics_Device_Interface GDI] to draw. GDI functions are usually faster, but they do not allow alpha blending and shadow effects (glow).
Using the GDI to draw. Simple minutes, may be faster.  
+
  
$ drawtext (text, x, y, W, H, r-g-b, OPTIONS)  
+
=== $drawtext(text,x,y,W,H,r-g-b,OPTIONS) ===
GDI text drawing functions
+
Text coordinates (x, y) in output
+
  
OPTIONS
+
GDI text drawing functions. Text coordinates (x, y) in output
Alain left hcenter right specified horizontal
+
Alain specified top vcenter bottom vertical
+
Not noclip clip
+
  
 +
OPTIONS:
 +
* Align ''left hcenter right specified horizontal''
 +
* Align ''specified top vcenter bottom vertical''
 +
* Not noclip clip
  
$ drawtextex (text, x, y, W, H, r-g-b, OPTIONS)  
+
=== $drawtextex(text,x,y,W,H,r-g-b,OPTIONS) ===
GDI drawing functions text_2
+
Text coordinates (x, y) in output
+
 
+
OPTIONS
+
Alain left hcenter right specified horizontal
+
Alain specified top vcenter bottom vertical
+
Not noclip clip
+
Allow specified wrap wraparound (vcenter, bottom and exclusive)
+
end_ellipsis If you clip text, replace the end of the text ...
+
+
Example: $ drawtextex (text, 0,0,% _width%,% _height% ,0-0-0, hcenter vcenter end_ellipsis)
+
 
+
  
$ gettextwidth (text, [FONTNAME, SIZE, OPTIONS])
+
GDI drawing functions text_2
GDI (drawtext, drawtextex) returns the width in the text when drawing horizontal text.
+
Text coordinates (x, y) in output
can specify the font ($ font option). specified font is optional
+
  
 +
OPTIONS
 +
* Align ''left hcenter right specified horizontal''
 +
* Align ''specified top vcenter bottom vertical''
 +
* Not noclip clip
 +
* Allow specified wrap wraparound (vcenter, bottom and exclusive)
 +
* ''end_ellipsis'' If you clip text, replace the end of the text ...
  
$ gettextheight ([FONTNAME, SIZE, OPTIONS])
+
Example: ''$drawtextex(text,0,0,%_width%,%_height%,0-0-0,hcenter vcenter end_ellipsis)''
GDI returns vertical width of text when drawn.
+
can specify the font ($ font option). specified font is optional
+
  
 +
=== $gettextwidth(text,[FONTNAME,SIZE,OPTIONS]) ===
  
$ fillrect (x, y, w, h, r-g-b, RESERVED)  
+
For the use with GDI text functions (''drawtext'', ''drawtextex''). Returns the width in the text when drawing horizontal text. Optionaly the font can be specified ''FONTNAME'', ''SIZE'' and ''OPTIONS'' (bold, italic, etc).
Filled rectangle function
+
  
 +
=== $gettextheight([FONTNAME,SIZE,OPTIONS]) ===
  
$ fillroundrect (x, y, w, h, w2, h2, r1-g1-b1, r2-g2-b2)  
+
For the use with GDI text functions (''drawtext'', ''drawtextex''). Returns vertical width of text. can specify the font ($ font option). Optionaly the font can be specified ''FONTNAME'', ''SIZE'' and ''OPTIONS'' (bold, italic, etc).
Function of the fill rectangle with rounded corners
+
  
 +
=== $fillrect(x,y,w,h,r-g-b,RESERVED) ===
  
● Panel operating system functions
+
Filled rectangle function
Apparently drawing functions and the TF is such low efficiency of the frame together,
+
Future plans to別枠.
+
  
$ showpanel (i, sh) or $ showpanel_c (caption, sh)
+
=== $fillroundrect(x,y,w,h,w2,h2,r1-g1-b1,r2-g2-b2) ===
    Panel, change the function inactive
+
    i somethingth in the child panel list (counting from 0)  
+
    sh 0: Inactive 1: View
+
  
 +
Function of the fill rectangle with rounded corners
  
$ movepanel (i, x, y, w, h) or $ movepanel_c (caption, x, y, w, h)
+
== Panel operating system functions ==
    i somethingth in the child panel list (counting from 0)
+
    Panel Force layout only for the specified coordinates (x, y) size (w, h) to move on.
+
  
 +
Apparently drawing functions and the TF is such low efficiency of the frame together,
 +
Future plans to??.
  
$ getcaption (i)  
+
=== $showpanel(i,sh) or $showpanel_c(caption,sh) ===
    I returns the list of child panel captions are set in the second panel.
+
Panel, change the function inactive
 +
* '''i''': somethingth in the child panel list (counting from 0)
 +
* '''sh''': 0: Inactive 1: View
  
 +
=== $movepanel(i,x,y,W,H,) or $movepanel_c(caption,x,y,W,H,) ===
 +
'''i''': something in the child panel list (counting from 0)
  
$ isvisible_c (caption)  
+
Panel Force layout only for the specified coordinates (x, y) size (w, h) to move on.
    Returns the status panel.  
+
  
 +
=== $getcaption(i) ===
 +
'''i''': returns the list of child panel captions are set in the second panel.
  
 +
=== $isvisible_c(caption) ===
 +
Returns the status panel.
  
 
= External links =
 
= External links =
 
* [http://foo2k.chottu.net/ Official page with download link] (Japanese)
 
* [http://foo2k.chottu.net/ Official page with download link] (Japanese)
 
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=62114 Discussion thread]
 
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=62114 Discussion thread]

Revision as of 08:43, 25 October 2020

Foobar2000_Logo.png

Panel Stack Splitter is a ColumnsUI extension for advanced placement and scripting of panels. It functions as a splitter in the ColumnsUI panel hierarchy (i.e., it can contain other panels).

Contents

Function and Use

Panel Stack Splitter is an extension for ColumnsUI which allows for greater control over the arrangement of panels. Not only can any panel be positioned freely within the Foobar2000 window, but the splitters themselves can be scripted, the panels can be resized using the cursor or by scripted actions, and panels can be hidden and displayed according to your script. It includes functions which make it easy to create graphical buttons and dynamic layouts. It can replace any number of more specific panels, such as those intended for displaying album art or track information.

Common uses include the creation of interfaces which reconfigure themselves automatically depending on the window size, panel-switching arrangements, and of course, all manner of window dressing. It's often used alongside other plugins such as ELPlaylist and WSH Panel to construct elaborate custom interfaces, but be warned that the results of such efforts are, unlike Foobar2000 itself, not always efficient or stable.

Authorship

Panel Splitter was written by ssenna, who is also the author of ELPlaylist. Many of the functions are similar and both plug-ins work well together.

Requirements

Reference

The following documentation is an imperfect translation and adaptation from the original Japanese readme. Until the page has been more thoroughly re-written, expect some confusing passages.

Introduction

After installing the plug-in, in the options dialog under ColumnsUI's Layout tab you'll be able to add a Panel Stack Splitter to your layout and configure it. Once you've added a Panel Stack Splitter you can also edit it by right-clicking the panel and choosing Configure from the context menu. The relationship between Panel Stack Splitters and the resulting layout may initially be confusing. In theory, one could place all their panels under a single Panel Stack Splitter to achieve any layout, but in practice you will generally want to employ them more like traditional horizontal and vertical splitters, nesting hierarchically.

Splitter Settings dialog

The Splitter Settings dialog has four tabs, PanelList, Script, Behavior and Global variables.

PanelList shows subordinate panels and allows you to define their names, positions and sizes. Script allows you to script the Splitter panel itself; this is where you would define buttons, text to display, or scripts which alter the layout or operate invisibly. Behavior presents options related to how the Splitter is rendered and how it executes scripts, and Global variables lets you view and delete currently active global variables.

PanelList

You can't add subordinate panels from this tab -- for this you must return to the ColumnsUI layout options. But once you've added panels, you can select them from the left box in this tab and define their display parameters at the right. Note that there is one option on this tab which is for the Splitter itself rather than its children; this is Panel placement mode, which allows you to select horizontal or vertical position. This parameter is irrelevant for forced layouts.

All fields accept numbers as pixel positions and widths by default, though you can switch to percentage values instead when in forced mode. You can use Titleformatting Script in all of these fields, which is often important for forced layouts if you want them to be resizeable.

Caption 
This allows you to assign a unique name to the panel in question. In addition to providing a convenient label for the panel for when you're editing, this allows you make direct reference to the panel is scripts later on, for example if you wanted to display, hide or resize it.
Size 
Defines the size of the panel, but only if you are using a non-forced layout. Size means width when in horizontal panel placement mode and height when in vertical panel placement mode.
Padding 
These values define padding between the edges of the panel's allotted space (size) and the actual panel.
Lock size 
This disables the user from resizing the panel using the mouse. Only applies to non-forced layout mode; in forced-layout mode this is already default. The original documentation provides further details about this option, including a caveat that seems to address the possibility of blurred pixels, but the auto-translation is garbled.
Forced layout 
This option allows you to directly determine the position and size of a panel. Turning it on disables Size and (by default) padding and makes panel placement mode irrelevant. Panels can even overlap, though you generally would only want to do this if you intend to provide a way to switch between them. Left and Right are measurements from the upper-left (0,0) of the panel.
  • Title Formatting script is enabled and you can use %_width% and %_height% to call the current width and height of the Splitter itself.
  • If two panels overlap, by default the one that renders in front is determined by the sequence of panels as defined in the ColumnsUI options. [?]
  • Example. This would always expand the panel to the width of the splitter minus 400 pixels:
       Width: $sub(%_width%,400)
  • Example. This would make the panel always fill the lower half of the available space:
       Top: $div(%_height%,2)
       Height: $div(%_height%,2)
Use percentage value 
This option makes Panel Splitter interpret the values in Left, Top, Width and Height as percentages of available space instead of pixel measurements. Thus the second example above could be written as Top: 50 and Height: 50.
Enable padding settings
This option re-enables the padding values defined for non-forced-layout mode. Though this may seem redundant when you can simply include the padding in your position and size values, it may be useful for percentage-based layouts.
Ignore panel size limits 
This seems to be undocumented, but allows for sizes lower or higher than default caps. For example, the seekbar will display as 20px high if any value below 20px is entered into the Height field unless this box is checked.
Hide panel on startup 
This rather straight-forward option does precisely what its name indicates. To later make the panel visible, you would use a script function such as $showpanel_c.

Script Tab

titleformat mode on startup: when you start the TitleFormat PerTrack modes.

  • now playing TF play that track
  • follow cursor on the selected tracks in playlist
  • last mode at the end of the previous mode (the switch mode button to save)


  • title formatting script:

Titleformat here to describe, and decorative backgrounds. However, the child is on the panel can not be drawn.

Extended Command Reference Sensitive argument, or optional, and not implemented. Note: Do not waste the space. (Carriage return accepted)

in title formatting script is evaluated,

  • Today
  • Per Track: track and play and play·When the user changes the size of the state changed when paused. Function when the REFRESH button.
  • Per Second: second, when a change in the state play in the function when the REFRESH button.

[Note]

  • Per Second, especially that not only can handle high-stress functions.
  • GDI is recommended that you use the drawing functions.

Behaviour Tab

  • use background color: the color specified, the background fill.
  • use image: specify a fixed background image. TitleFormatting is disabled.
  • pseudo transparent: splitter to simulate a transparent background. (splitter and if you use the nest)

[Note]

  • ColumnsUI in the panel is to present the panel with the transparent background feature, use background color or use image backgrounds are often not transparent and does not use the panel.

Global variables Tab

Fields

%ps_width%

Returns the width of the Splitter

%ps_height%

Returns the height of the Splitter

%ps_tfmode%

TF mode returns. (Per Track when enabled)

  • 0 nowplaying mode
  • 1 follow cursor mode

%ps_isplaying%

Whether during playback

%ps_ispause%

Whether suspended

%ps_foobar2000_path%

Foobar2000 executable path

%ps_user_profile_path%

User profile path

%ps_playback_order%

Returns the playback order. However, playback order can not be immediately reflected in the change.(REFRESH commands are required)

%ps_track_state%

TF mode returns state of the player, whether a track is present or not.

  • 0 no error
  • 1 no track
  • 2 dummy track (for mainly legacy metadb_display_hook API)

Functions

$init_ps_global(name,value)

Valid only if there is no global variable name specified.

All global variables are shared between each of the TF although the PanelStackSplitter evaluation order is undefined. Persistency = 1 variable is set, $delete_ps_gobal you use will be saved until you delete from the settings dialog. $Init_ps_global(name,value) is, $if($get_ps_global(name),,$set_ps_global(name,value)) and almost equivalent.

$init_ps_global(name,value,persistency)

Persistency - whether to save at the end.

  • 0 not saved on exit
  • 1 saved on exit (default)

$init_ps_global(NAME,VALUE,0) implies that the global variable "NAME" is deleted when quitting foobar2000.

$set_ps_global(name,value)

$get_ps_global(name) or  %name%

$delete_ps_global(name)

$font(name,size,OPTIONS)

Font settings.

  • OPTIONS: bold italic underline strikeout
  • Example: $font(Tahoma,10,bolditalic)

$drawstring(text,x,y,W,H,rgba,OPTIONS[,OPTIONS2])

Draws a string at the coordinates (x,y). The size of the text field is defined by width (W) and height (H).

Note: This function is a string and there is also a GDI version of the same functions available $drawtext and $drawtextex. This function might work for TrueType fonts, only.

OPTIONS: Align specified, the specified quality of drawing, and to specify the clip.

  • Align: left hcenter right specified horizontal
  • Align: specified top vcenter bottom vertical
  • nowrap: disables text wrap
  • noaa: ClearType and disable anti-aliasing.
  • aa: put the anti-aliasing mode. ClearType font such as resistance to the anti-aliasing.
  • hq: high quality rendering mode. ClearType mode. (default)
  • glow_aa glow option to use a special mode. (noaa, aa, hq exclusive)
  • trimchar and trimword: Trimming of the text to fit the display range
  • elipchar and elipword: Shortens the text to fit the the display range. If set the end of the line will be replaced with "···"
  • mempos getlastpos: to be able to get the coordinates of the drawing

OPTIONS2 - specifying the glow effect (experimental stage):

  • glow:expand:colour[:strength]: glow options
    • Expand - [0-5]
    • Colour - r-g-b
    • Strength - [0-3] glow_aa case of disabled

Offset:x:y

  • X - glow in the horizontal offset
  • Y - glow in the vertical offset

Glow is a heavy process. (Especially the pseudo transparent)

  • glow_aa be used only when the specified
  • outline: colour color draws a thin border of the specified character (if glow_aa)
  • Colour r-g-b
  • semibold to the characters a little thick (if glow_aa)

These specifications may be changed. Changes in the glow, especially drawing, and semibold outline and may be discontinued.

Examples:

  • $drawstring(abcd,10,10,,,255-128-64-128,)
  • $drawstring(abcd,10,10,,,255-128-64-128,leftvcenter,glow:2:255-255-255)
  • $drawstring(efgh,10,10,,,255-255-255,vcenterglow_aa,glow:1:32-168-268semibold)
  • $drawstring(wxyz,10,10,,,255-255-255,glow_aa,glow:0:32-168-268semiboldoffset:2:1outline:32-168-268)
  • $drawstring(wxyz,10,10,,,255-255-255,,glow:2:32-168-268:1)
  • $drawstring(wxyz,10,10,,,255-255-255,elipchar)

$drawrect(x,y,w,h,R1-G1-B1-A1,R2-G2-B2-A2,OPTIONS)

Rectangular drawing function. Coordinates (x,y) size (w,h) Draws a rectangle.

  • R1-G1-B1-A1 internal color
  • R2-G2-B2-A2 border color

OPTIONS:

Example:

  • $drawrect(0,50,50,50,255-128-64-128,,aa)

$gradientrect(x,y,w,h,r1-g1-b1-a1,r2-g2-b2-a2,OPTIONS,PEAK)

Draws a rectangle with gradient fill at the coordinates (x,y) and size (w,h)

  • r1-g1-b1-a1 gradient start color
  • r2-g2-b2-a2 peak color gradient

OPTIONS:

  • vertical: vertical gradient
  • horizontal: horizontal gradient
  • aa: enable anti aliasing
  • nonlinear: nonlinear gradient

PEAK: 0-100

  • Shifted the peak position of the gradient.
    • 0 by default, to end at peak color.
    • 50 When is the peak of color.

Example:

  • $gradientrect(0,50,50,50255-128-64-128255-255-255,vertical aa)
  • $gradientrect(0,50,50,50255-128-64-128255-255-255,,10)

$drawblurrect(x,y,w,h,colour,level)

Draws a rectangle with a blured outline at the coordinates (x,y) and size (w,h)

  • Colour [r1-g1-b1-a1]: blur colour
  • Level [1-7]: blur level

$drawfocusrect(x,y,w,h)

Function to draw a dotted line shows the focus rectangle frame specified.

$drawthemerect(x,y,w,h,control_name,partId,stateId)

Visual Style in a rectangle with a control (button or progress bar) function to draw. The only practical to draw a picture may be low. Visual Style not defined in control will not be drawn. At least WindowXP required.

control_name:

  • Specify the name of the type of control you want to draw. One of the following:
  • window button rebar toolbar status listview header progress tab trackbar tooltip treeview spin scrollbar
  • edit combobox taskbar taskband startpanel explorerbar

PartId:

  • the parts you want to draw ID. Could we use the following number in the range for each control as a guide.
  • In most cases, less than what I have defined.
  • Window: 1-37
  • Button rebar listview tooltip: 1-5
  • Toolbar: 1-6
  • Status treeview taskband: 1-3
  • Header spin: 1-4
  • Progress: 1-4
  • Tab trackbar scrollbar :1-10
  • Edit: 1-2
  • Combobox: 1
  • Taskbar: 1-8
  • Startpanel: 1-11
  • Explorerbar: 1-12

StateId:

  • the state and selected ID. If the component does not have to specify the state is 0.
  • stateId is 0 or 1 or 2 would not be drawn in, the parts are not defined.

Examples:

  • $drawthemerect (0,0,%el_width%,%el_height%,tab,10,0) / / tab of body parts drawn
  • $drawthemerect (,,,,progress,3,0) / / Draw the progress bar bar

$drawroundrect(x,y,w,h,w2,h2,R1-G1-B1-A1,R2-G2-B2-A2,RESERVED)

Draws a rectangle with rounded corners at coordinates (x,y) and size (w, h). The degree of roundness is defined by (w2,h2).

  • In order to achieve a decent effect the condition w>4*w2 and h>4*h2 should be matched.
  • R1-G1-B1-A1 internal color
  • R2-G2-B2-A2 border color

Example:

  • $drawroundrect(10,20,50,50,4,4,255-255-128-255,,)

$drawellipse(x,y,w,h,R1-G1-B1-A1,R2-G2-B2-A2,RESERVED)

Draws an ellipse at coordinates (x,y) with size (w,h).

  • R1-G1-B1-A1 internal color
  • R2-G2-B2-A2 border Color

$drawtriangle(x1,y1,x2,y2,x3,y3,R1-G1-B1-A1,R2-G2-B2-A2,OPTIONS)

Draw a triangle and vertex function.

  • (x1,y1),(x2,y2),(x3,y3)
  • R1-G1-B1-A1 internal color
  • R2-G2-B2-A2 Border Color

OPTIONS:

Example:

  • $drawtriangle(10,5,20,10,10,15,200-100-100,,aa)

$imageabs(x,y,w,h,path,OPTIONS,n,alpha,OPTIONS2)

Displays an image (path) at coordinates (x,y) with size (w,h). By default, an image is expanded to the maximum size allowed by (w,h) without changing the aspect ratio of the image. After the image has been resized (if indeed it has been), the resized version is cached in the memory, which means any further references to it will return the modified rather than original values.

Path is the absolute path of the image. It can also point to an audio file if it has an embedded image or if you are using one of the "artreader" options, and the path can include compressed archives if the "archive" option is active (see below).

Options are flags which you separate with a space.

  • Resizing options
    • nokeepaspect ignores the image's aspect ratio and expands the image to fill both width and height regardless of distortion (nodisplay, archive, icon options and non-exclusive) [?]
    • noexpansion prevents resizing to fill the space if the image turns out to be smaller than the specified width and height.
  • Alignment options
    • left and right determine horizontal alignment (left is default).
    • top and bottom determine vertical alignment (top is default).
  • Miscellaneous options
    • wc enables wildcard characters (*,?).
    • nodisplay caches the image without actually displaying it.
  • Read-mode (path-related) options
    • archive allows references to compressed archives to be included in the path. The path format is the absolute path of the archive followed by the base path within the archive file, using a pipe (|) as the separator. For example: C:\aaa\image.zip|bbb/ccc.jpg
    • icon indicates that the path is specified in the icon file (*.ico) [?].
    • artreader uses embedded images or the default album art paths you've defined in Foobar2000's options to determine the image to be displayed. The path supplied should be that of an audio file (typically, this would be %path%).
      • artreader_front, artreader_back, artreader_disc and artreader_icon are variations on this option which select the specific corresponding album art. However, the original documentation suggests one avoid these options because they seem to be slow.

n: rotateflip Index for:

  • 1: 90°
  • 2: 180°
  • 3: 270°
  • 4: flip horizontal
  • 5: 90° + flip horizontal
  • 6: Flipped vertically
  • 7: 90° + Flip Vertically

Alpha (Opacity)

  • 0-255

OPTIONS2 (shadow effect)

  • Glow:expand:colour
  • Offset:x:y

Examples:

  • $imageabs(10,10,50,50,C:\%album%.jpg)
  • $imageabs(10,10,50,50,C:\%album%.jpg,left top)
  • $imageabs(10,10,50,50,C:\%album%.jpg,,6)
  • $imageabs(10,10,50,50,C:\%album%.*,wc,6)
  • $imageabs(10,10,50,50,C:\%album%.jpg,bottom,,128)
  • $imageabs(10,10,50,50,C:\%album%.jpg,bottom,,,glow :2:0-0-0 offset: 4:4)
  • $imageabs(10,10,50,50,%path%,artreader)

$imageabs_rc(rw,rh,srcx,srcy,srcw,srch,x,y,path,OPTIONS,n,alpha,OPTIONS2)

To view the clip and resize images. Path specified by the image size (rw, rh) after resizing, portion of the area (srcx, srcy, srcw, srch) coordinates (x, y) size (srcw, srch) to display. In memory (rw, rh) cache. When you evaluate the TF (rw, rh) with changes in, to refresh the image. Therefore, rw, rh is to specify a fixed value. If there are images true, if false is returned.

OPTIONS (imageabs):

  • nokeepaspect: not maintain the aspect ratio
  • nodisplay: Hide read only memory
  • archive
  • Icon
  • Horizontal Alignment
    • left
    • hcener
    • right
  • Vertical Alignment
    • top
    • vcenter
    • bottom

N rotateflip Index for:

  • 1: 90°
  • 2: 180°
  • 3: 270°
  • 4: flip horizontal
  • 5: 90° + flip horizontal
  • 6: Flipped vertically
  • 7: 90° + Flip Vertically

Alpha (Opacity)

  • 0-255

Examples:

  • $imageabs_rc(200,100,0,0,100,50,10,10,C:\%album%.jpg,,6,192)
  • $imageabs_rc(200,100,0,0,200,100,10,10,C:\%album%.jpg,,) ( = $imageabs(10,10,200,100,C:\%album%.jpg,left top,,) )
  • $imageabs_rc(150,120,0,0,150,120,20,15,C:\%album%.jpg,hcenter vcenter,) ( = $imageabs(20,15,150,120,C:\%album%.jpg,,,) )

$drawimage(x,y,w,h,path,OPTIONS,n,alpha)

Displays an image at Coordinates (x,y) with size (w,h) specified by path. The function is similar to $imageabs. w and h show the size of the original if omitted. Removed from memory immediately after being displayed. TF to be reloaded each time the images are evaluated.

You can see a huge image, the amount of occupied memory?RASHITAKATTARI to see more pictures, $imageabs for those who do not like the resizing process.

OPTIONS:

  • nokeepaspect: not to maintain aspect ratio
  • Alignment
    • Left
    • Right
    • Top
    • Bottom

n: rotateflip index for

  • 1: 90°
  • 2: 180°
  • 3: 270°
  • 4: flip horizontal
  • 5: 90° + flip horizontal
  • 6: Flipped vertically
  • 7: 90° + Flip Vertically

alpha: 0-255

  • Opacity (transparency)

Additional drawing functions

$getlastpos(elem)

Display function imageabs, imageabs_rc right after, to get the coordinates to draw a picture. Also, $measurestring use them when you get the results. If you are drawString, mempos available only immediately after the specified coordinates.

Elem element to retrieve.

X: left
Y: top
W: width
H: height
R: right
B: bottom

Example:

$setworldtransform(2)
$puts(img_path,C:\%album%.jpg)
$imageabs(10,4,100,100,$get(img_path),top noexpansion,)
$imageabs($getlastpos(x),$getlastpos(b),$getlastpos(w),20,$get(img_path),top nokeepaspect,6)
$gradientrect($getlastpos(x),$getlastpos(y),$getlastpos(w),$getlastpos(h),%el_backcolour%-128,%el_backcolour%-255)
$setworldtransform(0)

$measurestring(text,x,y,W,H,OPTIONS)

$drawstring to calculate the area when drawing text. As a result, returns to the horizontal width of the viewing area. The display area is to get $getlastpos. OPTIONS is the same as $drawstring. If $drawstring uses the glow_aa or glow options, the $measurestring value returned may not be accurate.

$getimagewidth(path),$getimageheight(path)

The image path is specified in $imageabs $imageabs_rc of cache memory. If the image has been resized in the horizontal width and vertical width it returns the respective values. This means that only have $imageabs $imageabs_rc behind. nokeepaspect may be able to calculate the aspect ratio should be applied.

$setpercentmode(bx,by,bw,bh)

Set the mode to specify the coordinates. Window space (0,0) ~ (%_width%,%_height%) where a, percentage specified in the mode, (0,0) to (100100) mapping.

  • x,y,W,H, can be set individually.
  • x,y,W,H, all affect the function of one argument.
  • bx x coordinate specified mode
    • 0: Splitter mode specified in absolute coordinates
    • 1: Splitter value relative to the size (percentage) and designated.
  • mode specified by y coordinates
  • bw w coordinates specified mode
  • bh h coordinates specified mode

$getsyscolour (index)

The r-g-b color system in the fo

index: [0-30] color index system

$averagecolour(colour1,colour2[,···])

Calculates the average color R-g-b-a of a given set of colors.

(Colour1 + colour2 +···) / N

$blendcolour(colour1,w1,colour2,w2,[,···])

Calculates the average weighted w1,w2[,···] color R-g-b-a of a given set of colors.

(w1 * colur1 + w2 * colour2 +···+ wN * colourN) / (w1 + w2 +···+ wN)

$addcolour(colour1,colour2[,···])

Adds colors r-g-b-a of a given set.

Colour1 + colour2 + ··· + colourN

$subcolour(colour1,colour2[,···])

Substracts colors r-g-b-a of a given set.

Colour1 - colour2 - colour3···- colourN

General-purpose system functions

$findfile(path,[path2,path3,...])

Determinates whether the specified file(s) exist(s) and returns the first file. If you do not have the file does not return anything. (Strictly speaking, "false" returns). Path can be specified. The path allows wildcards.

Function buttons

$textbutton(x,y,w,h,text,mover_text,command,options1,options2)

Create a button. Per Track only available. Per Second is not to write.

  • text: the button label
  • mover_text: the button label when mouse over

command: "Type of instruction: arguments" specified in the form of

  • be no extra spaces
  • Going to be separated by a specified multiple orders.
  • A few instructions that can be specified.
  • Very difficult to implement. . .
  • And the splitter so that the characters and words in these arguments, could not parse well.

Note 1: Do not specify the order processing time. Note 2: If you specify more than one instruction, the instruction execution order is not guaranteed. Especially if WINDOWSIZE and COMMAND is specified, WINDOWSIZE probably be better to run. COMMAND, CONTEXT and others, the order may be warranted.

Command: command_path

  • command_path to run the command specified by menu.
  • COMMAND: View / Equalizer and COMMAND: File / Preferences; COMMAND: Playback / Play
  • To specify that you can use the input help in setting some of them.
  • TF command_path Note also that as COMMAND: 'View / Equalizer' and it's recommended.

Context: context_path

  • context_path KONTEKISUTOMENYUKOMANDO be designated to perform.
  • Handles the context menu of the currently playing track.
  • CONTEXT: Properties to specify the like.
  • TF context_path Note also that as

Panelshow: cap: sh

  • The caption of the child panel cap / hide.
  • sh: 0 hide
    • 1.
    • -1 Show / hide toggle

TFMode: mode

  • Per Track titleformat to change the mode.
  • mode: 0 nowplaying mode
    • 1 follow curosr mode
    • -1 Toggle

Windowsize: width:height

  • Sets the size of the entire foobar2000 window.

Setglobal: name:value

Refresh: TF of PerTrack, PerSecond update.

options1

specify the default decoration (can specify more than one, separated by spaces)

  • fontcolor: r-g-b color of the text
  • brushcolor: r-g-b-a color fills the rectangle button
  • pencolor: r-g-b-a color button border
  • left top bottom right position of the text

options2:

decorative specify when mouse over (can specify more than one, separated by spaces)

  • fontcolor: r-g-b color of the text
  • brushcolor: r-g-b-a color fills the rectangle button
  • pencolor: r-g-b-a color button border
  • left top bottom right position of the text


Examples:

  • $textbutton (0,0,80,20,play,play,COMMAND: Playback / Play,fontcolor:64-64-64 brushcolor:192-192-192-128 pencolor:0-0-0-0,fontcolor:32-32-32)
  • $textbutton (100,0,80,20,Resize,Resize,PANELSHOW:aaa:-1;REFRESH,fontcolor:64-64-64 left bottom,fontcolor:32-32-32)

$imagebutton(x,y,w,h,path,mover_path,command,options1,options2)

Create an image button. Per Track only available. Per Second is not to write. The internal processing of the images are treated equally and $imageabs will be cached in memory. w, h is omitted, path to original image size is specified. textbutton command is common.

Display options:

OPTIONS1

  • nokeepaspect
  • left
  • top
  • bottom
  • right

OPTIONS2:

When mouse over the image display options

  • nokeepaspect
  • left
  • top
  • bottom
  • right

GDI drawing functions

Using the Windows System Component GDI to draw. GDI functions are usually faster, but they do not allow alpha blending and shadow effects (glow).

$drawtext(text,x,y,W,H,r-g-b,OPTIONS)

GDI text drawing functions. Text coordinates (x, y) in output

OPTIONS:

  • Align left hcenter right specified horizontal
  • Align specified top vcenter bottom vertical
  • Not noclip clip

$drawtextex(text,x,y,W,H,r-g-b,OPTIONS)

GDI drawing functions text_2 Text coordinates (x, y) in output

OPTIONS

  • Align left hcenter right specified horizontal
  • Align specified top vcenter bottom vertical
  • Not noclip clip
  • Allow specified wrap wraparound (vcenter, bottom and exclusive)
  • end_ellipsis If you clip text, replace the end of the text ...

Example: $drawtextex(text,0,0,%_width%,%_height%,0-0-0,hcenter vcenter end_ellipsis)

$gettextwidth(text,[FONTNAME,SIZE,OPTIONS])

For the use with GDI text functions (drawtext, drawtextex). Returns the width in the text when drawing horizontal text. Optionaly the font can be specified FONTNAME, SIZE and OPTIONS (bold, italic, etc).

$gettextheight([FONTNAME,SIZE,OPTIONS])

For the use with GDI text functions (drawtext, drawtextex). Returns vertical width of text. can specify the font ($ font option). Optionaly the font can be specified FONTNAME, SIZE and OPTIONS (bold, italic, etc).

$fillrect(x,y,w,h,r-g-b,RESERVED)

Filled rectangle function

$fillroundrect(x,y,w,h,w2,h2,r1-g1-b1,r2-g2-b2)

Function of the fill rectangle with rounded corners

Panel operating system functions

Apparently drawing functions and the TF is such low efficiency of the frame together, Future plans to??.

$showpanel(i,sh) or $showpanel_c(caption,sh)

Panel, change the function inactive

  • i: somethingth in the child panel list (counting from 0)
  • sh: 0: Inactive 1: View

$movepanel(i,x,y,W,H,) or $movepanel_c(caption,x,y,W,H,)

i: something in the child panel list (counting from 0)

Panel Force layout only for the specified coordinates (x, y) size (w, h) to move on.

$getcaption(i)

i: returns the list of child panel captions are set in the second panel.

$isvisible_c(caption)

Returns the status panel.

External links