::  :: 新随笔 :: 联系 ::  :: 管理 ::
  85 随笔 :: 0 文章 :: 392 评论 :: 0 Trackbacks

The idea is from DotnetMagic, I copied its style, but different implement methods. DotnetMagic uses shell self message circulation, but I use swt event listener. I want to implement the custom style menu for all platforms initially, but it's impossible. It has to use a lot of advanced OS funcitions. If I use pure swt public functions, I can't implement  some features. For example, if I click the menu, the window shell will be deactivated, I click window shell's titlebar, swt event manager doesn't send messages to me. I must use WND Message hook to deal these messages. So I have to add the feature into SWT Win32 Extension, but not a independent project.

Some beautiful snapshots:

Office 2003 Style Menu

VS 2005 Style Menu

Project Download: http://www.swtui.cn/downloads/org.eclipse.swt.win32.extension.zip
JNLP Online Demo: http://www.swtui.cn/jws/example.jnlp

If you don't have installed Java Runtime, you can access it via http://www.swtui.cn/downloads/org.eclipse.swt.win32.extension.example.independence_native.zip

Eclipse Plugin Update Site URL: http://www.swtui.cn/update


posted on 2008-04-02 11:25 三人行,必有我师焉 阅读(3069) 评论(5)  编辑  收藏


# re: Add custom style menu into SWT Win32 Extension. 2008-04-02 11:58 BeanSoft
It's time for IBM or Eclipse to develop a Skin system,like Swing's Look and Feel, or the Menu and Toolbar is still hard to customize, in fact you are doing c++ code, not java.... well, thanks ur hard work... to share with us...  回复  更多评论

# re: Add custom style menu into SWT Win32 Extension. 2008-04-02 12:10 三人行,必有我师焉
Hmmm. I don't write any C++ code, just use swt win32 version to implement it, but it doesn't work in other platforms, until I implement a linux version, and this way is the socalled Eclipse spirit.

In fact, IBM has its self look and feel, but it's commercial, I don't think that IBM will donate it to eclipse foundation.  回复  更多评论

# re: Add custom style menu into SWT Win32 Extension. 2008-04-02 15:04 Always BaNg.
lookandfeel跟WND的class有关,codeProject上有一堆win32 lookand feel,将其注册到swt也不是什么难事, swt下有一个类WNDCLASS。
topmost?好像跟create window设个flag什么的。

唉,还是windows API强大,什么效果都能容易。什么GTK,QT真TMD烦人。

:) 为什么要在一个中文blog上写英文呢?看的很费劲哩!
  回复  更多评论

# re: Add custom style menu into SWT Win32 Extension. 2008-04-02 16:07 三人行,必有我师焉
本来准备弄个SWT Linux Extension的,结果实际操作以后发现很多高级功能都要GTK 2.10以后的版本,我装的Ubuntu6.10才是GTK2.08,晕死。

之所以在中文blog上用英文,一是为了练习英文,二是我懒得再写英文文档了,老外用搜索引擎直接搜这儿好了。blogjava的rank还是很高的,我才写了1个小时,google就收录了,可比我放在自己网站上宣传好得多。  回复  更多评论

# re: Add custom style menu into SWT Win32 Extension. 2008-04-02 17:40 BeanSoft
是呀 BlogJava 上内容 Google 收录的很快!多亏多位像楼主这样的原创作者,呵呵!  回复  更多评论


GitHub |  开源中国社区 |  maven仓库 |  文件格式转换