X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbclistbox.h;h=8d42508047682efc035c12280cea6b39d0f1bdec;hb=0a0a29dd9e484b5622b46173d51bb6cefc0a5da4;hp=442a8245f5c7e43ae09efa699c066fcfb216d37d;hpb=26fe9e12d6d42ae8f7087ac7f08242769d77a84a;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/guicast/bclistbox.h b/cinelerra-5.1/guicast/bclistbox.h index 442a8245..8d425080 100644 --- a/cinelerra-5.1/guicast/bclistbox.h +++ b/cinelerra-5.1/guicast/bclistbox.h @@ -27,50 +27,41 @@ #include "bcscrollbar.h" #include "bcsubwindow.h" #include "bctoggle.h" -#include "colors.h" +#include "bccolors.h" #define BCPOPUPLISTBOX_W 25 #define BCPOPUPLISTBOX_H 25 +class BC_ListBoxYScroll; +class BC_ListBoxXScroll; +class BC_ListBoxToggle; +class BC_ListBox; #define MIN_COLUMN_WIDTH 10 class BC_ListBoxYScroll : public BC_ScrollBar { + BC_ListBox *listbox; public: - BC_ListBoxYScroll(BC_ListBox *listbox, - int total_height, - int view_height, - int position); + BC_ListBoxYScroll(BC_ListBox *listbox); ~BC_ListBoxYScroll(); int handle_event(); - int update_length(int64_t length, int64_t position, int64_t handlelength, int flush); -private: - BC_ListBox *listbox; }; class BC_ListBoxXScroll : public BC_ScrollBar { + BC_ListBox *listbox; public: - BC_ListBoxXScroll(BC_ListBox *listbox, - int total_width, - int view_width, - int position); + BC_ListBoxXScroll(BC_ListBox *listbox); ~BC_ListBoxXScroll(); int handle_event(); - int update_length(int64_t length, int64_t position, int64_t handlelength, int flush); -private: - BC_ListBox *listbox; }; class BC_ListBoxToggle { public: - BC_ListBoxToggle(BC_ListBox *listbox, - BC_ListBoxItem *item, - int x, - int y); + BC_ListBoxToggle(BC_ListBox *listbox, BC_ListBoxItem *item, int x, int y); int cursor_motion_event(int *redraw_toggles); int cursor_leave_event(int *redraw_toggles); @@ -98,11 +89,11 @@ public: class BC_ListBox : public BC_SubWindow { + friend class BC_ListBoxYScroll; + friend class BC_ListBoxXScroll; + friend class BC_ListBoxToggle; public: - BC_ListBox(int x, - int y, - int w, - int h, + BC_ListBox(int x, int y, int w, int h, int display_format, // Display text list or icons ArrayList *data = 0, // Each column has an ArrayList of BC_ListBoxItems. const char **column_titles = 0, // Titles for columns. Set to 0 for no titles @@ -115,8 +106,6 @@ public: int allow_drag = 0); // Allow user to drag icons around virtual ~BC_ListBox(); - friend class BC_ListBoxToggle; - int initialize(); // User event handler for new selections @@ -212,14 +201,11 @@ public: // change the contents int update(ArrayList *data, - const char **column_titles, - int *column_widths, - int columns, - int xposition = 0, - int yposition = 0, - int highlighted_number = -1, // Flat index of item cursor is over - int recalc_positions = 0, // set all autoplace flags to 1 - int draw = 1); + const char **column_titles, int *column_widths, int columns, + int xposition = 0, int yposition = 0, + int highlighted_number = -1, // Flat index of item cursor is over + int recalc_positions = 0, // set all autoplace flags to 1 + int draw = 1); void center_selection(); void update_format(int display_format, int redraw); int get_format(); @@ -248,6 +234,7 @@ public: int get_xscroll_x(); int get_xscroll_y(); int get_xscroll_width(); + void set_scroll_stretch(int xv, int yv); int get_column_offset(int column); int get_column_width(int column, int clamp_right = 0); int get_title_h(); @@ -266,7 +253,6 @@ public: int get_first_visible() { return first_in_view; } int get_last_visible() { return last_in_view; } - enum { SORT_ASCENDING, @@ -533,6 +519,7 @@ private: // In BCLISTBOX_SELECT mode determines the value to set items to int new_value; int need_xscroll, need_yscroll; + int xscroll_orientation, yscroll_orientation; // Move items during drag operation of text items. int process_drag; int allow_drag;