protected virtual XplatUIWin32.RECT NCCalcSize (XplatUIWin32.RECT proposed_window_rect) { int bw = ThemeEngine.Current.ManagedWindowBorderWidth (this); if (HasBorders) { proposed_window_rect.top += TitleBarHeight + bw; proposed_window_rect.bottom -= bw; proposed_window_rect.left += bw; proposed_window_rect.right -= bw; } if (XplatUI.RequiresPositiveClientAreaSize) { // This is necessary for Linux, can't handle <= 0-sized // client areas correctly. if (proposed_window_rect.right <= proposed_window_rect.left) { proposed_window_rect.right += proposed_window_rect.left - proposed_window_rect.right + 1; } if (proposed_window_rect.top >= proposed_window_rect.bottom) { proposed_window_rect.bottom += proposed_window_rect.top - proposed_window_rect.bottom + 1; } } return proposed_window_rect; }
public virtual Color GetColor (XplatUIWin32.GetSysColorIndex idx) { return (Color) syscolors.GetValue ((int)idx); }
public virtual void SetColor (XplatUIWin32.GetSysColorIndex idx, Color color) { syscolors.SetValue (color, (int) idx); }
public extern static Int32 GetThemeBackgroundExtent (IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, ref XplatUIWin32.RECT pRect, ref XplatUIWin32.RECT pClipRect);
public extern static Int32 GetThemeBackgroundRegion (IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, ref XplatUIWin32.RECT pRect, out IntPtr pRegion);
public extern static Int32 GetThemePartSize (IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, ref XplatUIWin32.RECT pRect, int eSize, out SIZE size);
public extern static Int32 GetThemeBackgroundContentRect (IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, ref XplatUIWin32.RECT pBoundingRect, out XplatUIWin32.RECT pContentRect);
public extern static Int32 DrawThemeIcon (IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, ref XplatUIWin32.RECT pRect, IntPtr himl, int iImageIndex);
public extern static Int32 DrawThemeParentBackground (IntPtr hWnd, IntPtr hdc, ref XplatUIWin32.RECT pRect);
public extern static Int32 DrawThemeBackground (IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, ref XplatUIWin32.RECT pRect, IntPtr pClipRect);
public extern static Int32 DrawThemeEdge (IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, ref XplatUIWin32.RECT pDestRect, uint edge, uint flags, int pRect);
public extern static Int32 HitTestThemeBackground (IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, UInt32 dwOptions, ref XplatUIWin32.RECT pRect, IntPtr hrgn, POINT ptTest, out int code);
public extern static Int32 GetThemeTextMetrics (IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, out XplatUIWin32.TEXTMETRIC textMetric);
public extern static Int32 GetThemeTextExtent (IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, String text, int textLength, int textFlags, int boundingRect, out XplatUIWin32.RECT extentRect);
public static XplatUIWin32 GetInstance() { if (instance==null) { instance=new XplatUIWin32(); } ref_count++; return instance; }
public extern static Int32 DrawThemeText (IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, String text, int textLength, UInt32 textFlags, UInt32 textFlags2, ref XplatUIWin32.RECT pRect);
static extern int Win32DrawText (IntPtr hdc, string lpStr, int nCount, ref XplatUIWin32.RECT lpRect, int wFormat);
public extern static Int32 GetThemeMargins (IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, int iPropId, out XplatUIWin32.RECT prc, out MARGINS pMargins);