Eclipse SUMO - Simulation of Urban MObility
FXTreeListDinamic.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2004-2022 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
18 //
19 /****************************************************************************/
20 
21 #include "FXTreeListDinamic.h"
22 
23 // ===========================================================================
24 // FOX callback mapping
25 // ===========================================================================
26 
27 FXDEFMAP(FXTreeListDinamic) FXTreeListDinamicMap[] = {
28  FXMAPFUNC(SEL_LEFTBUTTONPRESS, 0, FXTreeListDinamic::onLeftBtnPress),
29 };
30 
31 // Object implementation
32 FXIMPLEMENT(FXTreeListDinamic, FXTreeList, FXTreeListDinamicMap, ARRAYNUMBER(FXTreeListDinamicMap))
33 
34 // ===========================================================================
35 // member method definitions
36 // ===========================================================================
37 
38 FXTreeListDinamic::FXTreeListDinamic(FXComposite* p, FXObject* tgt, FXSelector sel, FXuint opts) :
39  FXTreeList(p, tgt, sel, opts, 0, 0, 0, 200) {
40 }
41 
42 
43 void
45  // update height
46  setHeight(getContentHeight() + 20);
47  // show
48  FXTreeList::show();
49 }
50 
51 
52 long
53 FXTreeListDinamic::onLeftBtnPress(FXObject* obj, FXSelector sel, void* ptr) {
54  FXTreeList::onLeftBtnPress(obj, sel, ptr);
55  // update height
56  setHeight(getContentHeight() + 20);
57  return 1;
58 }
59 
60 
62 }
FXDEFMAP(FXTreeListDinamic) FXTreeListDinamicMap[]
FXTreeListDinamic.
FXTreeListDinamic()
default constructor
long onLeftBtnPress(FXObject *, FXSelector, void *)
void show()
Show FXTreeListDinamic.