You've already forked lazarus-ccr
Start on version 0.0.4: variety of fixes and workarounds
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1405 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -197,6 +197,9 @@ for I := 0 to MaxHistories-1 do
|
|||||||
MainMenu.Items.Insert(0, AppMenu);
|
MainMenu.Items.Insert(0, AppMenu);
|
||||||
MainMenu.Items.Remove(About1); //Remove About as separate menu
|
MainMenu.Items.Remove(About1); //Remove About as separate menu
|
||||||
AppMenu.Add(About1); //Add About as item in application menu
|
AppMenu.Add(About1); //Add About as item in application menu
|
||||||
|
|
||||||
|
Find1.ShortCut := ShortCut(VK_F, [ssMeta]);
|
||||||
|
CopyItem.ShortCut := ShortCut(VK_C, [ssMeta]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
|
@ -190,6 +190,9 @@ for I := 0 to MaxHistories-1 do
|
|||||||
MainMenu1.Items.Insert(0, AppMenu);
|
MainMenu1.Items.Insert(0, AppMenu);
|
||||||
MainMenu1.Items.Remove(About1); //Remove About as separate menu
|
MainMenu1.Items.Remove(About1); //Remove About as separate menu
|
||||||
AppMenu.Add(About1); //Add About as item in application menu
|
AppMenu.Add(About1); //Add About as item in application menu
|
||||||
|
|
||||||
|
Find1.ShortCut := ShortCut(VK_F, [ssMeta]);
|
||||||
|
Copy1.ShortCut := ShortCut(VK_C, [ssMeta]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<PackageName Value="htmlcomp"/>
|
<PackageName Value="htmlcomp"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="1">
|
<Units Count="2">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="framedem.dpr"/>
|
<Filename Value="framedem.dpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
@ -46,6 +46,20 @@
|
|||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<SyntaxHighlighter Value="Delphi"/>
|
<SyntaxHighlighter Value="Delphi"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
|
<Unit1>
|
||||||
|
<Filename Value="fdemunit.pas"/>
|
||||||
|
<ComponentName Value="Form1"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<ResourceFilename Value="fdemunit.lrs"/>
|
||||||
|
<UnitName Value="FDemUnit"/>
|
||||||
|
<CursorPos X="1" Y="1"/>
|
||||||
|
<TopLine Value="1"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<UsageCount Value="20"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit1>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="0" HistoryIndex="-1"/>
|
<JumpHistory Count="0" HistoryIndex="-1"/>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<PackageName Value="htmlcomp"/>
|
<PackageName Value="htmlcomp"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="1">
|
<Units Count="2">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="htmldemo.dpr"/>
|
<Filename Value="htmldemo.dpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
@ -46,6 +46,20 @@
|
|||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<SyntaxHighlighter Value="Delphi"/>
|
<SyntaxHighlighter Value="Delphi"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
|
<Unit1>
|
||||||
|
<Filename Value="demounit.pas"/>
|
||||||
|
<ComponentName Value="Form1"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<ResourceFilename Value="demounit.lrs"/>
|
||||||
|
<UnitName Value="demounit"/>
|
||||||
|
<CursorPos X="1" Y="1"/>
|
||||||
|
<TopLine Value="1"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<UsageCount Value="20"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit1>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="0" HistoryIndex="-1"/>
|
<JumpHistory Count="0" HistoryIndex="-1"/>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Description Value="HTML Components for Lazarus"/>
|
<Description Value="HTML Components for Lazarus"/>
|
||||||
<License Value="MPL 1.1"/>
|
<License Value="MPL 1.1"/>
|
||||||
<Version Release="3"/>
|
<Version Release="4"/>
|
||||||
<Files Count="1">
|
<Files Count="1">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="htmlcompreg.pas"/>
|
<Filename Value="htmlcompreg.pas"/>
|
||||||
|
@ -410,7 +410,8 @@ const
|
|||||||
PHYSICALOFFSETY = 113;
|
PHYSICALOFFSETY = 113;
|
||||||
|
|
||||||
BM_SETCHECK = $00F1;
|
BM_SETCHECK = $00F1;
|
||||||
NUMCOLORS = 24;
|
PLANES = 14;
|
||||||
|
NUMCOLORS = 24;
|
||||||
STRETCH_DELETESCANS = 3;
|
STRETCH_DELETESCANS = 3;
|
||||||
CP_ACP = 0; {ANSI code page}
|
CP_ACP = 0; {ANSI code page}
|
||||||
CP_OEMCP = 1; {OEM code page }
|
CP_OEMCP = 1; {OEM code page }
|
||||||
@ -807,6 +808,7 @@ begin
|
|||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
Result := Windows.SetViewportExtEx(DC, XExt, YExt, Size);
|
Result := Windows.SetViewportExtEx(DC, XExt, YExt, Size);
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
|
// Result := LclIntf.SetViewportExtEx(DC, XExt, YExt, Size);
|
||||||
Result := True;
|
Result := True;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
@ -862,7 +864,15 @@ end;
|
|||||||
function GetDeviceCaps(DC: HDC; Index: Integer): Integer;
|
function GetDeviceCaps(DC: HDC; Index: Integer): Integer;
|
||||||
begin
|
begin
|
||||||
if DC <> 1 then
|
if DC <> 1 then
|
||||||
Result := LclIntf.GetDeviceCaps(DC, Index)
|
begin
|
||||||
|
{First check for Index values that may not be implemented in widgetset}
|
||||||
|
if Index = PLANES then
|
||||||
|
Result := 1
|
||||||
|
else if Index = NUMCOLORS then
|
||||||
|
Result := 100 {Return large enough value so not BxW device}
|
||||||
|
else
|
||||||
|
Result := LclIntf.GetDeviceCaps(DC, Index);
|
||||||
|
end
|
||||||
else //Assume dummy DC is for CUPS printer canvas.
|
else //Assume dummy DC is for CUPS printer canvas.
|
||||||
begin
|
begin
|
||||||
case Index of
|
case Index of
|
||||||
|
@ -1608,6 +1608,7 @@ inherited Destroy;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ClipBuffer.CopyToClipboard;
|
procedure ClipBuffer.CopyToClipboard;
|
||||||
|
{$IFNDEF LCL}
|
||||||
{Unicode clipboard routine courtesy Mike Lischke}
|
{Unicode clipboard routine courtesy Mike Lischke}
|
||||||
var
|
var
|
||||||
Data: THandle;
|
Data: THandle;
|
||||||
@ -1618,9 +1619,7 @@ begin
|
|||||||
DataPtr := GlobalLock(Data);
|
DataPtr := GlobalLock(Data);
|
||||||
try
|
try
|
||||||
Move(Buffer^, DataPtr^, 2 * BufferLeng);
|
Move(Buffer^, DataPtr^, 2 * BufferLeng);
|
||||||
{$IFNDEF LCL} //For now
|
|
||||||
Clipboard.SetAsHandle(CF_UNICODETEXT, Data);
|
Clipboard.SetAsHandle(CF_UNICODETEXT, Data);
|
||||||
{$ENDIF}
|
|
||||||
finally
|
finally
|
||||||
GlobalUnlock(Data);
|
GlobalUnlock(Data);
|
||||||
end;
|
end;
|
||||||
@ -1628,6 +1627,13 @@ begin
|
|||||||
GlobalFree(Data);
|
GlobalFree(Data);
|
||||||
raise;
|
raise;
|
||||||
end;
|
end;
|
||||||
|
{$ELSE}
|
||||||
|
var
|
||||||
|
Utf8Str : string;
|
||||||
|
begin
|
||||||
|
Utf8Str := WideCharLenToString(Buffer, BufferLeng);
|
||||||
|
Clipboard.AddFormat(CF_TEXT, Utf8Str[1], Length(Utf8Str));
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ClipBuffer.Terminate: integer;
|
function ClipBuffer.Terminate: integer;
|
||||||
|
@ -3564,22 +3564,23 @@ try
|
|||||||
FreeAndNil(HeadViewer);
|
FreeAndNil(HeadViewer);
|
||||||
FreeAndNil(FootViewer);
|
FreeAndNil(FootViewer);
|
||||||
if hRgnClip <> 0 then DeleteObject(hrgnClip);
|
if hRgnClip <> 0 then DeleteObject(hrgnClip);
|
||||||
|
{$IFNDEF LCL}
|
||||||
if not PrinterOpen then
|
if not PrinterOpen then
|
||||||
begin
|
begin
|
||||||
{$IFNDEF LCL}
|
|
||||||
if (FromPage > FPage) then
|
if (FromPage > FPage) then
|
||||||
vwPrinter.Abort
|
vwPrinter.Abort
|
||||||
else
|
else
|
||||||
vwPrinter.EndDoc;
|
vwPrinter.EndDoc;
|
||||||
vwSetPrinter(OldPrinter);
|
vwSetPrinter(OldPrinter);
|
||||||
FreeAndNil(vwP);
|
FreeAndNil(vwP);
|
||||||
{$ELSE}
|
|
||||||
if (FromPage > FPage) then
|
|
||||||
Printer.Abort
|
|
||||||
else
|
|
||||||
Printer.EndDoc;
|
|
||||||
{$ENDIF}
|
|
||||||
end;
|
end;
|
||||||
|
{$ELSE}
|
||||||
|
if (FromPage > FPage) then
|
||||||
|
Printer.Abort
|
||||||
|
else
|
||||||
|
Printer.EndDoc;
|
||||||
|
vwP := nil;
|
||||||
|
{$ENDIF}
|
||||||
Dec(FPage);
|
Dec(FPage);
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
@ -3618,6 +3619,7 @@ if Assigned(vwP) then
|
|||||||
{$ELSE}
|
{$ELSE}
|
||||||
if vwP.Printing then
|
if vwP.Printing then
|
||||||
Printer.EndDoc;
|
Printer.EndDoc;
|
||||||
|
vwP := nil;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -3634,6 +3636,7 @@ if Assigned(vwP) then
|
|||||||
{$ELSE}
|
{$ELSE}
|
||||||
if vwP.Printing then
|
if vwP.Printing then
|
||||||
Printer.Abort;
|
Printer.Abort;
|
||||||
|
vwP := nil;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -4349,7 +4352,11 @@ var
|
|||||||
HTML: string;
|
HTML: string;
|
||||||
format : UINT;
|
format : UINT;
|
||||||
|
|
||||||
|
{$IFNDEF LCL}
|
||||||
procedure copyFormatToClipBoard(const source: string; format : UINT);
|
procedure copyFormatToClipBoard(const source: string; format : UINT);
|
||||||
|
{$ELSE} //changed to var to use with AddFormat below
|
||||||
|
procedure copyFormatToClipBoard(var source: string; format : UINT);
|
||||||
|
{$ENDIF}
|
||||||
// Put SOURCE on the clipboard, using FORMAT as the clipboard format
|
// Put SOURCE on the clipboard, using FORMAT as the clipboard format
|
||||||
// Based on http://www.lorriman.com/programming/cf_html.html
|
// Based on http://www.lorriman.com/programming/cf_html.html
|
||||||
var
|
var
|
||||||
@ -4365,6 +4372,8 @@ var
|
|||||||
copymemory(lp, pchar(source), length(source)+1);
|
copymemory(lp, pchar(source), length(source)+1);
|
||||||
globalunlock(gMem);
|
globalunlock(gMem);
|
||||||
setClipboarddata(format, gMem);
|
setClipboarddata(format, gMem);
|
||||||
|
{$ELSE}
|
||||||
|
clipboard.AddFormat(format, source[1], Length(source));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
finally
|
finally
|
||||||
clipboard.Close;
|
clipboard.Close;
|
||||||
@ -4579,7 +4588,11 @@ HTML := HTML+EndFrag;
|
|||||||
{Add the header to start}
|
{Add the header to start}
|
||||||
HTML := GetHeader(HTML)+HTML;
|
HTML := GetHeader(HTML)+HTML;
|
||||||
|
|
||||||
|
{$IFNDEF LCL}
|
||||||
format := RegisterClipboardFormat('HTML Format'); {not sure this is necessary}
|
format := RegisterClipboardFormat('HTML Format'); {not sure this is necessary}
|
||||||
|
{$ELSE}
|
||||||
|
format := RegisterClipboardFormat('text/html');
|
||||||
|
{$ENDIF}
|
||||||
CopyFormatToClipBoard(HTML, format);
|
CopyFormatToClipBoard(HTML, format);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -5105,7 +5118,8 @@ with FViewer do
|
|||||||
if FSectionList.Printing then
|
if FSectionList.Printing then
|
||||||
Exit; {no background}
|
Exit; {no background}
|
||||||
|
|
||||||
ARect := Canvas.ClipRect;
|
// ARect := Canvas.ClipRect; //bug? get invalid DC with Carbon
|
||||||
|
ARect := ACanvas.ClipRect;
|
||||||
Image := FSectionList.BackgroundBitmap;
|
Image := FSectionList.BackgroundBitmap;
|
||||||
if FSectionList.ShowImages and Assigned(Image) then
|
if FSectionList.ShowImages and Assigned(Image) then
|
||||||
begin
|
begin
|
||||||
|
@ -733,8 +733,10 @@ repeat
|
|||||||
Value := Value+LCh;
|
Value := Value+LCh;
|
||||||
GetCh;
|
GetCh;
|
||||||
end;
|
end;
|
||||||
Value1 := Trim(Lowercase(Value)); {leave quotes on for font:}
|
// Value1 := Trim(Lowercase(Value)); {leave quotes on for font:} //Mac font names are case sensitive
|
||||||
Value := RemoveQuotes(Value1);
|
// Value := RemoveQuotes(Value1);
|
||||||
|
Value1 := Trim(Value); {leave quotes on for font:}
|
||||||
|
Value := RemoveQuotes(LowerCase(Value1));
|
||||||
if FindShortHand(Prop, Index) then
|
if FindShortHand(Prop, Index) then
|
||||||
case Index of
|
case Index of
|
||||||
MarginX, BorderWidthX, PaddingX, BorderColorX, BorderStyleX:
|
MarginX, BorderWidthX, PaddingX, BorderColorX, BorderStyleX:
|
||||||
@ -885,7 +887,8 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
LinkPath := '';
|
LinkPath := '';
|
||||||
S := Lowercase(PropertyStr);
|
//S := Lowercase(PropertyStr); //Mac font names are case sensitive
|
||||||
|
S := PropertyStr;
|
||||||
I := 1;
|
I := 1;
|
||||||
GetCh;
|
GetCh;
|
||||||
repeat
|
repeat
|
||||||
@ -908,7 +911,7 @@ repeat
|
|||||||
GetCh;
|
GetCh;
|
||||||
end;
|
end;
|
||||||
Value1 := Trim(Value); {leave quotes on for font}
|
Value1 := Trim(Value); {leave quotes on for font}
|
||||||
Value := RemoveQuotes(Value1);
|
Value := RemoveQuotes(LowerCase(Value1)); //added LowerCase here since no longer doing it above
|
||||||
|
|
||||||
if FindShortHand(Prop, Index) then
|
if FindShortHand(Prop, Index) then
|
||||||
case Index of
|
case Index of
|
||||||
|
@ -56,7 +56,7 @@ the HTML document. </P>
|
|||||||
<LI><B>Font Faces</B> <UL>
|
<LI><B>Font Faces</B> <UL>
|
||||||
<LI><FONT FACE="Times New Roman">Times New Roman</FONT> </LI>
|
<LI><FONT FACE="Times New Roman">Times New Roman</FONT> </LI>
|
||||||
<LI><FONT FACE="Arial">Arial</FONT> </LI>
|
<LI><FONT FACE="Arial">Arial</FONT> </LI>
|
||||||
<LI><FONT SIZE="5" FACE="WingDings">ñ¸(6</FONT> (WingDings) </LI>
|
<LI><FONT SIZE="5" FACE="Wingdings">ñ¸(6</FONT> (Wingdings) </LI>
|
||||||
</UL>
|
</UL>
|
||||||
</LI>
|
</LI>
|
||||||
<LI><B>Font Sizes</B> <FONT SIZE="1">1</FONT> <FONT SIZE="2">2</FONT> <FONT SIZE="3">3</FONT> <FONT
|
<LI><B>Font Sizes</B> <FONT SIZE="1">1</FONT> <FONT SIZE="2">2</FONT> <FONT SIZE="3">3</FONT> <FONT
|
||||||
|
@ -272,7 +272,7 @@
|
|||||||
<P CLASS="heading"><A NAME="colors">Color Syntax</A></P>
|
<P CLASS="heading"><A NAME="colors">Color Syntax</A></P>
|
||||||
<P>Color information may consist of a hexidecimal red, green, and blue value such as FF8000 or be one of the
|
<P>Color information may consist of a hexidecimal red, green, and blue value such as FF8000 or be one of the
|
||||||
following identifiers: </P>
|
following identifiers: </P>
|
||||||
<P STYLE="font-family: 'courier new'; margin: 0 25px;"> Black, Maroon, Green, Olive, Navy, Purple, Teal, Gray,
|
<P STYLE="font-family: 'Courier New'; margin: 0 25px;"> Black, Maroon, Green, Olive, Navy, Purple, Teal, Gray,
|
||||||
Silver, Red, Lime, Yellow, Blue, Fuchsia, Aqua, white, Aliceblue, Antiquewhite, Aquamarine, Azure, Beige, Bisque,
|
Silver, Red, Lime, Yellow, Blue, Fuchsia, Aqua, white, Aliceblue, Antiquewhite, Aquamarine, Azure, Beige, Bisque,
|
||||||
Blanchedalmond, Blueviolet, Brown, Burlywood, Cadetblue, Chartreuse, Chocolate, Coral, Cornflowerblue, Cornsilk,
|
Blanchedalmond, Blueviolet, Brown, Burlywood, Cadetblue, Chartreuse, Chocolate, Coral, Cornflowerblue, Cornsilk,
|
||||||
Crimson, Cyan, Darkblue, Darkcyan, Darkgoldenrod, Darkgray, Darkgreen, Darkkhaki, Darkmagenta, Darkolivegreen,
|
Crimson, Cyan, Darkblue, Darkcyan, Darkgoldenrod, Darkgray, Darkgreen, Darkkhaki, Darkmagenta, Darkolivegreen,
|
||||||
|
Reference in New Issue
Block a user