test-GuiSlider.cxx File Reference

#include "TROOT.h"
#include "TApplication.h"
#include "Midad/Gui/GuiMainWindow.h"
#include "Midad/Gui/GuiSlider.h"
#include "Midad/Gui/GuiTable.h"
#include "Midad/Gui/GuiLabel.h"
#include "Midad/Gui/GuiButton.h"
#include <sigc++/sigc++.h>
#include <sigc++/bind.h>
#include <sigc++/slot.h>
#include <iostream>

Go to the source code of this file.

Functions

void done (const char *which)
void print_range (RangeDouble *r)
void set_label (GuiLabel *gl, RangeDouble *range, RangeDouble *extrema)
int main (int argc, char *argv[])

Function Documentation

void done ( const char *  which  ) 

Definition at line 19 of file test-GuiSlider.cxx.

Referenced by HornModule::BeginJob(), BoundsTracker::BoundsTracker(), GfxTrack::BuildDiscreteImp(), GfxShower::BuildDiscreteImp(), EVD::BuildGfxMenu(), MultiPage::BuildMenus(), PrimaryShowerFinder::Bundle(), BDSwicCalibrator::Calibrate(), GuiToggledSubMenu::CallBack(), choose_infid_set(), PrimaryShowerFinder::CleanHoughLines(), PmtPixelsMxx::Clear(), BDSwicPeds::Clear(), BeamDataImp::create_block(), BMSpillFiller::DBU(), PmtPixel::Draw(), GfxStripList::Draw(), GfxDigitList::Draw(), BeamMonSwicPedsDbuModule::Dump(), FileGap::DumpMissing(), Managed::ClusterManager::EraseCluster(), PedStudy::Fill(), BmntImp::Fill(), generate_bdtd_plots(), ChopHelper::GetChopHelp(), IoInputModule::GetCurrentFile(), IoInputModule::GetLastFile(), RawBeamMonBlock::GetNames(), RegistryGui::GetRegistry(), BDUniquify::GetUniqueBlocks(), VtxCluster::HasRisingEdge(), GfxTrackListMenu::HideAll(), GfxStripListMenu::HideAll(), GfxShowerListMenu::HideAll(), GfxMCVecListMenu::HideAll(), GfxDigitListMenu::HideAll(), GuiBase::LayoutChildren(), Finder::Make3DParticle(), parse_path(), Registry::PrintStream(), IoInputModule::ReadHeader(), GfxStripList::ReConfigure(), GfxDigitList::ReConfigure(), BDSwicMaskAccessor::Reset(), JobCPath::Run(), AlgChopListSharp2::RunAlg(), AlgChopListSharp::RunAlg(), StndBmsSpin::Scan(), STND_BMS::Scan(), BMS_STND::Scan(), RegistryGui::SetPossibles(), AlgFitTrackCam::SetRangeAnddS(), BDSwicPeds::SetSpill(), BDSwicPedAccessor::SetSpillTime(), BDSwicMaskAccessor::SetSpillTime(), JobCPath::SetUniquePaths(), AlgFitTrackMS::SetupAlg(), PhotonTransport::SimulateScintHit(), SpillTimeCreateKeyFile(), BDCheckDB::SpinDir(), AlgFitTrackSR::Swim(), AlgFitTrackCam::Swim(), tab_chirp(), RawBeamMonBlock::Unpacker(), EVD::UpdateGfxObjects(), MultiPage::UpdateView(), AlgAltDeMuxBase::ValidateCCEndPlanes(), AlgAltDeMuxBase::ValidateContainedCandidateEndPlanes(), TridPage::ViewMenuHandler(), BeamDataImp::words(), Pedestals::WritePedFile(), BDSwicPedAccessor::~BDSwicPedAccessor(), BDSwicPeds::~BDSwicPeds(), KnotImp::~KnotImp(), PmtPixel::~PmtPixel(), PmtPixelsMxx::~PmtPixelsMxx(), and RawBeamMonBlock::~RawBeamMonBlock().

00020 {
00021     cerr << which << " is done\n";
00022 }

int main ( int  argc,
char *  argv[] 
)

Definition at line 38 of file test-GuiSlider.cxx.

References GuiCompositeFrameBase::Add(), GuiTable::Attach(), GuiSlider::GetExtremaCtrl(), GUI_ALL, GUI_FILL, Range< TYPE >::modified, print_range(), RangeControl< TYPE >::Set(), set_label(), GuiMainWindow::ShowAll(), GuiSlider::UseExtrema(), and GuiSlider::UseRange().

00039 {
00040     using namespace SigC;
00041 
00042     TApplication theApp("App", &argc, argv);
00043     GuiMainWindow mw(200,200);
00044     GuiTable gt(mw,3,3);
00045     mw.Add(gt);
00046 
00047     GuiLabel label(gt,"");
00048     gt.Attach(label,0,1,0,1,GUI_ALL,GUI_ALL);
00049 
00050     GuiPicButton button1(gt,"full-zoom.xpm");
00051     gt.Attach(button1,1,2,1,2,0,0);
00052 
00053     GuiSlider s1(gt,kHorizontalFrame);
00054     gt.Attach(s1,0,1,1,2,GUI_ALL,0);
00055     GuiSlider s2(gt,kVerticalFrame);
00056     gt.Attach(s2,1,2,0,1,0,GUI_ALL);
00057 
00058     RangeDouble* range = manage(new RangeDouble(2,8));
00059     RangeDouble* extrema = manage(new RangeDouble(0,10));
00060 
00061     s1.UseExtrema(*extrema);
00062     s2.UseExtrema(*extrema);
00063     s1.UseRange(*range);
00064     s2.UseRange(*range);
00065     
00066     range->modified.connect(bind(slot(print_range),range));
00067         
00068     Slot0<void> s = bind(bind(bind(slot(set_label),extrema),range),&label);
00069     range->modified.connect(s);
00070     extrema->modified.connect(s);
00071     
00072     GuiSlider e1(gt,kHorizontalFrame);
00073     gt.Attach(e1,0,1,2,3,GUI_ALL,GUI_FILL);
00074     e1.GetExtremaCtrl().Set(0, 100);
00075     e1.UseRange(*extrema);
00076 
00077     GuiSlider e2(gt,kVerticalFrame);
00078     gt.Attach(e2,2,3,0,1,GUI_FILL,GUI_ALL);
00079     e2.GetExtremaCtrl().Set(0, 100);
00080     e2.UseRange(*extrema);
00081 
00082     GuiPicButton button2(gt,"full-zoom.xpm");
00083     gt.Attach(button2,2,3,2,3,0,0);
00084 
00085     mw.ShowAll();
00086     theApp.Run();
00087 
00088     return 0;
00089 } // end of main()

void print_range ( RangeDouble r  ) 

Definition at line 24 of file test-GuiSlider.cxx.

References Range< TYPE >::Max(), and Range< TYPE >::Min().

00025 {
00026     cerr << r->Min() << " < " << r->Max() << endl;
00027 }

void set_label ( GuiLabel gl,
RangeDouble range,
RangeDouble extrema 
)

Definition at line 29 of file test-GuiSlider.cxx.

References Range< TYPE >::Max(), and Range< TYPE >::Min().

Referenced by main().

00030 {
00031     char buf[1024];
00032     sprintf(buf,"%.1f < %.1f < %.1f < %.1f",
00033             extrema->Min(), range->Min(), range->Max(), extrema->Max());
00034     gl->SetText(buf);
00035     cerr << buf << endl;
00036 }


Generated on 3 Oct 2018 for loon by  doxygen 1.6.1