SUMO - Simulation of Urban MObility
GUIUserIO.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
18 // Some OS-dependant functions to ease cliboard manipulation
19 /****************************************************************************/
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #ifdef _MSC_VER
26 #include <windows_config.h>
27 #else
28 #include <config.h>
29 #endif
30 
31 #include "GUIUserIO.h"
32 
33 
34 // ===========================================================================
35 // static member definitions
36 // ===========================================================================
37 std::string GUIUserIO::clipped = "";
38 
39 
40 // ===========================================================================
41 // method definitions
42 // ===========================================================================
43 void
44 GUIUserIO::copyToClipboard(const FXApp& app, const std::string& text) {
45  FXDragType types[] = {FXWindow::stringType, FXWindow::textType};
46  if (app.getActiveWindow()->acquireClipboard(types, 2)) {
47  clipped = text;
48  }
49 }
50 
51 /****************************************************************************/
52 
static std::string clipped
Definition: GUIUserIO.h:63
static void copyToClipboard(const FXApp &app, const std::string &text)
Copies the given text to clipboard.
Definition: GUIUserIO.cpp:44