diff options
author | Jean-Marc.Levecque <jmarc.levecque@bbox.fr> | 2014-11-10 14:16:36 +0100 |
---|---|---|
committer | Jean-Marc.Levecque <jmarc.levecque@bbox.fr> | 2014-11-10 14:16:36 +0100 |
commit | 4227d541f13ee55693d15e4a477b94be12090e23 (patch) | |
tree | 4770ec6b4ba2fe4af57232b2a81bb31cdd25f436 | |
parent | ba44c218aece88ae94d1f9c4708ff7379328c87f (diff) | |
parent | 453996807a4806860d30bde520fcc527376f4452 (diff) | |
download | fpGUI-4227d541f13ee55693d15e4a477b94be12090e23.tar.xz |
Merge branch 'develop' of https://github.com/graemeg/fpGUI.git into develop
-rw-r--r-- | docs/xml/corelib/examples/fpg_base.fpgcanvasbase.drawarc.pas | 7 | ||||
-rw-r--r-- | docs/xml/corelib/examples/fpg_base.fpgcanvasbase.fillarc.pas | 8 | ||||
-rw-r--r-- | docs/xml/corelib/fpg_base.xml | 151 | ||||
-rw-r--r-- | examples/gui/video_vlc/frmvlcplayer.pas | 4 | ||||
-rw-r--r-- | examples/gui/video_vlc/testfpguivlc.lpi | 6 | ||||
-rw-r--r-- | src/gui/selectdirdialog.inc | 5 |
6 files changed, 96 insertions, 85 deletions
diff --git a/docs/xml/corelib/examples/fpg_base.fpgcanvasbase.drawarc.pas b/docs/xml/corelib/examples/fpg_base.fpgcanvasbase.drawarc.pas new file mode 100644 index 00000000..d85fadf2 --- /dev/null +++ b/docs/xml/corelib/examples/fpg_base.fpgcanvasbase.drawarc.pas @@ -0,0 +1,7 @@ +{ This will draw a red arc, starting at the 6 o'clock position, and + drawing 90 degrees of the arc, ending at the 3 o'clock position. } +procedure TMainForm.FormPaint; // the forms OnPaint event handler +begin + Canvas.Color := clRed; + Canvas.DrawArc(5, 5, 100, 100, 270, 90); +end; diff --git a/docs/xml/corelib/examples/fpg_base.fpgcanvasbase.fillarc.pas b/docs/xml/corelib/examples/fpg_base.fpgcanvasbase.fillarc.pas new file mode 100644 index 00000000..897ac0ec --- /dev/null +++ b/docs/xml/corelib/examples/fpg_base.fpgcanvasbase.fillarc.pas @@ -0,0 +1,8 @@ +{ This will draw a red filled arc, starting at the 6 o'clock position, and + drawing 45 degrees of the arc, ending at the half-past-four position. } +procedure TMainForm.FormPaint; // the form's OnPaint event handler. +begin + Canvas.Color := clRed; + Canvas.FillArc(5, 5, 100, 100, 270, 45); +end; + diff --git a/docs/xml/corelib/fpg_base.xml b/docs/xml/corelib/fpg_base.xml index f052e2f0..2b60ae90 100644 --- a/docs/xml/corelib/fpg_base.xml +++ b/docs/xml/corelib/fpg_base.xml @@ -18,7 +18,7 @@ For more information, see the fpGUI Toolkit website at: <url href="http://fpgui. <descr><p>This unit contains all the abstract classes for the CoreLib code of fpGUI. It also defines many types and constants used throughout the toolkit. </p> - <p>When implementing support for a completely new windowing system + <p>When implementing support for a completely new windowing system (eg: Carbon used in Mac OS-X) you would implement all the abstract methods defined in this unit. </p> @@ -26,8 +26,8 @@ defined in this unit. <!-- alias type Visibility: default --> <element name="TfpgCoord"> <short>A custom type used to represent X and Y coordinates.</short> - <descr>Internally TfpgCoord is actually a Integer type. We created a custom -alias type for use in fpGUI in the event that we might want to change the + <descr>Internally TfpgCoord is actually a Integer type. We created a custom +alias type for use in fpGUI in the event that we might want to change the underlying type in the future. Example to floating points. </descr> <seealso/> @@ -39,54 +39,49 @@ underlying type in the future. Example to floating points. <p>TfpgColor is always in RRGGBB (Red, Green, Blue) format, no matter the operating system. </p> - <p>The <var>fpg_base</var> unit also contains definitions of many useful color -constants. It defines the standard predefined Delphi colors (like clRed, -clMagenta etc.), the 140 web safe colors using the defacto standard names as -used by Netscape and Internet Explorer web browsers. As well as some internal -color constants used by many GUI components (like clText, clWindowBackground + <p>The <var>fpg_base</var> unit also contains definitions of many useful color +constants. It defines the standard predefined Delphi colors (like clRed, +clMagenta etc.), the 140 web safe colors using the defacto standard names as +used by Netscape and Internet Explorer web browsers. As well as some internal +color constants used by many GUI components (like clText, clWindowBackground etc.). </p> - </descr> - <seealso/> - </element> - <!-- record type Visibility: default --> - <element name="TRGBTriple"> - <short>A record structure holding the RGBA values of a color</short> - <descr><printshort id="TRGBTriple"/>.</descr> - <seealso/> - </element> - <!-- variable Visibility: default --> - <element name="TRGBTriple.Alpha"> - <short>Alpha support has not really been implemented in fpGUI yet.</short> - <descr/> - <seealso/> - </element> - <!-- enumeration type Visibility: default --> - <element name="TWindowType"> - <short>Enum type defining what types of windows can be created.</short> - <descr/> - <seealso/> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWindowType.wtChild"> - <short>The window being created is a child on another window. This normally +</descr> +</element> + +<element name="TRGBTriple"> +<short>A record structure holding the RGBA values of a color</short> +<descr><printshort id="TRGBTriple"/>.</descr> +</element> + +<element name="TRGBTriple.Alpha"> +<short>Alpha support has not really been implemented in fpGUI yet.</short> +</element> + +<element name="TWindowType"> +<short>Enum type defining what types of windows can be created.</short> +</element> + +<element name="TWindowType.wtChild"> +<short>The window being created is a child on another window. This normally means no titlebar or window borders are going to be created.</short> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWindowType.wtWindow"> - <short>This would specify a standard window with titlebar and window borders.</short> - <descr>This would specify a standard window with titlebar and window borders. It grabs input focus, and appears in the taskbar.</descr> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWindowType.wtModalForm"> - <short>This windows type is similar to wtWindow, but grabs focus.</short> - <descr>This windows is the same as <link id="#fpgui.fpg_base.TWindowType.wtWindow">wtWindow</link>, but grabs the input focus until it has closed. This window normally doesn't appear in the taskbar.</descr> - </element> - <!-- enumeration value Visibility: default --> - <element name="TWindowType.wtPopup"> - <short>This window will normally not have a titlebar or window borders.</short> - <descr>This window will normally not have a titlebar or window borders and will appear above other windows. It is used for example in the dropdown window of a ComboBox or a tooltip window or popup menus. This type of window does not steal focus.</descr> - </element> +</element> + +<element name="TWindowType.wtWindow"> +<short>This would specify a standard window with titlebar and window borders. It grabs input +focus, and appears in the taskbar.</short> +</element> + +<element name="TWindowType.wtModalForm"> +<short>This windows is similar to <link id="#fpgui.fpg_base.TWindowType.wtWindow">wtWindow</link>, but grabs +the input focus until it has closed. This window normally doesn't appear in the taskbar.</short> +</element> + +<element name="TWindowType.wtPopup"> +<short>This window will normally not have a titlebar or window borders and will appear above other windows. It +is used for example in the dropdown window of a ComboBox or a tooltip window or popup menus. This type of +window does not steal focus.</short> +</element> <element name="TWindowAttribute"> <short>An enum types defining extra attributes of a window.</short> @@ -130,7 +125,7 @@ the first time.</short> <link id="fpg_base.TWindowAttribute">TWindowAttribute</link> </seealso> </element> - + <!-- enumeration type Visibility: default --> <element name="TMouseCursor"> <short>Enum types of the available mouse cursor shapes.</short> @@ -371,7 +366,7 @@ the first time.</short> <element name="TfpgRect"> <short>A graphical (pixel based) rectangle structure used throughout fpGUI.</short> <descr> - <p>Note that this structure is not a class, so static allocations are + <p>Note that this structure is not a class, so static allocations are allowed. This makes it much easier to use in Widgets and in fpGUI internal messages.</p> <p>Think of the pixel screen/grid like the grid of a spreadsheet (or as a magnified look of the top corner of your screen). @@ -387,11 +382,11 @@ messages.</p> +---+---+--- | | | </pre> - <p>x is at (0,0). A pixel is always 1x1, you don't get smaller (we are not using sub-pixels like on LCD screens, because they don't apply to all screens). + <p>x is at (0,0). A pixel is always 1x1, you don't get smaller (we are not using sub-pixels like on LCD screens, because they don't apply to all screens). </p> - <p>So with that example, Width = 1 pixel and Height = 1 pixel. In the case of -Classes.Bounds() the Right and Bottom values are (1,1) which looking at the -above image will be wrong, the pixel only covers one block, so in a screen/pixel + <p>So with that example, Width = 1 pixel and Height = 1 pixel. In the case of +Classes.Bounds() the Right and Bottom values are (1,1) which looking at the +above image will be wrong, the pixel only covers one block, so in a screen/pixel environment, Right, Bottom is also (0,0), the same as Top/Left. This is what TfpgRect.Right and TfpgRect.Bottom will report. </p> @@ -406,20 +401,20 @@ TfpgRect.Right and TfpgRect.Bottom will report. +---+---+--- | | | </pre> - <p>In this example we have a rectangle. Top/Left = (0,0) and Bottom/Right = (1,1). -This means Width = 2 pixels and Height = 2 pixels. Clearly visible in the image + <p>In this example we have a rectangle. Top/Left = (0,0) and Bottom/Right = (1,1). +This means Width = 2 pixels and Height = 2 pixels. Clearly visible in the image above. </p> - <p>But if we call Classes.Bounds(0,0,2,2) it reports Bottom/Right as (2,2) which -is wrong (again looking at the image above as reference). This is my point. + <p>But if we call Classes.Bounds(0,0,2,2) it reports Bottom/Right as (2,2) which +is wrong (again looking at the image above as reference). This is my point. Bounds() cannot be used in this case in a graphical environment. </p> - <p>The reason I don't use a grid layout as shown below, is -because if the mouse is over the rectangle containing x, the OS (graphics system) reports its -position as (0,0). You don't have to have the mouse pointer over the intersecting -lines at (0,0) as indicated in the image below. The whole square containing + <p>The reason I don't use a grid layout as shown below, is +because if the mouse is over the rectangle containing x, the OS (graphics system) reports its +position as (0,0). You don't have to have the mouse pointer over the intersecting +lines at (0,0) as indicated in the image below. The whole square containing the x is referenced as (0,0), hence the grid layout as show in the images above, -and what fpGUI uses. The same grid layout as used in TfpgStringGrid or any +and what fpGUI uses. The same grid layout as used in TfpgStringGrid or any Spreadsheet program etc. </p> <pre>. @@ -646,7 +641,7 @@ redundant calculations, fpGUI allows you to set all the properties, then act on it once you call <var>UpdateWindowPosition</var>. In most cases fpGUI can even reduce the API calls needed, because it could pass for example Width and Height via one API call. In the case of X11, it can actually do all -four values in a single API call. Thus improving efficiency and reduces resize +four values in a single API call. Thus improving efficiency and reduces resize calculations and screen redraws.</p> </descr> </element> @@ -657,7 +652,7 @@ calculations and screen redraws.</p> of the control begins or to reposition the left side of the control. </p> <remark>fpGUI delays acting on the Top, Left, Width and Height properties of a control until the -<var>UpdateWindowPosition</var> method is called. For more information on why this is so, +<var>UpdateWindowPosition</var> method is called. For more information on why this is so, see <link id="#fpgui.fpg_base.TfpgWindowBase.UpdateWindowPosition">UpdateWindowPosition</link> help.</remark></descr> <seealso> @@ -671,7 +666,7 @@ help.</remark></descr> of the control begins or to reposition the top side of the control. </p> <remark>fpGUI delays acting on the Top, Left, Width and Height properties of a control until the -<var>UpdateWindowPosition</var> method is called. For more information on why this +<var>UpdateWindowPosition</var> method is called. For more information on why this is so, see <link id="#fpgui.fpg_base.TfpgWindowBase.UpdateWindowPosition">UpdateWindowPosition</link> help.</remark></descr> <seealso> @@ -687,7 +682,7 @@ controls that have their Align property set to alTop, alBottom or alClient, chan this property at runtime has no effect. </p> <remark>fpGUI delays acting on the Top, Left, Width and Height properties of a control until the -<var>UpdateWindowPosition</var> method is called. For more information on why this is so, +<var>UpdateWindowPosition</var> method is called. For more information on why this is so, see <link id="#fpgui.fpg_base.TfpgWindowBase.UpdateWindowPosition">UpdateWindowPosition</link> help.</remark></descr> <seealso> @@ -703,7 +698,7 @@ controls that have their Align property set to alLeft, alRight or alClient, chan this property at runtime has no effect. </p> <remark>fpGUI delays acting on the Top, Left, Width and Height properties of a control until the -<var>UpdateWindowPosition</var> method is called. For more information on why this +<var>UpdateWindowPosition</var> method is called. For more information on why this is so, see <link id="#fpgui.fpg_base.TfpgWindowBase.UpdateWindowPosition">UpdateWindowPosition</link> help.</remark></descr> <seealso> @@ -807,7 +802,7 @@ you must keep copy of the original image before you call <var>Invert</var>.</des <element name="TfpgBaseInterpolation"> <short>A abstract class representing a base Interpolation filter.</short> <descr>This is used as the base class to implement Interpolation filters like -Gaussian, Sinc etc... These decendant filters are used in the +Gaussian, Sinc etc... These decendant filters are used in the <link id="#fpgui.fpg_base.TfpgCanvasBase.StretchDraw">Canvas.StretchDraw</link> function. </descr> <seealso> @@ -823,9 +818,9 @@ Gaussian, Sinc etc... These decendant filters are used in the <!-- procedure Visibility: public --> <element name="TfpgCanvasBase.DrawLine"> <short>Draws a line</short> - <descr><printshort id="#fpgui.fpg_base.TfpgCanvasBase.DrawLine"/>. This method -draws a line from (x1,y1) to (x2,y2), but does not draw the last pixel. All supported -backends follow the Microsoft API and doesn't draw the last pixel. This optimises + <descr><printshort id="#fpgui.fpg_base.TfpgCanvasBase.DrawLine"/>. This method +draws a line from (x1,y1) to (x2,y2), but does not draw the last pixel. All supported +backends follow the Microsoft API and doesn't draw the last pixel. This optimises consecutive lines being drawn without overlapping pixels.</descr> </element> @@ -897,7 +892,7 @@ returns the correct enum type detected. <!-- function Visibility: default --> <element name="fpgGetAvgColor"> <short>Calculates the average color using the two supplied</short> - <descr>This function calculates and returns the average color by using AColor1 + <descr>This function calculates and returns the average color by using AColor1 and AColor2. The Alpha value also gets taken into account. </descr> </element> @@ -913,7 +908,7 @@ rectangle ARect. If it is, the function returns True, otherwise False. <!-- procedure Visibility: default --> <element name="SortRect"> <short>Fixes the Top, Bottom and Left, Right to always represent a valid rectangle</short> - <descr>This function fixes a rectangle so that the Left point is always smaller than the + <descr>This function fixes a rectangle so that the Left point is always smaller than the Right. And the Top is always smaller than the Bottom. </descr> </element> @@ -929,7 +924,7 @@ Right. And the Top is always smaller than the Bottom. For a detailed explanation see: http://www.nondot.org/~sabre/graphpro/line6.html </p></descr> </element> - + <element name="TfpgCanvasBase.ClipLine"> <short>Clips the line based on AClipRect boundaries.</short> <descr>This does not do any drawing, in only clips the line coordinates. This method is used internally by <link id="TfpgCanvasBase.DrawLineClipped"/>.</descr> @@ -958,7 +953,7 @@ value to draw the arc.</p> <dt>h</dt> <dd>The height of the whole arc</dd> <dt>a1</dt> -<dd>This is the starting point of the arc. A value of 0 is the 3 o'clock +<dd>This is the starting point of the arc. A value of 0 is the 3 o'clock position. A value of 270 is the 6 o'clock position. Positive values move counter-clockwise, and negative values move clockwise.</dd> <dt>a2</dt> @@ -974,7 +969,7 @@ goes counter-clockwise, and a negative values goes clockwise.</dd> <element name="TfpgCanvasBase.FillArc.a1"> -<descr>This is the starting point of the arc. A value of 0 is the 3 o'clock +<descr>This is the starting point of the arc. A value of 0 is the 3 o'clock position. A value of 270 is the 6 o'clock position. Positive values move counter-clockwise, and negative values move clockwise.</descr> </element> @@ -994,7 +989,7 @@ value to draw and fill the arc.</p> <dt>h</dt> <dd>The height of the whole arc</dd> <dt>a1</dt> -<dd>This is the starting point of the arc. A value of 0 is the 3 o'clock +<dd>This is the starting point of the arc. A value of 0 is the 3 o'clock position. A value of 270 is the 6 o'clock position. Positive values move counter-clockwise, and negative values move clockwise.</dd> <dt>a2</dt> diff --git a/examples/gui/video_vlc/frmvlcplayer.pas b/examples/gui/video_vlc/frmvlcplayer.pas index 7b44c1e1..aeea3e0c 100644 --- a/examples/gui/video_vlc/frmvlcplayer.pas +++ b/examples/gui/video_vlc/frmvlcplayer.pas @@ -6,7 +6,7 @@ interface uses SysUtils, Classes, fpg_base, fpg_panel, fpg_button, fpg_main, fpg_form, - fpg_editbtn, fpg_memo, fpg_label, libvlc, vlc, fpg_vlc; + fpg_editbtn, fpg_memo, fpg_label, vlc, fpg_vlc; type @@ -23,8 +23,8 @@ type Button3: TfpgButton; Button4: TfpgButton; Memo1: TfpgMemo; - procedure Sync; {@VFD_HEAD_END: VLCPlayerDemo} + procedure Sync; public P : TFpgVLCPlayer; FMsg: String; diff --git a/examples/gui/video_vlc/testfpguivlc.lpi b/examples/gui/video_vlc/testfpguivlc.lpi index d7a4ad2a..7839f71a 100644 --- a/examples/gui/video_vlc/testfpguivlc.lpi +++ b/examples/gui/video_vlc/testfpguivlc.lpi @@ -50,17 +50,17 @@ <UnitName Value="frmvlcplayer"/> </Unit1> <Unit2> - <Filename Value="../fpg_vlc.pas"/> + <Filename Value="../../../src/3rdparty/libvlc/fpg_vlc.pas"/> <IsPartOfProject Value="True"/> <UnitName Value="fpg_vlc"/> </Unit2> <Unit3> - <Filename Value="../../libvlc/libvlc.pp"/> + <Filename Value="../../../src/3rdparty/libvlc/libvlc.pas"/> <IsPartOfProject Value="True"/> <UnitName Value="libvlc"/> </Unit3> <Unit4> - <Filename Value="../../libvlc/vlc.pas"/> + <Filename Value="../../../src/3rdparty/libvlc/vlc.pas"/> <IsPartOfProject Value="True"/> <UnitName Value="vlc"/> </Unit4> diff --git a/src/gui/selectdirdialog.inc b/src/gui/selectdirdialog.inc index 6a96d046..063c7972 100644 --- a/src/gui/selectdirdialog.inc +++ b/src/gui/selectdirdialog.inc @@ -135,7 +135,6 @@ begin begin try SortList := TStringList.Create; - SortList.Sorted := True; repeat // check if special file if (FileInfo.Name = '.') or (FileInfo.Name = '..') or (FileInfo.Name = '') then @@ -153,10 +152,12 @@ begin hidden files then do not add it to the list. } //if ((faHidden and FileInfo.Attr) > 0) and not FShowHidden then //continue; - SortList.Add(FileInfo.Name); end; until fpgFindNext(FileInfo) <> 0; + + SortList.Sort; + for i := 0 to SortList.Count - 1 do begin NewNode := Node.AppendText(SortList[i]); |