Package org.sf.feeling.swt.win32.internal.extension

Examples of org.sf.feeling.swt.win32.internal.extension.APPBARDATA


              gc.drawRectangle(drawRect);
            }
          }
          else if (theme instanceof OfficeThemeRender)
          {
            OfficeThemeRender themeRender = (OfficeThemeRender) theme;
            Color[] colors = null;
            if (selected)
            {
              if (mc == null)
              {
                colors = new Color[] {
                    themeRender.getTool_item_outer_top_selected1(),
                    themeRender.getTool_item_outer_top_selected2(),
                    themeRender.getTool_item_outer_bottom_selected1(),
                    themeRender.getTool_item_outer_bottom_selected2(),
                    themeRender.getTool_item_inner_top_selected1(),
                    themeRender.getTool_item_inner_top_selected2(),
                    themeRender.getTool_item_inner_bottom_selected1(),
                    themeRender.getTool_item_inner_bottom_selected2(),
                    themeRender.getTool_item_border_selected(), };
                drawGradientBack(gc, drawRect, colors);
                drawGradientBorder(gc, drawRect, colors);
              }
              else
              {
                if (menuTracked || (mc.getMenu() != null && !mc.canSelected()))
                {
                  colors = new Color[] {
                      themeRender
                          .getTool_item_outer_top_showmenu_color1(),
                      themeRender
                          .getTool_item_outer_top_showmenu_color2(),
                      themeRender
                          .getTool_item_outer_bottom_showmenu_color1(),
                      themeRender
                          .getTool_item_outer_bottom_showmenu_color2(),
                      themeRender
                          .getTool_item_inner_top_showmenu_color1(),
                      themeRender
                          .getTool_item_inner_top_showmenu_color2(),
                      themeRender
                          .getTool_item_inner_bottom_showmenu_color1(),
                      themeRender
                          .getTool_item_inner_bottom_showmenu_color2(),
                      themeRender.getTool_item_border_showmenu_color(), };
                  drawGradientBack(gc, drawRect, colors);
                  drawGradientBorder(gc, drawRect, colors);
                }
                else
                {
                  colors = new Color[] {
                      themeRender.getTool_item_outer_top_selected1(),
                      themeRender.getTool_item_outer_top_selected2(),
                      themeRender.getTool_item_outer_bottom_selected1(),
                      themeRender.getTool_item_outer_bottom_selected2(),
                      themeRender.getTool_item_inner_top_selected1(),
                      themeRender.getTool_item_inner_top_selected2(),
                      themeRender.getTool_item_inner_bottom_selected1(),
                      themeRender.getTool_item_inner_bottom_selected2(),
                      themeRender.getTool_item_border_selected(), };
                  if (mc.getMenu() != null)
                  {
                    drawGradientBack(gc, getNonMenuRect(dc), colors);
                    colors = new Color[] {
                        themeRender.getTool_item_outer_top_track1(),
                        themeRender.getTool_item_outer_top_track2(),
                        themeRender.getTool_item_outer_bottom_track1(),
                        themeRender.getTool_item_outer_bottom_track2(),
                        themeRender.getTool_item_inner_top_track1(),
                        themeRender.getTool_item_inner_top_track2(),
                        themeRender.getTool_item_inner_bottom_track1(),
                        themeRender.getTool_item_inner_bottom_track2(),
                        themeRender.getTool_item_border_track(), };
                    drawGradientBack(gc, getMenuRect(dc), colors);
                  }
                  else
                    drawGradientBack(gc, drawRect, colors);
                  drawGradientBorder(gc, drawRect, colors);
                }
              }
            }
            else if (mc != null && (mc.getStyle() & SWT.CHECK) != 0
                && mc.getSelection())
            {
              colors = new Color[] {
                  themeRender.getTool_item_outer_top_checked_track1(),
                  themeRender.getTool_item_outer_top_checked_track2(),
                  themeRender.getTool_item_outer_bottom_checked_track1(),
                  themeRender.getTool_item_outer_bottom_checked_track2(),
                  themeRender.getTool_item_inner_top_checked_track1(),
                  themeRender.getTool_item_inner_top_checked_track2(),
                  themeRender.getTool_item_inner_bottom_checked_track1(),
                  themeRender.getTool_item_inner_bottom_checked_track2(),
                  themeRender.getTool_item_border_checked_track(), };
              drawGradientBack(gc, drawRect, colors);
              drawGradientBorder(gc, drawRect, colors);
            }
            else
            {
              colors = new Color[] {
                  themeRender.getTool_item_outer_top_track1(),
                  themeRender.getTool_item_outer_top_track2(),
                  themeRender.getTool_item_outer_bottom_track1(),
                  themeRender.getTool_item_outer_bottom_track2(),
                  themeRender.getTool_item_inner_top_track1(),
                  themeRender.getTool_item_inner_top_track2(),
                  themeRender.getTool_item_inner_bottom_track1(),
                  themeRender.getTool_item_inner_bottom_track2(),
                  themeRender.getTool_item_border_track(), };
              drawGradientBack(gc, drawRect, colors);
              drawGradientBorder(gc, drawRect, colors);
            }
          }
          else if (theme instanceof GlossyThemeRender)
          {
            drawGlossyItem(gc, drawRect, dc, tracked);
          }
          if (selected) showMenuShadow(gc, dc.getDrawRect(), dc.getToolItem());
        }
        else if (mc != null && (mc.getStyle() & SWT.CHECK) != 0 && mc.getSelection())
        {
          if (theme instanceof GeneralThemeRender)
          {
            GeneralThemeRender themeRender = (GeneralThemeRender) theme;
            gc
                .setForeground(themeRender
                    .getTool_item_check_selection_bg_normal1());
            gc
                .setBackground(themeRender
                    .getTool_item_check_selection_bg_normal2());
            gc.fillGradientRectangle(drawRect.x, drawRect.y, drawRect.width,
                drawRect.height, true);
            gc.setForeground(themeRender.getTool_item_check_selection_fg_normal());
            gc.drawRectangle(drawRect);
          }
          else if (theme instanceof OfficeThemeRender)
          {
            OfficeThemeRender themeRender = (OfficeThemeRender) theme;
            Color[] colors = new Color[] {
                themeRender.getTool_item_outer_top_checked1(),
                themeRender.getTool_item_outer_top_checked2(),
                themeRender.getTool_item_outer_bottom_checked1(),
                themeRender.getTool_item_outer_bottom_checked2(),
                themeRender.getTool_item_inner_top_checked1(),
                themeRender.getTool_item_inner_top_checked2(),
                themeRender.getTool_item_inner_bottom_checked1(),
                themeRender.getTool_item_inner_bottom_checked2(),
                themeRender.getTool_item_border_checked(), };
            drawGradientBack(gc, drawRect, colors);
            drawGradientBorder(gc, drawRect, colors);
          }
          else if (theme instanceof GlossyThemeRender)
          {
View Full Code Here


  public PopupMenu(Control control) {
    this(control, true);
  }

  public PopupMenu(Control control, boolean autoDetect) {
    this(control, new VS2005ThemeRender(), autoDetect);
  }
View Full Code Here

  private static final int DRAW_FLAGS = SWT.DRAW_TAB | SWT.DRAW_TRANSPARENT
      | SWT.DRAW_DELIMITER;

  public CToolBar(Composite parent, int style)
  {
    this(parent, style, new VS2005ThemeRender());
  }
View Full Code Here

   * @param state
   *            the state of the specified appbar
   * @return the result if set appbar state successfully
   */
  public static int setAppBarState(int handle, int state) {
    APPBARDATA appBarData = new APPBARDATA();
    appBarData.lParam = state;
    appBarData.hWnd = handle;
    return Extension.SHAppBarMessage(Win32.AMB_SETSTATE, appBarData);
  }
View Full Code Here

   * @param handle
   *            the handle of the specified appbar
   * @return the state of the specified appbar
   */
  public static int getAppBarState(int handle) {
    APPBARDATA appBarData = new APPBARDATA();
    appBarData.hWnd = handle;
    appBarData.cbSize = 24;
    int rc = Extension.SHAppBarMessage(Win32.AMB_GETSTATE, appBarData);
    return rc;
  }
View Full Code Here

   * @param handle
   *            the handle of the specified appbar
   * @return the information of the size and position of the specified appbar
   */
  public static RECT getAppBarPosition(int handle) {
    APPBARDATA appBarData = new APPBARDATA();
    appBarData.hWnd = handle;
    Extension.SHAppBarMessage(Win32.AMB_GETTASKBARPOS, appBarData);
    RECT rc = new RECT();
    rc.left = appBarData.rcLeft;
    rc.top = appBarData.rcTop;
View Full Code Here

   *            specifies the directory on the disk.
   * @return the number of free bytes available on the disk.
   */
  public static long getDiskFreeSpace(String path)
  {
    DISKFREESPACE diskSpace = Extension.GetDiskFreeSpace(path);
    return diskSpace.freeBytesAvailable;
  }
View Full Code Here

   *            specifies the directory on the disk.
   * @return the number of bytes available on the disk.
   */
  public static long getDiskTotalSize(String path)
  {
    DISKFREESPACE diskSpace = Extension.GetDiskFreeSpace(path);
    return diskSpace.totalNumberOfBytes;
  }
View Full Code Here

    /**
     * Starts the event loop.
     */
    public void run() {
      messageThreadAlive = true;
      eventObject = new EventObject(descriptor.getName());
      eventObject.reset();
      eventLoop.installHook();
      while (messageThreadAlive) {
        eventObject.waitFor();
        if (messageThreadAlive) {
View Full Code Here

   * @param point
   *            a memory KBDLLHOOKSTRUCT struct point
   * @return A KeyboardLLHookStruct object.
   */
  public static KeyboardLLHookStruct valueOf(int point) {
    KBDLLHOOKSTRUCT struct = new KBDLLHOOKSTRUCT();
    Extension.CreateStructByPoint(point, struct);
    return new KeyboardLLHookStruct(struct);
  }
View Full Code Here

TOP

Related Classes of org.sf.feeling.swt.win32.internal.extension.APPBARDATA

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.