back by popular demand: load mode icons, tweak shapewipe layout
[goodguy/cinelerra.git] / cinelerra-5.1 / guicast / bcfilebox.C
index f24a39e0b3ee96389b9e4f8d3972229aa050a6b7..803f2fc465542afec39b9179c744f0de2e44cd08 100644 (file)
@@ -546,6 +546,7 @@ BC_FileBox::BC_FileBox(int x, int y, const char *init_path,
        this->h_padding = h_padding;
        delete_thread = new BC_DeleteThread(this);
        rename_thread = 0;
        this->h_padding = h_padding;
        delete_thread = new BC_DeleteThread(this);
        rename_thread = 0;
+       y_margin = 0;
 }
 
 BC_FileBox::~BC_FileBox()
 }
 
 BC_FileBox::~BC_FileBox()
@@ -679,7 +680,9 @@ void BC_FileBox::create_objects()
                add_subwindow(filter_text = new BC_FileBoxFilterText(x1, y, this));
                add_subwindow(filter_popup =
                        new BC_FileBoxFilterMenu(x1 + filter_text->get_w(), y, this));
                add_subwindow(filter_text = new BC_FileBoxFilterText(x1, y, this));
                add_subwindow(filter_popup =
                        new BC_FileBoxFilterMenu(x1 + filter_text->get_w(), y, this));
+               y += filter_text->get_h() + 10;
        }
        }
+       y_margin = y;
 
 // listbox has to be active because refresh might be called from newfolder_thread
        listbox->activate();
 
 // listbox has to be active because refresh might be called from newfolder_thread
        listbox->activate();
@@ -781,6 +784,9 @@ int BC_FileBox::resize_event(int w, int h)
        set_w(w);  set_h(h);
        get_resources()->filebox_w = get_w();
        get_resources()->filebox_h = get_h();
        set_w(w);  set_h(h);
        get_resources()->filebox_w = get_w();
        get_resources()->filebox_h = get_h();
+       y_margin = filter_text ?
+               filter_text->get_y() + filter_text->get_h() + 10 :
+               textbox->get_y() + textbox->get_h() + 10 ;
        flush();
        return 1;
 }
        flush();
        return 1;
 }
@@ -1324,6 +1330,11 @@ void BC_FileBox::create_listbox(int x, int y, int mode)
                add_subwindow(listbox = new BC_FileBoxListBox(x, y, this));
 }
 
                add_subwindow(listbox = new BC_FileBoxListBox(x, y, this));
 }
 
+int BC_FileBox::get_y_margin()
+{
+       return y_margin;
+}
+
 char* BC_FileBox::get_path(int selection)
 {
        if(selection == 0)
 char* BC_FileBox::get_path(int selection)
 {
        if(selection == 0)