Author Topic: FileTabMenu Plugin  (Read 10091 times)

Offline Florianx

  • Multiple posting newcomer
  • *
  • Posts: 15
FileTabMenu Plugin
« on: October 03, 2005, 08:51:07 pm »
Hi,
I downloaded Code::Blocks a few days ago, and I really love it  :D
Before CB, i used Visual C++ Express 8. There, it was possible to close a file thru the context menu of a file tab.
Because thats not possible with cb, i tried to write a plugin.

Its not exacty working, like I want, but here's a first version:
[edit]link removed[/edit]

When you right click on the files tab row, there will be an menu, where you can: Save current file, Save all files, Close current file, Close all files, Close all files exept current.

What does not work: the menu should only open, when you really hit a tab, not the empty space at the right. When you right click on an inactive tab, it should get active before the menu gets popped up.

I know its a very small plugin, but it was my first time using wxWidgets, which can get very confusing  :roll:
« Last Edit: October 13, 2005, 05:32:40 pm by Florianx »

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: FileTabMenu Plugin
« Reply #1 on: October 03, 2005, 10:47:02 pm »
You might want to help working on the tabbed interface modification posted elsewhere on these forums, it's a modification of the notebook wxwidgets control...

Offline Florianx

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: FileTabMenu Plugin
« Reply #2 on: October 13, 2005, 05:31:34 pm »
Hi,
a new version of my plugin is ready.
It's working really good now.
But it doesn't support wx2.4 and wxGTK anymore.
I've also added an action for the middle mouse button and a settings dialog.

[attachment deleted by admin]

Offline DaKaLKa

  • Single posting newcomer
  • *
  • Posts: 8
Re: FileTabMenu Plugin
« Reply #3 on: October 13, 2005, 06:43:42 pm »
Cool Plugin,
but you should add
Code: [Select]
CB_IMPLEMENT_PLUGIN(FileTabMenu);
and remove
Code: [Select]
cbPlugin* GetPlugin()
{
return new FileTabMenu;
}
from TabMenu.cpp
and add
Code: [Select]
CB_DECLARE_PLUGIN();
to FileTabMenu.cpp, so that the plugin is useable with current CVS-Build off C::B (and also the comming RC2-Release)

Just look in the file attached, the compiled plugin in this archive should work with current CVS

Thx a lot for this plugin!  :lol:



[attachment deleted by admin]

Offline Florianx

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: FileTabMenu Plugin
« Reply #4 on: October 14, 2005, 04:34:22 pm »
thx, I should update my cvs more often :)
I've added some new futures (v0.3 now).
You can now choose the actions, which happen on right or middle mouse button click, as well as choose the options of the context menu.
Possible actions: Close, Close All, Close All Except Current, Save, Save All, Swap Header/Source.

[attachment deleted by admin]

Offline DaKaLKa

  • Single posting newcomer
  • *
  • Posts: 8
Re: FileTabMenu Plugin
« Reply #5 on: October 15, 2005, 10:38:45 am »
Great !
Thx for this great plugin.  :lol:

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: FileTabMenu Plugin
« Reply #6 on: October 16, 2005, 03:14:52 am »
Nice plugin.

You should consider to create a Code::Blocks' project file for it :)

I'll add it in the CVS binary snapshots site so anyone using the latest snapshot can use it too :wink:

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5157
Re: FileTabMenu Plugin
« Reply #7 on: October 20, 2005, 12:30:37 pm »
Why does it not work with wxW 2.4.2 ?

How can I get CB to work with wx 2.6.x (without recompiling please, on Windows XP) ??

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Re: FileTabMenu Plugin
« Reply #8 on: October 20, 2005, 01:00:08 pm »
How can I get CB to work with wx 2.6.x (without recompiling please, on Windows XP) ??

To put it simply, you won't. Not without recompiling.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5157
Re: FileTabMenu Plugin
« Reply #9 on: October 20, 2005, 02:21:24 pm »
what version of wx will be the deafult for RC 2 ?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: FileTabMenu Plugin
« Reply #10 on: October 20, 2005, 02:46:53 pm »
what version of wx will be the deafult for RC 2 ?

wx2.6.1
Be patient!
This bug will be fixed soon...

Offline Florianx

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: FileTabMenu Plugin
« Reply #11 on: October 20, 2005, 09:44:09 pm »
The plugin only works for wx2.6.x because of wxNotebook::HitTest().
This function is also not available for wxGTK.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2143
Re: FileTabMenu Plugin
« Reply #12 on: October 22, 2005, 11:56:16 pm »
I know I can be dumb, but where ARE the plugins.
Is there a link somewhere?

thanks

sethjackson

  • Guest
Re: FileTabMenu Plugin
« Reply #13 on: October 23, 2005, 12:31:36 am »
<wherever you downloaded c::b source>/src/plugins
<wherever you downloaded c::b source>/src/plugins/contrib
:) Hope this helps.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2143
Re: FileTabMenu Plugin
« Reply #14 on: October 23, 2005, 12:50:39 am »
The following is where I downloaded C::B. It lists all the
versions of C::B. But there doesn't seem to be any
further sub directories. There also appears no reference
to plugins.

http://prdownloads.sourceforge.net/codeblocks/

Is there some other location that contains the /src/plugins??

Thanks

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: FileTabMenu Plugin
« Reply #15 on: October 23, 2005, 02:24:05 am »
I think he meant on where you downloaded C::B *into*. In other words, download the "source code", unzip, and there are the plugins.

Note however, that many plugins were added *after* RC1, so they're not included in the source code zip files. You need to download them from the CVS server at sourceforge (using TortoiseCVS for example).