Skip to content

Fails to compile due to private Fl_Spinner members #84

Open
@camthehaxman

Description

@camthehaxman

It looks like this code tries to access some private fields of the Fl_Spinner class, and that is not allowed!

src/widgets.cpp: In constructor 'OS_Spinner::OS_Spinner(int, int, int, int, const char*)':
src/widgets.cpp:195:9: error: 'Fl_Input Fl_Spinner::input_' is private within this context
  195 |         input_.box(OS_INPUT_THIN_DOWN_BOX);
      |         ^~~~~~
In file included from src/widgets.cpp:6:
/usr/include/FL/Fl_Spinner.H:57:17: note: declared private here
   57 |   Fl_Input      input_;                 // Input field for the value
      |                 ^~~~~~
src/widgets.cpp:196:9: error: 'Fl_Repeat_Button Fl_Spinner::up_button_' is private within this context
  196 |         up_button_.labelfont(OS_FONT);
      |         ^~~~~~~~~~
/usr/include/FL/Fl_Spinner.H:59:17: note: declared private here
   59 |                 up_button_,             // Up button
      |                 ^~~~~~~~~~
src/widgets.cpp:197:9: error: 'Fl_Repeat_Button Fl_Spinner::up_button_' is private within this context
  197 |         up_button_.labelsize(OS_FONT_SIZE);
      |         ^~~~~~~~~~
/usr/include/FL/Fl_Spinner.H:59:17: note: declared private here
   59 |                 up_button_,             // Up button
      |                 ^~~~~~~~~~
src/widgets.cpp:198:9: error: 'Fl_Repeat_Button Fl_Spinner::up_button_' is private within this context
  198 |         up_button_.box(OS_MINI_BUTTON_UP_BOX);
      |         ^~~~~~~~~~
/usr/include/FL/Fl_Spinner.H:59:17: note: declared private here
   59 |                 up_button_,             // Up button
      |                 ^~~~~~~~~~
src/widgets.cpp:199:9: error: 'Fl_Repeat_Button Fl_Spinner::up_button_' is private within this context
  199 |         up_button_.down_box(OS_MINI_DEPRESSED_DOWN_BOX);
      |         ^~~~~~~~~~
/usr/include/FL/Fl_Spinner.H:59:17: note: declared private here
   59 |                 up_button_,             // Up button
      |                 ^~~~~~~~~~
src/widgets.cpp:200:9: error: 'Fl_Repeat_Button Fl_Spinner::down_button_' is private within this context
  200 |         down_button_.labelfont(OS_FONT);
      |         ^~~~~~~~~~~~
/usr/include/FL/Fl_Spinner.H:60:17: note: declared private here
   60 |                 down_button_;           // Down button
      |                 ^~~~~~~~~~~~
src/widgets.cpp:201:9: error: 'Fl_Repeat_Button Fl_Spinner::down_button_' is private within this context
  201 |         down_button_.labelsize(OS_FONT_SIZE);
      |         ^~~~~~~~~~~~
/usr/include/FL/Fl_Spinner.H:60:17: note: declared private here
   60 |                 down_button_;           // Down button
      |                 ^~~~~~~~~~~~
src/widgets.cpp:202:9: error: 'Fl_Repeat_Button Fl_Spinner::down_button_' is private within this context
  202 |         down_button_.box(OS_MINI_BUTTON_UP_BOX);
      |         ^~~~~~~~~~~~
/usr/include/FL/Fl_Spinner.H:60:17: note: declared private here
   60 |                 down_button_;           // Down button
      |                 ^~~~~~~~~~~~
src/widgets.cpp:203:9: error: 'Fl_Repeat_Button Fl_Spinner::down_button_' is private within this context
  203 |         down_button_.down_box(OS_MINI_DEPRESSED_DOWN_BOX);
      |         ^~~~~~~~~~~~
/usr/include/FL/Fl_Spinner.H:60:17: note: declared private here
   60 |                 down_button_;           // Down button
      |                 ^~~~~~~~~~~~
make: *** [Makefile:56: tmp/widgets.o] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions