SUMO - Simulation of Urban MObility
GNEFrame.cpp
Go to the documentation of this file.
1 /****************************************************************************/
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
10 // Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software; you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation; either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #ifdef _MSC_VER
25 #include <windows_config.h>
26 #else
27 #include <config.h>
28 #endif
29 
30 #ifdef HAVE_VERSION_H
31 #include <version.h>
32 #endif
33 
34 #include <iostream>
43 
44 #include "GNEFrame.h"
45 #include "GNEViewParent.h"
46 #include "GNEViewNet.h"
47 
48 #ifdef CHECK_MEMORY_LEAKS
49 #include <foreign/nvwa/debug_new.h>
50 #endif // CHECK_MEMORY_LEAKS
51 
52 // ===========================================================================
53 // method definitions
54 // ===========================================================================
55 
56 GNEFrame::GNEFrame(FXComposite* parent, GNEViewNet* viewNet, const std::string& frameLabel) :
57  FXScrollWindow(parent, LAYOUT_FILL),
58  myViewNet(viewNet) {
59  // Create font
60  myFrameHeaderFont = new FXFont(getApp(), "Arial", 14, FXFont::Bold),
61 
62  // Create frame for contect
63  myContentFrame = new FXVerticalFrame(this, LAYOUT_FILL);
64 
65  // Create frame for header
66  myHeaderFrame = new FXHorizontalFrame(myContentFrame, LAYOUT_FILL_X);
67 
68  // Create frame for left elements of header (By default unused)
69  myHeaderLeftFrame = new FXHorizontalFrame(myHeaderFrame);
70  myHeaderLeftFrame->hide();
71 
72  // Create titel frame
73  myFrameHeaderLabel = new FXLabel(myHeaderFrame, frameLabel.c_str(), 0, JUSTIFY_LEFT | LAYOUT_FILL_X);
74 
75  // Create frame for right elements of header (By default unused)
76  myHeaderRightFrame = new FXHorizontalFrame(myHeaderFrame);
77  myHeaderRightFrame->hide();
78 
79  // Set font of header
81 
82  // Hide Frame
83  FXScrollWindow::hide();
84 }
85 
86 
88  delete myFrameHeaderFont;
89 }
90 
91 
94  return myViewNet;
95 }
96 
97 
98 FXLabel*
100  return myFrameHeaderLabel;
101 }
102 
103 
104 FXFont*
106  return myFrameHeaderFont;
107 }
108 
109 /****************************************************************************/
GNEFrame()
FOX needs this.
Definition: GNEFrame.h:82
FXLabel * getFrameHeaderLabel() const
get the label for the frame&#39;s header
Definition: GNEFrame.cpp:99
FXFont * myFrameHeaderFont
Font for the Header.
Definition: GNEFrame.h:88
FXHorizontalFrame * myHeaderRightFrame
fame for right header elements
Definition: GNEFrame.h:103
FXFont * getFrameHeaderFont() const
get font of the header&#39;s frame
Definition: GNEFrame.cpp:105
FXHorizontalFrame * myHeaderFrame
fame for header elements
Definition: GNEFrame.h:97
GNEViewNet * getViewNet() const
get view net
Definition: GNEFrame.cpp:93
GNEViewNet * myViewNet
the window to inform when the tls is modfied
Definition: GNEFrame.h:85
FXVerticalFrame * myContentFrame
the panel to hold all member widgets
Definition: GNEFrame.h:94
FXLabel * myFrameHeaderLabel
the label for the frame&#39;s header
Definition: GNEFrame.h:91
~GNEFrame()
destructor
Definition: GNEFrame.cpp:87
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
Definition: GNEFrame.h:100