|
|
right, i did see
examples in various places
including your cheat page and the examples dir,
but again, no "MyBrowser.h" or the like was in evidence,
so I wasn't sure about the decl.
For the cheat sheet and examples, the code normally broken up
over separate .cxx / .H files
are all kept in one file just to make it easy to copy/paste.
But yeah, typically the class MyWhatever is declared in the
MyWhatever.H file,
and the methods are defined in the MyWhatever.cxx file
struct Brwsr :
Fl_Hold_Browser {
Brwsr(int x, int
y, int w1, int w2, int h);
void
brwsr_cb(Fl_Widget*, void *v);
Most of your example looks fine, but why are you using "struct"
instead of "class" in the above?
Use class so you can use all the normal keywords to control
method visibility such as
public: and protected: and private: and so it's clearly a class.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/a2d8fbbc-d880-f138-37b9-58e03617eda3%40seriss.com.
[ Direct Link to Message ] | |
|
| |