Mercurial > octave-nkf
comparison src/graphics.cc @ 12164:18e9a8da7d18
eliminate some -Weffc++ warnings
author | Pascal Dupuis <Pascal.Dupuis@uclouvain.be> |
---|---|
date | Wed, 26 Jan 2011 05:20:33 -0500 |
parents | 1f56327759e5 |
children | db1f49eaba6b |
comparison
equal
deleted
inserted
replaced
12163:55ebf5df9ea6 | 12164:18e9a8da7d18 |
---|---|
801 break; | 801 break; |
802 } | 802 } |
803 } | 803 } |
804 | 804 |
805 radio_values::radio_values (const std::string& opt_string) | 805 radio_values::radio_values (const std::string& opt_string) |
806 : default_val (), possible_vals () | |
806 { | 807 { |
807 size_t beg = 0; | 808 size_t beg = 0; |
808 size_t len = opt_string.length (); | 809 size_t len = opt_string.length (); |
809 bool done = len == 0; | 810 bool done = len == 0; |
810 | 811 |
5516 | 5517 |
5517 // We use a random value for the handle to avoid issues with plots and | 5518 // We use a random value for the handle to avoid issues with plots and |
5518 // scalar values for the first argument. | 5519 // scalar values for the first argument. |
5519 gh_manager::gh_manager (void) | 5520 gh_manager::gh_manager (void) |
5520 : handle_map (), handle_free_list (), | 5521 : handle_map (), handle_free_list (), |
5521 next_handle (-1.0 - (rand () + 1.0) / (RAND_MAX + 2.0)) | 5522 next_handle (-1.0 - (rand () + 1.0) / (RAND_MAX + 2.0)), |
5523 figure_list (), graphics_lock (), event_queue (), callback_objects () | |
5522 { | 5524 { |
5523 handle_map[0] = graphics_object (new root_figure ()); | 5525 handle_map[0] = graphics_object (new root_figure ()); |
5524 | 5526 |
5525 // Make sure the default graphics toolkit is registered. | 5527 // Make sure the default graphics toolkit is registered. |
5526 graphics_toolkit::default_toolkit (); | 5528 graphics_toolkit::default_toolkit (); |
5611 gh_manager::execute_callback (handle, callback_name, callback_data); | 5613 gh_manager::execute_callback (handle, callback_name, callback_data); |
5612 } | 5614 } |
5613 | 5615 |
5614 private: | 5616 private: |
5615 callback_event (void) | 5617 callback_event (void) |
5616 : base_graphics_event () { } | 5618 : base_graphics_event (), handle (), |
5619 callback_name (), callback_data () | |
5620 { } | |
5617 | 5621 |
5618 private: | 5622 private: |
5619 graphics_handle handle; | 5623 graphics_handle handle; |
5620 std::string callback_name; | 5624 std::string callback_name; |
5621 octave_value callback_data; | 5625 octave_value callback_data; |
5633 { | 5637 { |
5634 function (function_data); | 5638 function (function_data); |
5635 } | 5639 } |
5636 | 5640 |
5637 private: | 5641 private: |
5638 function_event (void) | 5642 |
5639 : base_graphics_event () { } | |
5640 | |
5641 private: | |
5642 graphics_event::event_fcn function; | 5643 graphics_event::event_fcn function; |
5644 | |
5643 void* function_data; | 5645 void* function_data; |
5646 | |
5647 // function_event objects must be created with at least a function. | |
5648 function_event (void); | |
5649 | |
5650 // No copying! | |
5651 | |
5652 function_event (const function_event &); | |
5653 | |
5654 function_event & operator = (const function_event &); | |
5644 }; | 5655 }; |
5645 | 5656 |
5646 class | 5657 class |
5647 set_event : public base_graphics_event | 5658 set_event : public base_graphics_event |
5648 { | 5659 { |
5659 xset (handle, property_name, property_value); | 5670 xset (handle, property_name, property_value); |
5660 } | 5671 } |
5661 | 5672 |
5662 private: | 5673 private: |
5663 set_event (void) | 5674 set_event (void) |
5664 : base_graphics_event () { } | 5675 : base_graphics_event (), |
5676 // FIXME: it it private in order not to be used ? | |
5677 handle (), property_name (), property_value () | |
5678 { } | |
5665 | 5679 |
5666 private: | 5680 private: |
5667 graphics_handle handle; | 5681 graphics_handle handle; |
5668 std::string property_name; | 5682 std::string property_name; |
5669 octave_value property_value; | 5683 octave_value property_value; |