User forums > General (but related to Code::Blocks)

Idea

(1/5) > >>

Vampyre_Dark:
I thought of this tonight after writing out a big source file full of functions I would need to declare in a header. I've always wanted this but never thought of the idea to actually have it has a feature. What if you could right click in the editor window and choose an option to grab the function names from that file into some kind of a buffer in the program, so you could then paste them somewhere else.

rickg22:
Um, mind posting a more complete example? Maybe we can improve that idea...

mandrav:
Try this: right-click in the editor and select "Insert->Class method declaration/implementation"

fiammy:
I think Vampyre_Dark means it the other way. You write the source file, and in a way you 'generate' the header file from your already written source. Correct me if I'm wrong

Vampyre_Dark:
Sorry. I'm stupid that way sometimes. I'm bad at getting my ideas across most of the time. :) Basically, say I just wrote a CPP file full of functions to deal with direct input. Now I need to declare these functions in my main header (or any header, whatever) I have to start copying and pasting function names and remembering to put the ';' at the end. It's easy, and a no brainer, but when I have a bunch of functions, I find it very boring and tedious.

So what if I could right click, and use the context menu to grab all the function names? Like this out of my input.cpp


--- Code: ---//Input.cpp
void    InputAcquire(void);
bool    InputInit(HWND hWnd);
void    InputShutdown(void);
void    InputPoll(BYTE Keys[], int nSize, DIMOUSESTATE2 &Mouse);
vector3 CursorToVector(DIMOUSESTATE2 &Mouse);
--- End code ---


Store it in a buffer, and then I can paste it where I need it.

Navigation

[0] Message Index

[#] Next page

Go to full version