Rectangle rb = Slot + Parent.ClientRectangle.Position;
if (clearBackground) {
- ctx.Save ();
- ctx.Operator = Operator.Clear;
- ctx.Rectangle (rb);
- ctx.Fill ();
- ctx.Restore ();
+ ctx.Save ();
+ ctx.Operator = Operator.Clear;
+ ctx.Rectangle (rb);
+ ctx.Fill ();
+ ctx.Restore ();
}
ctx.SetSourceSurface (bmp, rb.X, rb.Y);
onDraw (ctx);
if (!isEnabled)
paintDisabled (ctx, Slot);
-
- //ctx.Translate (-rb.X, -rb.Y);
+
ctx.Restore ();
}
LastPaintedSlot = Slot;
<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<Reference Include="System" />
- <PackageReference Include="CVKL" Version="0.1.3.2-beta" />
+ <PackageReference Include="CVKL" Version="0.1.5-beta" />
<ProjectReference Include="..\..\Crow\Crow.csproj" />
</ItemGroup>
<Compile Include="src\**\*.cs" Exclude="src\ProjectTree\CSProjectFile.cs" />
<EmbeddedResource Remove="icons\blank-file2.svg" />
<EmbeddedResource Include="icons\*.*">
- <LogicalName>icons.%(Filename)%(Extension)</LogicalName>
+ <LogicalName>CrowIDE.icons.%(Filename)%(Extension)</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="ui\**\*.crow" />
<EmbeddedResource Include="ui\**\*.itemp" />
go.DataSource = this;
mainDock = go.FindByName ("mainDock") as DockStack;
-
+ ReopenLastSolution = false;
if (ReopenLastSolution && !string.IsNullOrEmpty (LastOpenSolution)) {
CurrentSolution = Solution.LoadSolution (LastOpenSolution);
//lock(MainIFace.UpdateMutex)
{
base.onDraw (gr);
- gr.SelectFontFace (Font.Name, Font.Slant, Font.Wheight);
- gr.SetFontSize (Font.Size);
- gr.FontOptions = Interface.FontRenderingOptions;
- gr.Antialias = Interface.Antialias;
+ gr.FontFace = Font.Name;
+ gr.FontSize = (uint)Font.Size;
+ //gr.FontOptions = Interface.FontRenderingOptions;
+ //gr.Antialias = Interface.Antialias;
Rectangle cb = ClientRectangle;
public override void onMouseEnter (object sender, MouseMoveEventArgs e)
{
base.onMouseEnter (sender, e);
- IFace.MouseCursor = MouseCursors.Text;
+ IFace.MouseCursor = MouseCursor.IBeam;
}
public override void onMouseLeave (object sender, MouseMoveEventArgs e)
{
base.onMouseLeave (sender, e);
- IFace.MouseCursor = MouseCursors.Default;
+ IFace.MouseCursor = MouseCursor.Arrow;
}
public override void onMouseMove (object sender, MouseMoveEventArgs e)
{
switch (key)
{
- case Key.BackSpace:
+ case Key.Backspace:
buffer.Delete ();
break;
- case Key.Clear:
- break;
case Key.Delete:
if (buffer.SelectionIsEmpty)
buffer.MoveRight ();
// IFace.Clipboard = buffer.SelectedText;
buffer.Delete ();
break;
- case Key.ISO_Enter:
- case Key.KP_Enter:
+ case Key.Enter:
+ case Key.KeypadEnter:
if (!buffer.SelectionIsEmpty)
buffer.Delete ();
buffer.InsertLineBreak ();
break;
case Key.Menu:
break;
- case Key.Num_Lock:
+ case Key.NumLock:
break;
- case Key.Page_Down:
+ case Key.PageDown:
if (IFace.Shift) {
if (buffer.SelectionIsEmpty)
buffer.SetSelStartPos ();
buffer.ResetSelection ();
CurrentLine += visibleLines;
break;
- case Key.Page_Up:
+ case Key.PageUp:
if (IFace.Shift) {
if (buffer.SelectionIsEmpty)
buffer.SetSelStartPos ();
Rectangle hr;
+ /*
if (SelectedItem?.Parent != null) {
gr.SelectFontFace (Font.Name, Font.Slant, Font.Wheight);
//drawIcon (gr, icoStyle, rIcoStyle);
}
- }
+ }*/
if (HoverWidget != null) {
hr = HoverWidget.ScreenCoordinates (HoverWidget.getSlot ());
gr.SetSourceColor (Color.SkyBlue);
gr.Restore ();
}
- void drawIcon (Context gr, Picture pic, Rectangle r) {
+ void drawIcon (Context gr, Picture pic, Rectangle r) {/*
// gr.SetSourceColor (Color.Black);
// CairoHelpers.CairoRectangle (gr, r.Inflated (1), 2, 1.0);
gr.SetSourceColor (Color.White);
gr.Fill ();
gr.Operator = Operator.Clear;
pic.Paint (gr, r);
- gr.Operator = Operator.Over;
+ gr.Operator = Operator.Over;*/
}
void drawDesignOverlay (Context gr, Widget g, Rectangle cb, Rectangle hr, double coteStroke, double space = 6.5){
+ /*
double z = zoom / 100.0;
double coteW = 3, coteL = 5;
bool fill = true;
//gr.SetSourceColor (Color.Grey);
// gr.Rectangle (hr,coteStroke);
// gr.Stroke ();
- gr.Operator = Operator.Over;
+ gr.Operator = Operator.Over;
+ */
}
void drawCenteredTextLine (Context gr, Point center, string txt){
gr.LineTo (rFld.Center.X + 0.5 + foldSize / 2, y + fe.Ascent / 2 + 0.5);
closingNode = false;
}
- gr.SetDash (new double[]{ 1.5 },0.0);
+ //gr.SetDash (new double[]{ 1.5 },0.0);
gr.SetSourceColor (Color.Grey);
gr.Stroke ();
- gr.SetDash (new double[]{}, 0.0);
+ //gr.SetDash (new double[]{}, 0.0);
if (cl.IsFoldable) {
gr.Rectangle (rFld);
fts = FontSlant.Italic;
}
- gr.SelectFontFace (Font.Name, fts, ftw);
+ gr.FontFace = Font.Name;
gr.SetSourceColor (fg);
gr.MoveTo (x, y + fe.Ascent);
get { return base.Font; }
set {
base.Font = value;
-
+ /*
using (ImageSurface img = new ImageSurface (Format.Argb32, 1, 1)) {
using (Context gr = new Context (img)) {
gr.SelectFontFace (Font.Name, Font.Slant, Font.Wheight);
fe = gr.FontExtents;
}
- }
+ }*/
MaxScrollY = 0;
RegisterForGraphicUpdate ();
}
{
base.onDraw (gr);
- gr.SelectFontFace (Font.Name, Font.Slant, Font.Wheight);
- gr.SetFontSize (Font.Size);
- gr.FontOptions = Interface.FontRenderingOptions;
- gr.Antialias = Interface.Antialias;
+ gr.FontFace = Font.Name;
+ gr.FontSize = (uint)Font.Size;
Rectangle cb = ClientRectangle;
{
base.onMouseEnter (sender, e);
if (e.X - ScreenCoordinates(Slot).X < leftMargin + ClientRectangle.X)
- IFace.MouseCursor = MouseCursors.Default;
+ IFace.MouseCursor = MouseCursor.Arrow;
else
- IFace.MouseCursor = MouseCursors.Text;
+ IFace.MouseCursor = MouseCursor.IBeam;
}
public override void onMouseLeave (object sender, MouseMoveEventArgs e)
{
base.onMouseLeave (sender, e);
- IFace.MouseCursor = MouseCursors.Default;
+ IFace.MouseCursor = MouseCursor.Arrow;
}
public override void onMouseMove (object sender, MouseMoveEventArgs e)
{
if (!e.Mouse.IsButtonDown (MouseButton.Left)) {
if (mouseLocalPos.X < leftMargin)
- IFace.MouseCursor = MouseCursors.Default;
+ IFace.MouseCursor = MouseCursor.Arrow;
else
- IFace.MouseCursor = MouseCursors.Text;
+ IFace.MouseCursor = MouseCursor.IBeam;
return;
}
switch (key)
{
- case Key.BackSpace:
+ case Key.Backspace:
buffer.DeleteChar ();
break;
- case Key.Clear:
- break;
case Key.Delete:
if (buffer.SelectionIsEmpty)
MoveRight ();
IFace.Clipboard = buffer.SelectedText;
buffer.DeleteChar ();
break;
- case Key.Return:
- case Key.KP_Enter:
+ case Key.Enter:
+ case Key.KeypadEnter:
if (!buffer.SelectionIsEmpty)
buffer.DeleteChar ();
buffer.InsertLineBreak ();
break;
case Key.Menu:
break;
- case Key.Num_Lock:
+ case Key.NumLock:
break;
- case Key.Page_Down:
+ case Key.PageDown:
if (IFace.Shift) {
if (buffer.SelectionIsEmpty)
buffer.SetSelStartPos ();
buffer.ResetSelection ();
PrintedCurrentLine += visibleLines;
break;
- case Key.Page_Up:
+ case Key.PageUp:
if (IFace.Shift) {
if (buffer.SelectionIsEmpty)
buffer.SetSelStartPos ();
}
void onStartDrag (object sender, EventArgs e)
{
+ /*
Widget go = sender as Widget;
lock (go.IFace.UpdateMutex) {
}
go.IFace.DragImage = img;
- }
+ }*/
}
void onEndDrag (object sender, DragDropEventArgs e)
{
<Widget Height="200"/>
<Popper Caption="TestPopper" Width="100" Background="DimGrey" PopDirection="{alignment}">
<Border Fit="True" Background="SteelBlue">
- <Image Fit="true" Path="#go.Images.Icons.tetra.png" Margin="10"/>
+ <Image Fit="true" Path="#Crow.Icons.crow.svg" Margin="10"/>
<VerticalStack Fit="true" Margin="10" Background="CornflowerBlue">
<CheckBox Name="chk1" Background="Red"/>
<CheckBox Name="chk2" IsChecked="true"/>
<HorizontalStack Fit="true" Margin="5" Background="SkyBlue">
<Spinner Name="sp1" Value="5" ValueChanged="onSpinnerValueChange"/>
- <Spinner Value="5"/>
+ <Spinner Value="5" Width="60"/>
<Spinner Value="5"/>
</HorizontalStack>
</VerticalStack>
\ No newline at end of file