|
void Impala::Application::MediaTable::TableWindowColumn::OpenConfigWindow |
( |
|
) |
[inline, private] |
Definition at line 253 of file TableWindowColumn.h.
References OglGui::Menu::AddItem(), OglGui::SizableWindow::AllDir, BTN_APPLY_FILTER, BTN_REMOVE_FILTER, OglGui::TitledWindow::BtnClose, OglGui::OglWindow::ConnectTo(), Impala::Application::MediaTable::TableWindowCell::DISPLAY_DOT, Impala::Application::MediaTable::TableWindowCell::DISPLAY_FILLED, Impala::Application::MediaTable::TableWindowCell::DISPLAY_IMAGE, Impala::Application::MediaTable::TableWindowCell::DISPLAY_NUMBER, Impala::Application::MediaTable::TableWindowCell::DISPLAY_TEXT, OglGui::OglWindow::GetOGLWND(), OglGui::Window::GetParent(), OglGui::StaticText::GetText(), Impala::Application::MediaTable::TableFilter::GetTextFilter(), OglGui::OglWindow::GetVisible(), mColumnHeader, mColumnName, mConfigWindow, mDisplayMode, mFilter, mFilterAscButton, mFilterHelpAsc, mFilterTextField, mFilterValueButton, mMenuTopPane, OglGui::MenuTopPane::Open(), OglGui::Menu::SEPARATOR, OglGui::SizableWindow::SetAllowMoveDirections(), OglGui::SizableWindow::SetAllowSizeDirections(), OglGui::OglWindow::SetBackground(), OglGui::Button::SetButtonListener(), OglGui::CheckBox::SetCheckBoxListener(), OglGui::TitledWindow::SetCloseWindowListener(), OglGui::Menu::SetMenuListener(), OglGui::Menu::SetOptions(), OglGui::OglWindow::SetRoundness(), OglGui::TextField::SetText(), OglGui::TextField::SetTextFieldListener(), Impala::Application::MediaTable::TableFilter::SetTextFilter(), OglGui::SizableWindow::SetToFrontOnMouseDown(), OglGui::OglWindow::SetVisible(), OglGui::TOLEFTRIGHT, OglGui::TOTOP, and OglGui::OglWindow::W().
Referenced by ButtonSelectionEvent(). 00254 {
00255
00256 int zx = 0;
00257 int zy = 6;
00258
00259 if (mMenuTopPane)
00260
00261 delete mMenuTopPane;
00262 MenuTopPane* top = mMenuTopPane = new MenuTopPane(this);
00263
00264 oglSys.VPToTopWndI(mColumnHeader->GetOGLWND(),&zx,&zy);
00265 oglSys.TopWndToVPI(top->GetOGLWND(),&zx,&zy);
00266
00267 if(zx+320 > GetParent()->W())
00268 zx = GetParent()->W()-320;
00269
00270 mConfigWindow = new TitledWindow(top, zx, zy-120, 320, 120,
00271 "Filter on column " + mColumnName,
00272 TitledWindow::BtnClose);
00273
00274 mConfigWindow->SetAllowMoveDirections(TitledWindow::AllDir,false);
00275 mConfigWindow->SetAllowSizeDirections(TitledWindow::AllDir,false);
00276 mConfigWindow->SetToFrontOnMouseDown(false);
00277 mConfigWindow->SetBackground(0xddffffff);
00278 mConfigWindow->SetRoundness(0, 0, 0 ,0);
00279 mConfigWindow->SetCloseWindowListener(this, 0);
00280 top->Open();
00281
00282 mFilterTextField = new TextField(mConfigWindow, 10, 50, 280, 20, "");
00283 mFilterTextField->SetTextFieldListener(this, 0);
00284 mFilterTextField->ConnectTo(mConfigWindow, OglGui::TOTOP | OglGui::TOLEFTRIGHT);
00285
00286 mFilterHelpAsc = new StaticText(mConfigWindow, 10, 70, 280, 20, "Enter lowest number to show");
00287 mFilterAscButton = new CheckBox(mConfigWindow,280-120, 30, 120, 20, "invert filter", false);
00288 mFilterAscButton->ConnectTo(mConfigWindow,OglGui::TOTOP | OglGui::TOLEFTRIGHT);
00289 mFilterAscButton->SetVisible(false);
00290 mFilterAscButton->SetCheckBoxListener(this, 0);
00291
00292 Menu *filterMenu = new Menu(top, 1, 120);
00293 filterMenu->AddItem("filter " + mColumnName, 0);
00294 filterMenu->SetOptions(0, Menu::SEPARATOR, true);
00295 filterMenu->AddItem("strong match", 2);
00296 filterMenu->AddItem("less strong", 3);
00297 filterMenu->AddItem("weak match", 4);
00298 filterMenu->AddItem("very weak match", 5);
00299 filterMenu->AddItem("everything", 9);
00300
00301 filterMenu->SetMenuListener(this, 0);
00302
00303 mFilterValueButton =
00304 new MenuOnButton(mConfigWindow, 10, 60, 280, 20, "Filter", filterMenu);
00305 mFilterValueButton->ConnectTo(mConfigWindow, OglGui::TOTOP|OglGui::TOLEFTRIGHT);
00306
00307 Button *apply = new Button(mConfigWindow, 200, 10, 100, 20, "Apply filter");
00308 Button *disable = new Button(mConfigWindow, 80, 10, 100, 20, "Remove filter");
00309 apply->SetButtonListener(this, BTN_APPLY_FILTER);
00310 disable->SetButtonListener(this, BTN_REMOVE_FILTER);
00311
00312
00313 mFilterHelpAsc->SetVisible(false);
00314 mFilterAscButton->SetVisible(false);
00315 switch (mDisplayMode)
00316 {
00317 case TableWindowCell::DISPLAY_TEXT:
00318 mFilterTextField->SetVisible(true);
00319 mFilterTextField->SetText(mFilter->GetTextFilter());
00320 mFilter->SetTextFilter(mFilterTextField->GetText());
00321 mFilterValueButton->SetVisible(false);
00322 break;
00323 case TableWindowCell::DISPLAY_NUMBER:
00324 mFilterTextField->SetVisible(true);
00325 mFilterTextField->SetText(mFilter->GetTextFilter());
00326 mFilter->SetTextFilter(mFilterTextField->GetText());
00327 mFilterValueButton->SetVisible(false);
00328 mFilterHelpAsc->SetVisible(true);
00329 mFilterAscButton->SetVisible(true);
00330 break;
00331 case TableWindowCell::DISPLAY_IMAGE:
00332 mFilterTextField->SetVisible(false);
00333 mFilterValueButton->SetVisible(false);
00334 break;
00335 case TableWindowCell::DISPLAY_DOT:
00336 case TableWindowCell::DISPLAY_FILLED:
00337 mFilterTextField->SetVisible(false);
00338 mFilterValueButton->SetVisible(true);
00339 break;
00340 }
00341 if (mFilterTextField->GetVisible())
00342 oglFocusWnd = mFilterTextField->GetOGLWND();
00343
00344
00345
00346
00347
00348
00349 return;
00350 }
Here is the call graph for this function:
|