本文整理汇总了C#中Gdk.Rectangle类的典型用法代码示例。如果您正苦于以下问题:C# Gdk.Rectangle类的具体用法?C# Gdk.Rectangle怎么用?C# Gdk.Rectangle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Gdk.Rectangle类属于命名空间,在下文中一共展示了Gdk.Rectangle类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: HeaderMouseEventArgs
/// <summary>
/// Initializes a new instance of the HeaderMouseEventArgs class with
/// the specified source Column, Table, column index and column header bounds
/// </summary>
/// <param name="column">The Column that Raised the event</param>
/// <param name="table">The Table the Column belongs to</param>
/// <param name="index">The index of the Column</param>
/// <param name="headerRect">The column header's bounding rectangle</param>
public HeaderMouseEventArgs(Column column, HTable table, int index, Gdk.Rectangle headerRect)
{
this.column = column;
this.table = table;
this.index = index;
this.headerRect = headerRect;
}
开发者ID:tizianomanni,项目名称:holly-gtk-widgets,代码行数:15,代码来源:HeaderMouseEventArgs.cs
示例2: Render
public override void Render (CellContext context, StateType state, double cellWidth, double cellHeight)
{
if (data_handler == null) {
return;
}
if (!has_sort) {
base.Render (context, state, cellWidth, cellHeight);
return;
}
Gdk.Rectangle arrow_alloc = new Gdk.Rectangle ();
arrow_alloc.Width = (int)(cellHeight / 3.0);
arrow_alloc.Height = (int)((double)arrow_alloc.Width / 1.6);
arrow_alloc.X = (int)cellWidth - arrow_alloc.Width - Spacing;
arrow_alloc.Y = ((int)cellHeight - arrow_alloc.Height) / 2;
double textWidth = arrow_alloc.X - Spacing;
if (textWidth > 0) {
base.Render (context, state, textWidth, cellHeight);
}
SortType sort_type = ((ISortableColumn)data_handler ()).SortType;
if (sort_type != SortType.None) {
context.Theme.DrawArrow (context.Context, arrow_alloc, sort_type);
}
}
开发者ID:rubenv,项目名称:tripod,代码行数:27,代码来源:ColumnHeaderCellText.cs
示例3: CreateBlur
private ImageInfo CreateBlur (ImageInfo source)
{
double scale = Math.Max (256 / (double) source.Bounds.Width,
256 / (double) source.Bounds.Height);
Gdk.Rectangle small = new Gdk.Rectangle (0, 0,
(int) Math.Ceiling (source.Bounds.Width * scale),
(int) Math.Ceiling (source.Bounds.Height * scale));
MemorySurface image = new MemorySurface (Format.Argb32,
small.Width,
small.Height);
Context ctx = new Context (image);
//Pattern solid = new SolidPattern (0, 0, 0, 0);
//ctx.Source = solid;
//ctx.Paint ();
//solid.Destroy ();
ctx.Matrix = source.Fit (small);
ctx.Operator = Operator.Source;
Pattern p = new SurfacePattern (source.Surface);
ctx.Source = p;
//Log.Debug (small);
ctx.Paint ();
p.Destroy ();
((IDisposable)ctx).Dispose ();
Gdk.Pixbuf normal = MemorySurface.CreatePixbuf (image);
Gdk.Pixbuf blur = PixbufUtils.Blur (normal, 3);
ImageInfo overlay = new ImageInfo (blur);
blur.Dispose ();
normal.Dispose ();
image.Destroy ();
return overlay;
}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:34,代码来源:SoftFocus.cs
示例4: OnSizeAllocated
protected override void OnSizeAllocated(Gdk.Rectangle allocation)
{
allocated = true;
current_allocation = allocation;
UpdateCache ();
base.OnSizeAllocated (allocation);
}
开发者ID:dschultzca,项目名称:ScoobyRom,代码行数:7,代码来源:NPlotSurface2D.cs
示例5: SelectionEventArgs
/// <summary>
/// Initializes a new instance of the SelectionEventArgs class with
/// the specified TableModel source, old selected indicies and new
/// selected indicies
/// </summary>
/// <param name="source">The TableModel that originated the event</param>
/// <param name="oldSelectedIndicies">An array of the previously selected Rows</param>
/// <param name="newSelectedIndicies">An array of the newly selected Rows</param>
public SelectionEventArgs(TableModel source, int[] oldSelectedIndicies, int[] newSelectedIndicies)
: base()
{
if (source == null)
{
throw new ArgumentNullException("source", "TableModel cannot be null");
}
this.source = source;
this.oldSelectedIndicies = oldSelectedIndicies;
this.newSelectedIndicies = newSelectedIndicies;
this.oldSelectionBounds = new Gdk.Rectangle();
this.newSelectionBounds = new Gdk.Rectangle();
if (oldSelectedIndicies.Length > 0)
{
this.oldSelectionBounds = source.Selections.CalcSelectionBounds(oldSelectedIndicies[0],
oldSelectedIndicies[oldSelectedIndicies.Length-1]);
}
if (newSelectedIndicies.Length > 0)
{
this.newSelectionBounds = source.Selections.CalcSelectionBounds(newSelectedIndicies[0],
newSelectedIndicies[newSelectedIndicies.Length-1]);
}
}
开发者ID:tizianomanni,项目名称:holly-gtk-widgets,代码行数:35,代码来源:SelectionEventArgs.cs
示例6: CellMouseEventArgs
/// <summary>
/// Initializes a new instance of the CellMouseEventArgs class with
/// the specified source Cell, table, row index, column index and
/// cell bounds
/// </summary>
/// <param name="cell">The Cell that Raised the event</param>
/// <param name="table">The Table the Cell belongs to</param>
/// <param name="cellPos"></param>
/// <param name="cellRect">The Cell's bounding rectangle</param>
public CellMouseEventArgs(Cell cell, HTable table, CellPos cellPos, Gdk.Rectangle cellRect)
{
this.cell = cell;
this.table = table;
this.row = cellPos.Row;
this.column = cellPos.Column;
this.cellRect = cellRect;
}
开发者ID:tizianomanni,项目名称:holly-gtk-widgets,代码行数:17,代码来源:CellMouseEventArgs.cs
示例7: CellKeyEventArgs
/// <summary>
/// Initializes a new instance of the CellKeyEventArgs class with
/// the specified source Cell, table, row index, column index, cell
/// bounds and KeyEventArgs
/// </summary>
/// <param name="cell">The Cell that Raised the event</param>
/// <param name="table">The Table the Cell belongs to</param>
/// <param name="row">The Row index of the Cell</param>
/// <param name="column">The Column index of the Cell</param>
/// <param name="cellRect">The Cell's bounding rectangle</param>
/// <param name="kea"></param>
public CellKeyEventArgs(Cell cell, HTable table, int row, int column, Gdk.Rectangle cellRect, Gtk.KeyReleaseEventArgs kea)
{
this.cell = cell;
this.table = table;
this.row = row;
this.column = column;
this.cellRect = cellRect;
}
开发者ID:tizianomanni,项目名称:holly-gtk-widgets,代码行数:19,代码来源:CellKeyEventArgs.cs
示例8: GetCellBox
private Gdk.Rectangle GetCellBox (int x, int y, int cellSize) {
int widthBoxNum = x % cellSize;
int heightBoxNum = y % cellSize;
var leftUpper = new Gdk.Point (x - widthBoxNum, y - heightBoxNum);
var returnMe = new Gdk.Rectangle (leftUpper, new Gdk.Size (cellSize, cellSize));
return returnMe;
}
开发者ID:msiyer,项目名称:Pinta,代码行数:9,代码来源:PixelateEffect.cs
示例9: OnExposeEvent
protected override bool OnExposeEvent(Gdk.EventExpose evnt)
{
Gdk.Rectangle rect = new Gdk.Rectangle( Allocation.X, Allocation.Y, Allocation.Width , Allocation.Height );
Gtk.Style.PaintFlatBox( Entry.Style, this.GdkWindow, Entry.State, Entry.ShadowType, this.Allocation, Entry, "entry_bg", rect.X, rect.Y, rect.Width, rect.Height );
Gtk.Style.PaintShadow ( Entry.Style, this.GdkWindow, Entry.State, Entry.ShadowType, this.Allocation, Entry, "entry" , rect.X, rect.Y, rect.Width, rect.Height );
return base.OnExposeEvent (evnt);
}
开发者ID:tizianomanni,项目名称:holly-gtk-widgets,代码行数:9,代码来源:HComboBoxBaseOld.cs
示例10: OnExposeEvent
protected override bool OnExposeEvent (Gdk.EventExpose evt)
{
if (!IsDrawable)
return false;
int width, height;
GdkWindow.GetSize (out width, out height);
Gdk.Rectangle a = new Gdk.Rectangle (0,0,width,height);
byte b2 = 210;
int ssLT = 12;
int ssRB = 7;
double grey = 0.6;
double greyb1 = 0.9;
double greyb2 = 0.6;
Gdk.Rectangle rect = a;
Cairo.Color back1 = new Cairo.Color (greyb1, greyb1, greyb1);
Cairo.Color back2 = new Cairo.Color (greyb2, greyb2, greyb2);
Cairo.Color cdark = new Cairo.Color (grey, grey, grey, 1);
Cairo.Color clight = new Cairo.Color (grey, grey, grey, 0);
using (Cairo.Context cr = Gdk.CairoHelper.Create (evt.Window)) {
DrawGradient (cr, rect, 0, 0, 1, 1, back1, back2);
rect.X = a.X;
rect.Y = a.Y;
rect.Height = ssLT;
rect.Width = a.Width;
DrawGradient (cr, rect, 0, 0, 0, 1, cdark, clight);
rect.Y = a.Bottom - ssRB;
rect.Height = ssRB;
DrawGradient (cr, rect, 0, 0, 0, 1, clight, cdark);
rect.X = a.X;
rect.Y = a.Y;
rect.Width = ssLT;
rect.Height = a.Height;
DrawGradient (cr, rect, 0, 0, 1, 0, cdark, clight);
rect.X = a.Right - ssRB;
rect.Width = ssRB;
DrawGradient (cr, rect, 0, 0, 1, 0, clight, cdark);
Gdk.GC gc = new Gdk.GC (GdkWindow);
gc.RgbBgColor = new Gdk.Color (b2,b2,b2);
gc.RgbFgColor = new Gdk.Color (b2,b2,b2);
GdkWindow.DrawRectangle (gc, false, a.X, a.Y, a.Width, a.Height);
gc.Dispose ();
}
return base.OnExposeEvent (evt);
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:56,代码来源:Placeholder.cs
示例11: Execute
public override void Execute(SurfaceReceiver receiver)
{
int x, y;
int tx, ty;
int width, height;
Gdk.Pixbuf pixbuf;
Gdk.Rectangle[] rects;
Gdk.Rectangle clippedRect;
if (codecID != CODEC_ID_REMOTEFX)
return;
RfxMessage rfxMsg = receiver.rfx.ParseMessage(bitmapData, bitmapDataLength);
x = y = 0;
width = height = 64;
rects = new Gdk.Rectangle[rfxMsg.RectCount];
int count = 0;
while (rfxMsg.HasNextRect())
{
rfxMsg.GetNextRect(ref x, ref y, ref width, ref height);
tx = x + destLeft;
ty = y + destTop;
rects[count++] = new Gdk.Rectangle(tx, ty, width, height);
}
while (rfxMsg.HasNextTile())
{
rfxMsg.GetNextTile(buffer, ref x, ref y);
tx = x + destLeft;
ty = y + destTop;
Gdk.Rectangle tileRect = new Gdk.Rectangle(tx, ty, 64, 64);
foreach (Gdk.Rectangle rect in rects)
{
rect.Intersect(tileRect, out clippedRect);
if (!clippedRect.IsEmpty)
{
pixbuf = new Gdk.Pixbuf(buffer, Gdk.Colorspace.Rgb, true, 8, 64, 64, 64 * 4);
pixbuf.CopyArea(0, 0, clippedRect.Width, clippedRect.Height,
receiver.surface, clippedRect.X, clippedRect.Y);
receiver.InvalidateRect(clippedRect.X, clippedRect.Y, clippedRect.Width, clippedRect.Height);
}
}
}
}
开发者ID:marwansamaha,项目名称:Screenary,代码行数:54,代码来源:SurfaceBitsCommand.cs
示例12: ShowTooltip
bool ShowTooltip ()
{
if (!string.IsNullOrEmpty (tip)) {
HideTooltip ();
tooltipWindow = new TooltipPopoverWindow ();
tooltipWindow.ShowArrow = true;
tooltipWindow.Text = tip;
tooltipWindow.Severity = Severity;
var rect = new Gdk.Rectangle (0, 0, eventBox.Allocation.Width, eventBox.Allocation.Height + 5);
tooltipWindow.ShowPopup (eventBox, rect, Position);
}
return false;
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:13,代码来源:EventBoxTooltip.cs
示例13: ApplyBase
/// <summary>
/// Provides a default implementation for performing dst = F(dst, src) or F(src) over some rectangle
/// of interest. May be slightly faster than calling the other multi-parameter Apply method, as less
/// variables are used in the implementation, thus inducing less register pressure.
/// </summary>
/// <param name="dst">The Surface to write pixels to, and from which pixels are read and used as the lhs parameter for calling the method <b>ColorBgra Apply(ColorBgra, ColorBgra)</b>.</param>
/// <param name="dstOffset">The pixel offset that defines the upper-left of the rectangle-of-interest for the dst Surface.</param>
/// <param name="src">The Surface to read pixels from for the rhs parameter given to the method <b>ColorBgra Apply(ColorBgra, ColorBgra)</b>.</param>
/// <param name="srcOffset">The pixel offset that defines the upper-left of the rectangle-of-interest for the src Surface.</param>
/// <param name="roiSize">The size of the rectangles-of-interest for all Surfaces.</param>
public void ApplyBase (ImageSurface dst, Gdk.Point dstOffset, ImageSurface src, Gdk.Point srcOffset, Gdk.Size roiSize)
{
// Create bounding rectangles for each Surface
Gdk.Rectangle dstRect = new Gdk.Rectangle (dstOffset, roiSize);
if (dstRect.Width == 0 || dstRect.Height == 0)
return;
Gdk.Rectangle srcRect = new Gdk.Rectangle (srcOffset, roiSize);
if (srcRect.Width == 0 || srcRect.Height == 0)
return;
// Clip those rectangles to those Surface's bounding rectangles
Gdk.Rectangle dstClip = Gdk.Rectangle.Intersect (dstRect, dst.GetBounds ());
Gdk.Rectangle srcClip = Gdk.Rectangle.Intersect (srcRect, src.GetBounds ());
// If any of those Rectangles actually got clipped, then throw an exception
if (dstRect != dstClip)
throw new ArgumentOutOfRangeException
(
"roiSize",
"Destination roi out of bounds" +
string.Format (", dst.Size=({0},{1}", dst.Width, dst.Height) +
", dst.Bounds=" + dst.GetBounds ().ToString () +
", dstOffset=" + dstOffset.ToString () +
string.Format (", src.Size=({0},{1}", src.Width, src.Height) +
", srcOffset=" + srcOffset.ToString () +
", roiSize=" + roiSize.ToString () +
", dstRect=" + dstRect.ToString () +
", dstClip=" + dstClip.ToString () +
", srcRect=" + srcRect.ToString () +
", srcClip=" + srcClip.ToString ()
);
if (srcRect != srcClip)
throw new ArgumentOutOfRangeException ("roiSize", "Source roi out of bounds");
// Cache the width and height properties
int width = roiSize.Width;
int height = roiSize.Height;
// Do the work.
unsafe {
for (int row = 0; row < height; ++row) {
ColorBgra* dstPtr = dst.GetPointAddress (dstOffset.X, dstOffset.Y + row);
ColorBgra* srcPtr = src.GetPointAddress (srcOffset.X, srcOffset.Y + row);
Apply (dstPtr, srcPtr, width);
}
}
}
开发者ID:msiyer,项目名称:Pinta,代码行数:61,代码来源:PixelOp.cs
示例14: AllocateArea
public void AllocateArea (TextArea textArea, Gdk.Rectangle allocation)
{
if (!Visible)
Show ();
allocation.Height -= (int)textArea.LineHeight;
if (lastAllocation == allocation)
return;
lastAllocation = allocation;
if (textArea.Allocation != allocation)
textArea.SizeAllocate (allocation);
SetSizeRequest (allocation.Width, (int)editor.LineHeight);
var pos = ((TextEditor.EditorContainerChild)editor [this]);
if (pos.X != 0 || pos.Y != allocation.Height)
editor.MoveTopLevelWidget (this, 0, allocation.Height);
}
开发者ID:jmloeffler,项目名称:monodevelop,代码行数:16,代码来源:ViStatusArea.cs
示例15: Render
public override void Render (CellContext context, double cellWidth, double cellHeight)
{
Gdk.Rectangle area = new Gdk.Rectangle (0, 0, (int)cellWidth, (int)cellHeight);
// FIXME: Compute font height and set to renderer.Size
renderer.Value = Value;
bool is_hovering = hover_bound == BoundObjectParent && hover_bound != null;
renderer.Render (context.Context, area, context.Theme.Colors.GetWidgetColor (GtkColorClass.Text, context.State),
is_hovering, is_hovering, hover_value, 0.8, 0.45, 0.35);
// FIXME: Something is hosed in the view when computing cell dimensions
// The cell width request is always smaller than the actual cell, so
// this value is preserved once we compute it from rendering so the
// input stuff can do its necessary calculations
actual_area_hack = area;
}
开发者ID:Yetangitu,项目名称:f-spot,代码行数:17,代码来源:ColumnCellRating.cs
示例16: OnExposeEvent
protected override bool OnExposeEvent(Gdk.EventExpose evnt)
{
Gdk.Rectangle rect;
if (GradientBackround) {
rect = new Gdk.Rectangle (Allocation.X, Allocation.Y, Allocation.Width, Allocation.Height);
HslColor gcol = Style.Background (Gtk.StateType.Normal);
using (Cairo.Context cr = Gdk.CairoHelper.Create (GdkWindow)) {
cr.NewPath ();
cr.MoveTo (rect.X, rect.Y);
cr.RelLineTo (rect.Width, 0);
cr.RelLineTo (0, rect.Height);
cr.RelLineTo (-rect.Width, 0);
cr.RelLineTo (0, -rect.Height);
cr.ClosePath ();
Cairo.Gradient pat = new Cairo.LinearGradient (rect.X, rect.Y, rect.X, rect.Bottom);
Cairo.Color color1 = gcol;
pat.AddColorStop (0, color1);
gcol.L -= 0.1;
if (gcol.L < 0) gcol.L = 0;
pat.AddColorStop (1, gcol);
cr.Pattern = pat;
cr.FillPreserve ();
}
}
bool res = base.OnExposeEvent (evnt);
Gdk.GC borderColor = Style.DarkGC (Gtk.StateType.Normal);
rect = Allocation;
for (int n=0; n<topMargin; n++)
GdkWindow.DrawLine (borderColor, rect.X, rect.Y + n, rect.Right - 1, rect.Y + n);
for (int n=0; n<bottomMargin; n++)
GdkWindow.DrawLine (borderColor, rect.X, rect.Bottom - n - 1, rect.Right - 1, rect.Bottom - n - 1);
for (int n=0; n<leftMargin; n++)
GdkWindow.DrawLine (borderColor, rect.X + n, rect.Y, rect.X + n, rect.Bottom - 1);
for (int n=0; n<rightMargin; n++)
GdkWindow.DrawLine (borderColor, rect.Right - n - 1, rect.Y, rect.Right - n - 1, rect.Bottom - 1);
return res;
}
开发者ID:rdafoe,项目名称:Cage,代码行数:46,代码来源:DockItemContainer.cs
示例17: DrawFoldSegment
void DrawFoldSegment (Gdk.Drawable win, int x, int y, bool isOpen, bool isSelected)
{
Gdk.Rectangle drawArea = new Gdk.Rectangle (x + (Width - foldSegmentSize) / 2, y + (editor.LineHeight - foldSegmentSize) / 2, foldSegmentSize, foldSegmentSize);
win.DrawRectangle (foldBgGC, true, drawArea);
win.DrawRectangle (isSelected ? foldLineHighlightedGC : foldLineGC, false, drawArea);
win.DrawLine (foldToggleMarkerGC,
drawArea.Left + drawArea.Width * 3 / 10,
drawArea.Top + drawArea.Height / 2,
drawArea.Right - drawArea.Width * 3 / 10,
drawArea.Top + drawArea.Height / 2);
if (!isOpen)
win.DrawLine (foldToggleMarkerGC,
drawArea.Left + drawArea.Width / 2,
drawArea.Top + drawArea.Height * 3 / 10,
drawArea.Left + drawArea.Width / 2,
drawArea.Bottom - drawArea.Height * 3 / 10);
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:19,代码来源:FoldMarkerMargin.cs
示例18: OnExposeEvent
protected override bool OnExposeEvent (Gdk.EventExpose args)
{
Gdk.Drawable win = args.Window;
int width, height;
layout.GetPixelSize (out width, out height);
// if (DrawRightBorder)
// arrowXPos -= 2;
var state = window != null? StateType.Active : State;
//HACK: paint the button background as if it were bigger, but it stays clipped to the real area,
// so we get the content but not the border. This might break with crazy themes.
//FIXME: we can't use the style's actual internal padding because GTK# hasn't wrapped GtkBorder AFAICT
// (default-border, inner-border, default-outside-border, etc - see http://git.gnome.org/browse/gtk+/tree/gtk/gtkbutton.c)
const int padding = 0;
Style.PaintBox (Style, args.Window, state, ShadowType.None, args.Area, this, "button",
Allocation.X - padding, Allocation.Y - padding, Allocation.Width + padding * 2, Allocation.Height + padding * 2);
int xPos = Allocation.Left + 4;
if (Pixbuf != null) {
win.DrawPixbuf (this.Style.BaseGC (StateType.Normal), Pixbuf, 0, 0, xPos + pixbufSpacing, Allocation.Y + (Allocation.Height - Pixbuf.Height) / 2, Pixbuf.Width, Pixbuf.Height, Gdk.RgbDither.None, 0, 0);
xPos += Pixbuf.Width + pixbufSpacing * 2;
}
int arrowHeight = height - 4;
int arrowWidth = arrowHeight + 3;
int arrowXPos = this.Allocation.X + this.Allocation.Width - arrowWidth;
//constrain the text area so it doesn't get rendered under the arrows
var textArea = new Gdk.Rectangle (xPos, Allocation.Y + ySpacing, arrowXPos - xPos - 2, Allocation.Height - ySpacing);
Style.PaintLayout (Style, win, state, true, textArea, this, "", textArea.X, textArea.Y, layout);
state = Sensitive ? StateType.Normal : StateType.Insensitive;
Gtk.Style.PaintVline (this.Style, win, state, args.Area, this, "", Allocation.Y + 3, Allocation.Bottom - 4, arrowXPos - 4);
Gtk.Style.PaintArrow (this.Style, win, state, ShadowType.None, args.Area, this, "", ArrowType.Down, true, arrowXPos, Allocation.Y, Allocation.Height / 2, Allocation.Height);
// if (DrawRightBorder)
// win.DrawLine (this.Style.DarkGC (StateType.Normal), Allocation.X + Allocation.Width - 1, Allocation.Y, Allocation.X + Allocation.Width - 1, Allocation.Y + Allocation.Height);
return false;
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:40,代码来源:DropDownBox.cs
示例19: OnSizeAllocated
protected override void OnSizeAllocated(Gdk.Rectangle allocation)
{
base.OnSizeAllocated (allocation);
event_alloc = new Gdk.Rectangle (0, 0, allocation.Width, allocation.Height);
if (IsRealized) {
event_window.MoveResize (allocation);
}
}
开发者ID:knocte,项目名称:hyena,代码行数:8,代码来源:RatingEntry.cs
示例20: ShowTooltipWindow
public override Gtk.Window ShowTooltipWindow (TextEditor editor, int offset, Gdk.ModifierType modifierState, int mouseX, int mouseY, TooltipItem item)
{
var location = editor.OffsetToLocation (item.ItemSegment.Offset);
var point = editor.LocationToPoint (location);
int lineHeight = (int) editor.LineHeight;
int y = (int) point.Y;
// find the top of the line that the mouse is hovering over
while (y + lineHeight < mouseY)
y += lineHeight;
var caret = new Gdk.Rectangle (mouseX - editor.Allocation.X, y - editor.Allocation.Y, 1, lineHeight);
tooltip = new DebugValueWindow (editor, offset, DebuggingService.CurrentFrame, (ObjectValue) item.Item, null);
tooltip.ShowPopup (editor, caret, PopupPosition.TopLeft);
return tooltip;
}
开发者ID:kekekeks,项目名称:monodevelop,代码行数:18,代码来源:DebugValueTooltipProvider.cs
注:本文中的Gdk.Rectangle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论