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.Remove(About1); //Remove About as separate menu
|
||||
AppMenu.Add(About1); //Add About as item in application menu
|
||||
|
||||
Find1.ShortCut := ShortCut(VK_F, [ssMeta]);
|
||||
CopyItem.ShortCut := ShortCut(VK_C, [ssMeta]);
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
|
@ -190,6 +190,9 @@ for I := 0 to MaxHistories-1 do
|
||||
MainMenu1.Items.Insert(0, AppMenu);
|
||||
MainMenu1.Items.Remove(About1); //Remove About as separate menu
|
||||
AppMenu.Add(About1); //Add About as item in application menu
|
||||
|
||||
Find1.ShortCut := ShortCut(VK_F, [ssMeta]);
|
||||
Copy1.ShortCut := ShortCut(VK_C, [ssMeta]);
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF MSWINDOWS}
|
||||
|
@ -35,7 +35,7 @@
|
||||
<PackageName Value="htmlcomp"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="1">
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="framedem.dpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
@ -46,6 +46,20 @@
|
||||
<Loaded Value="True"/>
|
||||
<SyntaxHighlighter Value="Delphi"/>
|
||||
</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>
|
||||
<JumpHistory Count="0" HistoryIndex="-1"/>
|
||||
</ProjectOptions>
|
||||
|
@ -35,7 +35,7 @@
|
||||
<PackageName Value="htmlcomp"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="1">
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="htmldemo.dpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
@ -46,6 +46,20 @@
|
||||
<Loaded Value="True"/>
|
||||
<SyntaxHighlighter Value="Delphi"/>
|
||||
</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>
|
||||
<JumpHistory Count="0" HistoryIndex="-1"/>
|
||||
</ProjectOptions>
|
||||
|
@ -26,7 +26,7 @@
|
||||
</CompilerOptions>
|
||||
<Description Value="HTML Components for Lazarus"/>
|
||||
<License Value="MPL 1.1"/>
|
||||
<Version Release="3"/>
|
||||
<Version Release="4"/>
|
||||
<Files Count="1">
|
||||
<Item1>
|
||||
<Filename Value="htmlcompreg.pas"/>
|
||||
|
@ -410,6 +410,7 @@ const
|
||||
PHYSICALOFFSETY = 113;
|
||||
|
||||
BM_SETCHECK = $00F1;
|
||||
PLANES = 14;
|
||||
NUMCOLORS = 24;
|
||||
STRETCH_DELETESCANS = 3;
|
||||
CP_ACP = 0; {ANSI code page}
|
||||
@ -807,6 +808,7 @@ begin
|
||||
{$IFDEF MSWINDOWS}
|
||||
Result := Windows.SetViewportExtEx(DC, XExt, YExt, Size);
|
||||
{$ELSE}
|
||||
// Result := LclIntf.SetViewportExtEx(DC, XExt, YExt, Size);
|
||||
Result := True;
|
||||
{$ENDIF}
|
||||
end;
|
||||
@ -862,7 +864,15 @@ end;
|
||||
function GetDeviceCaps(DC: HDC; Index: Integer): Integer;
|
||||
begin
|
||||
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.
|
||||
begin
|
||||
case Index of
|
||||
|
@ -1608,6 +1608,7 @@ inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure ClipBuffer.CopyToClipboard;
|
||||
{$IFNDEF LCL}
|
||||
{Unicode clipboard routine courtesy Mike Lischke}
|
||||
var
|
||||
Data: THandle;
|
||||
@ -1618,9 +1619,7 @@ begin
|
||||
DataPtr := GlobalLock(Data);
|
||||
try
|
||||
Move(Buffer^, DataPtr^, 2 * BufferLeng);
|
||||
{$IFNDEF LCL} //For now
|
||||
Clipboard.SetAsHandle(CF_UNICODETEXT, Data);
|
||||
{$ENDIF}
|
||||
finally
|
||||
GlobalUnlock(Data);
|
||||
end;
|
||||
@ -1628,6 +1627,13 @@ begin
|
||||
GlobalFree(Data);
|
||||
raise;
|
||||
end;
|
||||
{$ELSE}
|
||||
var
|
||||
Utf8Str : string;
|
||||
begin
|
||||
Utf8Str := WideCharLenToString(Buffer, BufferLeng);
|
||||
Clipboard.AddFormat(CF_TEXT, Utf8Str[1], Length(Utf8Str));
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function ClipBuffer.Terminate: integer;
|
||||
|
@ -3564,22 +3564,23 @@ try
|
||||
FreeAndNil(HeadViewer);
|
||||
FreeAndNil(FootViewer);
|
||||
if hRgnClip <> 0 then DeleteObject(hrgnClip);
|
||||
{$IFNDEF LCL}
|
||||
if not PrinterOpen then
|
||||
begin
|
||||
{$IFNDEF LCL}
|
||||
if (FromPage > FPage) then
|
||||
vwPrinter.Abort
|
||||
else
|
||||
vwPrinter.EndDoc;
|
||||
vwSetPrinter(OldPrinter);
|
||||
FreeAndNil(vwP);
|
||||
{$ELSE}
|
||||
if (FromPage > FPage) then
|
||||
Printer.Abort
|
||||
else
|
||||
Printer.EndDoc;
|
||||
{$ENDIF}
|
||||
end;
|
||||
{$ELSE}
|
||||
if (FromPage > FPage) then
|
||||
Printer.Abort
|
||||
else
|
||||
Printer.EndDoc;
|
||||
vwP := nil;
|
||||
{$ENDIF}
|
||||
Dec(FPage);
|
||||
end;
|
||||
finally
|
||||
@ -3618,6 +3619,7 @@ if Assigned(vwP) then
|
||||
{$ELSE}
|
||||
if vwP.Printing then
|
||||
Printer.EndDoc;
|
||||
vwP := nil;
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
@ -3634,6 +3636,7 @@ if Assigned(vwP) then
|
||||
{$ELSE}
|
||||
if vwP.Printing then
|
||||
Printer.Abort;
|
||||
vwP := nil;
|
||||
{$ENDIF}
|
||||
end;
|
||||
end;
|
||||
@ -4349,7 +4352,11 @@ var
|
||||
HTML: string;
|
||||
format : UINT;
|
||||
|
||||
{$IFNDEF LCL}
|
||||
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
|
||||
// Based on http://www.lorriman.com/programming/cf_html.html
|
||||
var
|
||||
@ -4365,6 +4372,8 @@ var
|
||||
copymemory(lp, pchar(source), length(source)+1);
|
||||
globalunlock(gMem);
|
||||
setClipboarddata(format, gMem);
|
||||
{$ELSE}
|
||||
clipboard.AddFormat(format, source[1], Length(source));
|
||||
{$ENDIF}
|
||||
finally
|
||||
clipboard.Close;
|
||||
@ -4579,7 +4588,11 @@ HTML := HTML+EndFrag;
|
||||
{Add the header to start}
|
||||
HTML := GetHeader(HTML)+HTML;
|
||||
|
||||
{$IFNDEF LCL}
|
||||
format := RegisterClipboardFormat('HTML Format'); {not sure this is necessary}
|
||||
{$ELSE}
|
||||
format := RegisterClipboardFormat('text/html');
|
||||
{$ENDIF}
|
||||
CopyFormatToClipBoard(HTML, format);
|
||||
end;
|
||||
|
||||
@ -5105,7 +5118,8 @@ with FViewer do
|
||||
if FSectionList.Printing then
|
||||
Exit; {no background}
|
||||
|
||||
ARect := Canvas.ClipRect;
|
||||
// ARect := Canvas.ClipRect; //bug? get invalid DC with Carbon
|
||||
ARect := ACanvas.ClipRect;
|
||||
Image := FSectionList.BackgroundBitmap;
|
||||
if FSectionList.ShowImages and Assigned(Image) then
|
||||
begin
|
||||
|
@ -733,8 +733,10 @@ repeat
|
||||
Value := Value+LCh;
|
||||
GetCh;
|
||||
end;
|
||||
Value1 := Trim(Lowercase(Value)); {leave quotes on for font:}
|
||||
Value := RemoveQuotes(Value1);
|
||||
// Value1 := Trim(Lowercase(Value)); {leave quotes on for font:} //Mac font names are case sensitive
|
||||
// Value := RemoveQuotes(Value1);
|
||||
Value1 := Trim(Value); {leave quotes on for font:}
|
||||
Value := RemoveQuotes(LowerCase(Value1));
|
||||
if FindShortHand(Prop, Index) then
|
||||
case Index of
|
||||
MarginX, BorderWidthX, PaddingX, BorderColorX, BorderStyleX:
|
||||
@ -885,7 +887,8 @@ var
|
||||
|
||||
begin
|
||||
LinkPath := '';
|
||||
S := Lowercase(PropertyStr);
|
||||
//S := Lowercase(PropertyStr); //Mac font names are case sensitive
|
||||
S := PropertyStr;
|
||||
I := 1;
|
||||
GetCh;
|
||||
repeat
|
||||
@ -908,7 +911,7 @@ repeat
|
||||
GetCh;
|
||||
end;
|
||||
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
|
||||
case Index of
|
||||
|
@ -56,7 +56,7 @@ the HTML document. </P>
|
||||
<LI><B>Font Faces</B> <UL>
|
||||
<LI><FONT FACE="Times New Roman">Times New Roman</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>
|
||||
</LI>
|
||||
<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>Color information may consist of a hexidecimal red, green, and blue value such as FF8000 or be one of the
|
||||
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,
|
||||
Blanchedalmond, Blueviolet, Brown, Burlywood, Cadetblue, Chartreuse, Chocolate, Coral, Cornflowerblue, Cornsilk,
|
||||
Crimson, Cyan, Darkblue, Darkcyan, Darkgoldenrod, Darkgray, Darkgreen, Darkkhaki, Darkmagenta, Darkolivegreen,
|
||||
|
Reference in New Issue
Block a user