Author Topic: Adding Flexiblity to " CTRL - Right Click " searches  (Read 5912 times)

Offline Oulaxer11

  • Multiple posting newcomer
  • *
  • Posts: 28
Adding Flexiblity to " CTRL - Right Click " searches
« on: February 08, 2008, 06:44:08 pm »
This perhaps should be under plugins?  But anywy...


I just discovered the CTRL-RightClick functionality, which is wicked cool by the way.  I work for a Tier 1 Automotive Supplier so we have large (1000s of pages) of documentation...  I would like to to be able to CTRL-RightClick and possibly fire off a command line Macro??  The thought was, you can configure google desktop to search (in this case) the doco folder for the item under the mouse pointer,  so in essence it would be adding another option to the CNTRL-Right Click search.. but it has to be someone customizable to invoke your own search string.... I guess it would be similar to what FireFox does in the top right there...


-Cheers


Mike
-Mike

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Adding Flexiblity to " CTRL - Right Click " searches
« Reply #1 on: February 09, 2008, 11:22:26 am »
If you care to compile your own Code::Blocks from source, you can edit line 382 in sdk/editorbase.cpp to whatever other URL you need (just change the string).

Adding configurability at the present time is unwanted, since that again would add a new feature and possibly new issues (and false bug reports, as it regularly happens that people report crashes after GUI changes, simply because they forget to update their resource files).

Removing issues with the existing feature set is our prime (only) priority at this time.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Oulaxer11

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Adding Flexiblity to " CTRL - Right Click " searches
« Reply #2 on: February 12, 2008, 03:36:16 pm »
How much access to pluggin have to there surroundings in C::B ?  Would a plugin be able to perform this feature?
-Mike

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Adding Flexiblity to " CTRL - Right Click " searches
« Reply #3 on: February 12, 2008, 03:57:52 pm »
Hmm.... yes, that is possible, but not easy.

Plugins are DLLs that are mapped to the application's address space, so generally a plugin can do (almost) as much as every native part of the application.

Actually, implementing this as plugin would be as easy as pushing an event handler for idGoogle. That would intercept the event and let you do whatever you want when someone clicks that menu item.
However, the problem is that you don't know the value of idGoogle.

So, you would have to push an event handler for right-click, verify whether or not the control key is down, forward the event if it's not, and show your menu otherwise. Then you would have to listen to whatever event ID you assigned to your menu, and implement whatever should happen (copy the code from editorbase.cpp or whatever you want).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Adding Flexiblity to " CTRL - Right Click " searches
« Reply #4 on: February 12, 2008, 04:15:28 pm »
Hmm.... yes, that is possible, but not easy.
Are you sure?, If you take out that functionality out of the core completely you should be able to create a plugin. I did it similar with the koders plugin. It would work.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ