diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e8cf79f..29b11114 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: pull_request: env: - WX_VERSION: '3.2.4' + WX_VERSION: '3.2.8.1' DEFAULT_BRANCH: develop @@ -150,7 +150,7 @@ jobs: wex/build_linux/wex*.a build-on-windows: - runs-on: windows-latest + runs-on: windows-2022 env: GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} steps: @@ -388,4 +388,4 @@ jobs: wex/build_linux/tools/DView* wex/build_linux/tools/wexsandbox* wex/build_linux/wex*.a - \ No newline at end of file + diff --git a/CMakeLists.txt b/CMakeLists.txt index add9b59d..c201f6bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,7 @@ Project(wex C CXX) # Compile Options per Platform # ##################################################################################################################### +set(CMAKE_CXX_STANDARD 20) if (MSVC) add_compile_options(/W3 /MP) @@ -44,10 +45,6 @@ if (MSVC) set(${flag_var} "${${flag_var}} /D_DEBUG" CACHE STRING "compile flags" FORCE) endforeach () else () - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -# if (APPLE) -# add_compile_options( -arch x86_64 -arch arm64 ) -# endif () add_compile_options(-Wall -Wno-unknown-pragmas -Wno-strict-aliasing) add_compile_options(-fno-common ${wxWidgets_CXX_FLAGS}) add_definitions(-DLK_USE_WXWIDGETS -D_CRT_SECURE_NO_WARNINGS -D_MBCS -DFT2_BUILD_LIBRARY -DOPJ_STATIC -DFT_CONFIG_MODULES_H=\"slimftmodules.h\" -DFT_CONFIG_OPTIONS_H=\"slimftoptions.h\") @@ -69,17 +66,53 @@ endif () if (UNIX) if (EXISTS /usr/local/bin/wx-config-3) set(wxWidgets_CONFIG_EXECUTABLE /usr/local/bin/wx-config-3) - find_package(wxWidgets REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base) + find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base) else () set(wxWidgets_CONFIG_EXECUTABLE $ENV{WXMSW3}/bin/wx-config) - find_package(wxWidgets REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base) + find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base) endif () else () +# set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) +# set(CMAKE_MAP_IMPORTED_CONFIG_DEBUG Release) +# find_package(wxWidgets QUIET REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) + set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Debug and Release Builds Configured" FORCE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++20") + # for linking to Release build of ortools + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL") + # Get the current debug flags and remove the /D_DEBUG option. + string(REPLACE "/D_DEBUG" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") + # following does not force release libraries for wxWidgets using find_package + #set(CMAKE_MAP_IMPORTED_CONFIG_DEBUG RELEASE) + set(wxWidgets_ROOT_DIR $ENV{WXMSW3}) - find_package(wxWidgets REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) + find_package(wxWidgets QUIET REQUIRED xrc webview stc richtext ribbon propgrid aui gl html qa adv core xml net base scintilla) + + # message("All wxWidgets: " ${wxWidgets_LIBRARIES}) + set(FOUND "false") + foreach(lib ${wxWidgets_LIBRARIES}) + string(FIND ${lib} "optimized" INDEX) + string(FIND ${lib} "debug" INDEX2) + string(FIND ${lib} "wxWidgets" INDEX3) + if (INDEX GREATER_EQUAL 0) # skip once + set(FOUND "true") + continue() + elseif((INDEX2 LESS 0) AND (INDEX3 LESS 0)) + set(FOUND "true") + endif() + if (${FOUND} STREQUAL "true") + set(FOUND "false") + message("lib: ${lib}") + list(APPEND WX_LIBS_LIST ${lib}) + endif() + endforeach() + + list(JOIN WX_LIBS_LIST ";" wxWidgets_LIBRARIES) +# message("Link Libraries for wxWidgets: ${wxWidgets_LIBRARIES}") endif () -include(${wxWidgets_USE_FILE}) +if (wxWidgets_FOUND) + include(${wxWidgets_USE_FILE}) +endif () set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}") if (UNIX AND NOT APPLE) diff --git a/LICENSE b/LICENSE index c6f2b345..7857d8d8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2017, 2022 Alliance for Sustainable Energy, LLC +Copyright (c) 2017, 2022 Alliance for Energy Innovation, LLC All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index e123ddf8..1d1fff8a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # WEX: Extensions Library for wxWidgets -WEX is a library of extensions to the [wxWidgets](https://www.wxwidgets.org/) cross-platform user interface (UI) library. These extensions are for custom UI widgets developed for the National Renewable Energy Laboratory's [System Advisor Model™ (SAM™)](https://sam.nrel.gov) and [DView](https://github.com/NREL/wex/wiki/DView) data visualization software. +WEX is a library of extensions to the [wxWidgets](https://www.wxwidgets.org/) cross-platform user interface (UI) library. These extensions are for custom UI widgets developed for the National Laboratory of the Rockies' [System Advisor Model™ (SAM™)](https://sam.nrel.gov) and [DView](https://github.com/NREL/wex/wiki/DView) data visualization software. WEX also includes two executable programs: diff --git a/include/wex/codeedit.h b/include/wex/codeedit.h index bc09033c..5ba2d04b 100644 --- a/include/wex/codeedit.h +++ b/include/wex/codeedit.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/csv.h b/include/wex/csv.h index cd2d7ed6..ca91a75a 100644 --- a/include/wex/csv.h +++ b/include/wex/csv.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/diurnal.h b/include/wex/diurnal.h index 426de8bd..ddb1c32a 100644 --- a/include/wex/diurnal.h +++ b/include/wex/diurnal.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/dview/dvautocolourassigner.h b/include/wex/dview/dvautocolourassigner.h index 96e67d56..d4b9ee44 100644 --- a/include/wex/dview/dvautocolourassigner.h +++ b/include/wex/dview/dvautocolourassigner.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/dview/dvdcctrl.h b/include/wex/dview/dvdcctrl.h index 4b49f32f..27aedc5c 100644 --- a/include/wex/dview/dvdcctrl.h +++ b/include/wex/dview/dvdcctrl.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/dview/dvdmapctrl.h b/include/wex/dview/dvdmapctrl.h index 75f91d30..32b7344e 100644 --- a/include/wex/dview/dvdmapctrl.h +++ b/include/wex/dview/dvdmapctrl.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/dview/dvfilereader.h b/include/wex/dview/dvfilereader.h index 8c676ba8..d38338ee 100644 --- a/include/wex/dview/dvfilereader.h +++ b/include/wex/dview/dvfilereader.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/dview/dvplotctrl.h b/include/wex/dview/dvplotctrl.h index 56febc73..f4ba2f4f 100644 --- a/include/wex/dview/dvplotctrl.h +++ b/include/wex/dview/dvplotctrl.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/dview/dvplotctrlsettings.h b/include/wex/dview/dvplotctrlsettings.h index d800a709..666d4747 100644 --- a/include/wex/dview/dvplotctrlsettings.h +++ b/include/wex/dview/dvplotctrlsettings.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/dview/dvplothelper.h b/include/wex/dview/dvplothelper.h index 332e85dc..07614b1b 100644 --- a/include/wex/dview/dvplothelper.h +++ b/include/wex/dview/dvplothelper.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/dview/dvpncdfctrl.h b/include/wex/dview/dvpncdfctrl.h index 79d81762..4b6763a9 100644 --- a/include/wex/dview/dvpncdfctrl.h +++ b/include/wex/dview/dvpncdfctrl.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/dview/dvprofilectrl.h b/include/wex/dview/dvprofilectrl.h index 296c2438..a07321c2 100644 --- a/include/wex/dview/dvprofilectrl.h +++ b/include/wex/dview/dvprofilectrl.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/dview/dvscatterplotctrl.h b/include/wex/dview/dvscatterplotctrl.h index 595d53ae..56b90c8f 100644 --- a/include/wex/dview/dvscatterplotctrl.h +++ b/include/wex/dview/dvscatterplotctrl.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/dview/dvselectionlist.h b/include/wex/dview/dvselectionlist.h index 10444c89..c015ed6b 100644 --- a/include/wex/dview/dvselectionlist.h +++ b/include/wex/dview/dvselectionlist.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/dview/dvstatisticstablectrl.h b/include/wex/dview/dvstatisticstablectrl.h index 63d84d4a..f64083b0 100644 --- a/include/wex/dview/dvstatisticstablectrl.h +++ b/include/wex/dview/dvstatisticstablectrl.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/dview/dvtimeseriesctrl.h b/include/wex/dview/dvtimeseriesctrl.h index cc7afc89..ff1b579a 100644 --- a/include/wex/dview/dvtimeseriesctrl.h +++ b/include/wex/dview/dvtimeseriesctrl.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/dview/dvtimeseriesdataset.h b/include/wex/dview/dvtimeseriesdataset.h index 2808283f..0e4ca310 100644 --- a/include/wex/dview/dvtimeseriesdataset.h +++ b/include/wex/dview/dvtimeseriesdataset.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/easycurl.h b/include/wex/easycurl.h index 0a3fc8c5..90bf8677 100644 --- a/include/wex/easycurl.h +++ b/include/wex/easycurl.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/extgrid.h b/include/wex/extgrid.h index df6e89ce..5f7db65f 100644 --- a/include/wex/extgrid.h +++ b/include/wex/extgrid.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/exttext.h b/include/wex/exttext.h index 0adc473d..7c335514 100644 --- a/include/wex/exttext.h +++ b/include/wex/exttext.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/exttextstream.h b/include/wex/exttextstream.h index c4943615..48eec417 100644 --- a/include/wex/exttextstream.h +++ b/include/wex/exttextstream.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/exttree.h b/include/wex/exttree.h index 6153947f..61421c4e 100644 --- a/include/wex/exttree.h +++ b/include/wex/exttree.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/gleasy.h b/include/wex/gleasy.h index 1a25803c..5417e958 100644 --- a/include/wex/gleasy.h +++ b/include/wex/gleasy.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/label.h b/include/wex/label.h index 44650095..011ce0f7 100644 --- a/include/wex/label.h +++ b/include/wex/label.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/lkscript.h b/include/wex/lkscript.h index 574258b4..a24cae05 100644 --- a/include/wex/lkscript.h +++ b/include/wex/lkscript.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/matrix.h b/include/wex/matrix.h index 952da002..e2a3be1a 100644 --- a/include/wex/matrix.h +++ b/include/wex/matrix.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without @@ -175,8 +175,8 @@ class wxMatrix { wxMatrix old(*this); Resize(nr, nc); Fill(val); - for (size_t r = 0; r < nr && r < old.nrows(); r++) - for (size_t c = 0; c < nc && c < old.ncols(); c++) + for (size_t r = 0; r < nr && r < old.Rows(); r++) + for (size_t c = 0; c < nc && c < old.Cols(); c++) At(r, c) = old(r, c); } diff --git a/include/wex/metro.h b/include/wex/metro.h index 9f95e37d..a7621d10 100644 --- a/include/wex/metro.h +++ b/include/wex/metro.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without @@ -425,171 +425,7 @@ class wxMetroListBox : public wxScrolledWindow { DECLARE_EVENT_TABLE(); }; -//-------------------------------------------------------------------- -class wxMetroDataViewTreeStoreNode -{ -public: - wxMetroDataViewTreeStoreNode(wxMetroDataViewTreeStoreNode* parent, - const wxString& text, - wxClientData* data = NULL); - virtual ~wxMetroDataViewTreeStoreNode(); - - void SetText(const wxString& text) - { - m_text = text; - } - wxString GetText() const - { - return m_text; - } - void SetData(wxClientData* data) - { - delete m_data; m_data = data; - } - wxClientData* GetData() const - { - return m_data; - } - - wxDataViewItem GetItem() const - { - return wxDataViewItem(const_cast(static_cast(this))); - } - - virtual bool IsContainer() - { - return false; - } - - wxMetroDataViewTreeStoreNode* GetParent() - { - return m_parent; - } - -private: - wxMetroDataViewTreeStoreNode* m_parent; - wxString m_text; - wxClientData* m_data; -}; - -typedef wxVector wxMetroDataViewTreeStoreNodes; - -class wxMetroDataViewTreeStoreContainerNode : public wxMetroDataViewTreeStoreNode -{ -public: - wxMetroDataViewTreeStoreContainerNode(wxMetroDataViewTreeStoreNode* parent, - const wxString& text, - wxClientData* data = NULL); - virtual ~wxMetroDataViewTreeStoreContainerNode(); - - const wxMetroDataViewTreeStoreNodes& GetChildren() const - { - return m_children; - } - wxMetroDataViewTreeStoreNodes& GetChildren() - { - return m_children; - } - - wxMetroDataViewTreeStoreNodes::iterator FindChild(wxMetroDataViewTreeStoreNode* node); - - void SetExpanded(bool expanded = true) - { - m_isExpanded = expanded; - } - bool IsExpanded() const - { - return m_isExpanded; - } - - virtual bool IsContainer() override - { - return true; - } - - void DestroyChildren(); - -private: - wxMetroDataViewTreeStoreNodes m_children; - bool m_isExpanded; -}; - -//----------------------------------------------------------------------------- - -class wxMetroDataViewTreeStore : public wxDataViewModel -{ -public: - wxMetroDataViewTreeStore(); - ~wxMetroDataViewTreeStore(); - - wxDataViewItem AppendItem(const wxDataViewItem& parent, - const wxString& text, - wxClientData* data = NULL); - wxDataViewItem PrependItem(const wxDataViewItem& parent, - const wxString& text, - wxClientData* data = NULL); - wxDataViewItem InsertItem(const wxDataViewItem& parent, const wxDataViewItem& previous, - const wxString& text, - wxClientData* data = NULL); - - wxDataViewItem PrependContainer(const wxDataViewItem& parent, - const wxString& text, - wxClientData* data = NULL); - wxDataViewItem AppendContainer(const wxDataViewItem& parent, - const wxString& text, - wxClientData* data = NULL); - wxDataViewItem InsertContainer(const wxDataViewItem& parent, const wxDataViewItem& previous, - const wxString& text, - wxClientData* data = NULL); - - wxDataViewItem GetNthChild(const wxDataViewItem& parent, unsigned int pos) const; - int GetChildCount(const wxDataViewItem& parent) const; - - void SetItemText(const wxDataViewItem& item, const wxString& text); - wxString GetItemText(const wxDataViewItem& item) const; - void SetItemData(const wxDataViewItem& item, wxClientData* data); - wxClientData* GetItemData(const wxDataViewItem& item) const; - - void DeleteItem(const wxDataViewItem& item); - void DeleteChildren(const wxDataViewItem& item); - void DeleteAllItems(); - - // implement base methods - - virtual void GetValue(wxVariant& variant, - const wxDataViewItem& item, unsigned int col) const override; - virtual bool SetValue(const wxVariant& variant, - const wxDataViewItem& item, unsigned int col) override; - virtual wxDataViewItem GetParent(const wxDataViewItem& item) const override; - virtual bool IsContainer(const wxDataViewItem& item) const override; - virtual unsigned int GetChildren(const wxDataViewItem& item, wxDataViewItemArray& children) const override; - - virtual int Compare(const wxDataViewItem& item1, const wxDataViewItem& item2, - unsigned int column, bool ascending) const override; - - // virtual bool HasContainerColumns(const wxDataViewItem& item) const override; - // virtual bool IsEnabled(const wxDataViewItem& item, unsigned int col) const override; - - - virtual bool HasDefaultCompare() const override - { - return true; - } - - virtual unsigned int GetColumnCount() const override { return 1; } - virtual wxString GetColumnType(unsigned int) const override { return wxString(); } - - - wxMetroDataViewTreeStoreNode* FindNode(const wxDataViewItem& item) const; - wxMetroDataViewTreeStoreContainerNode* FindContainerNode(const wxDataViewItem& item) const; - wxMetroDataViewTreeStoreNode* GetRoot() const { return m_root; } - -public: - wxMetroDataViewTreeStoreNode* m_root; -}; - - -class wxMetroDataViewTreeCtrl : public wxDataViewCtrl +class wxMetroDataViewTreeCtrl : public wxDataViewTreeCtrl { public: wxMetroDataViewTreeCtrl() { } @@ -610,77 +446,18 @@ class wxMetroDataViewTreeCtrl : public wxDataViewCtrl long style = wxDV_NO_HEADER, const wxValidator& validator = wxDefaultValidator); - wxMetroDataViewTreeStore* GetStore() + void OnItemStartEditing(wxDataViewEvent& event) { - return (wxMetroDataViewTreeStore*)GetModel(); - } - const wxMetroDataViewTreeStore* GetStore() const - { - return (const wxMetroDataViewTreeStore*)GetModel(); - } - - bool IsContainer(const wxDataViewItem& item) const - { - return GetStore()->IsContainer(item); - } - - wxDataViewItem AppendItem(const wxDataViewItem& parent, - const wxString& text, wxClientData* data = NULL); - wxDataViewItem PrependItem(const wxDataViewItem& parent, - const wxString& text, wxClientData* data = NULL); - wxDataViewItem InsertItem(const wxDataViewItem& parent, const wxDataViewItem& previous, - const wxString& text, wxClientData* data = NULL); - - wxDataViewItem PrependContainer(const wxDataViewItem& parent, - const wxString& text, wxClientData* data = NULL); - wxDataViewItem AppendContainer(const wxDataViewItem& parent, - const wxString& text, wxClientData* data = NULL); - wxDataViewItem InsertContainer(const wxDataViewItem& parent, const wxDataViewItem& previous, - const wxString& text, wxClientData* data = NULL); - - wxDataViewItem GetNthChild(const wxDataViewItem& parent, unsigned int pos) const - { - return GetStore()->GetNthChild(parent, pos); - } - int GetChildCount(const wxDataViewItem& parent) const - { - return GetStore()->GetChildCount(parent); - } - wxDataViewItem GetItemParent(wxDataViewItem item) const - { - return GetStore()->GetParent(item); - } - - void SetItemText(const wxDataViewItem& item, const wxString& text); - wxString GetItemText(const wxDataViewItem& item) const - { - return GetStore()->GetItemText(item); - } - void SetItemData(const wxDataViewItem& item, wxClientData* data) - { - GetStore()->SetItemData(item, data); - } - wxClientData* GetItemData(const wxDataViewItem& item) const - { - return GetStore()->GetItemData(item); - } - - void DeleteItem(const wxDataViewItem& item); - void DeleteChildren(const wxDataViewItem& item); - void DeleteAllItems(); - - void OnExpanded(wxDataViewEvent& event); - void OnCollapsed(wxDataViewEvent& event); - void OnSize(wxSizeEvent& event); - + // prevent editing + event.Veto(); + } private: wxDECLARE_EVENT_TABLE(); wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMetroDataViewTreeCtrl); + }; - - class wxMetroPopupMenu { public: wxMetroPopupMenu(long theme = 0 /* can be wxMT_LIGHTTHEME */); diff --git a/include/wex/numeric.h b/include/wex/numeric.h index 80a43ef5..3accc45b 100644 --- a/include/wex/numeric.h +++ b/include/wex/numeric.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/pagelayout.h b/include/wex/pagelayout.h index dadeb035..ff3416a0 100644 --- a/include/wex/pagelayout.h +++ b/include/wex/pagelayout.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/pageobjects.h b/include/wex/pageobjects.h index 0bb1bba6..f90122f4 100644 --- a/include/wex/pageobjects.h +++ b/include/wex/pageobjects.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/plot/plannotation.h b/include/wex/plot/plannotation.h index 16096263..6fad6b7c 100644 --- a/include/wex/plot/plannotation.h +++ b/include/wex/plot/plannotation.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/plot/plaxis.h b/include/wex/plot/plaxis.h index 51f7375b..ac717a8e 100644 --- a/include/wex/plot/plaxis.h +++ b/include/wex/plot/plaxis.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/plot/plbarplot.h b/include/wex/plot/plbarplot.h index d6c6856a..a6f6a020 100644 --- a/include/wex/plot/plbarplot.h +++ b/include/wex/plot/plbarplot.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/plot/plcolourmap.h b/include/wex/plot/plcolourmap.h index 577ab463..181eb9b1 100644 --- a/include/wex/plot/plcolourmap.h +++ b/include/wex/plot/plcolourmap.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/plot/plcontourplot.h b/include/wex/plot/plcontourplot.h index b850ef19..b3b0cf06 100644 --- a/include/wex/plot/plcontourplot.h +++ b/include/wex/plot/plcontourplot.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/plot/plhistplot.h b/include/wex/plot/plhistplot.h index 2fc103e3..9f2340f6 100644 --- a/include/wex/plot/plhistplot.h +++ b/include/wex/plot/plhistplot.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/plot/pllineplot.h b/include/wex/plot/pllineplot.h index a5a09908..84063257 100644 --- a/include/wex/plot/pllineplot.h +++ b/include/wex/plot/pllineplot.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/plot/ploutdev.h b/include/wex/plot/ploutdev.h index dde4cf37..e74e2b2b 100644 --- a/include/wex/plot/ploutdev.h +++ b/include/wex/plot/ploutdev.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/plot/plplot.h b/include/wex/plot/plplot.h index f9a37e30..e307db49 100644 --- a/include/wex/plot/plplot.h +++ b/include/wex/plot/plplot.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/plot/plplotctrl.h b/include/wex/plot/plplotctrl.h index ef59ff40..dc789b18 100644 --- a/include/wex/plot/plplotctrl.h +++ b/include/wex/plot/plplotctrl.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/plot/plscatterplot.h b/include/wex/plot/plscatterplot.h index 6002abee..eb6ab1cf 100644 --- a/include/wex/plot/plscatterplot.h +++ b/include/wex/plot/plscatterplot.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/plot/plsectorplot.h b/include/wex/plot/plsectorplot.h index 4144edf8..43e00eda 100644 --- a/include/wex/plot/plsectorplot.h +++ b/include/wex/plot/plsectorplot.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/plot/pltext.h b/include/wex/plot/pltext.h index f0846970..bc156d57 100644 --- a/include/wex/plot/pltext.h +++ b/include/wex/plot/pltext.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/plot/plwindrose.h b/include/wex/plot/plwindrose.h index 66d59e0d..9f21adbe 100644 --- a/include/wex/plot/plwindrose.h +++ b/include/wex/plot/plwindrose.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/radiochoice.h b/include/wex/radiochoice.h index 66a57939..8b8837a7 100644 --- a/include/wex/radiochoice.h +++ b/include/wex/radiochoice.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/registration.h b/include/wex/registration.h index 7ccafa3b..4d693342 100644 --- a/include/wex/registration.h +++ b/include/wex/registration.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/snaplay.h b/include/wex/snaplay.h index a8aabca1..cb5ab578 100644 --- a/include/wex/snaplay.h +++ b/include/wex/snaplay.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/tpdlg.h b/include/wex/tpdlg.h index a7306e59..2c554cb6 100644 --- a/include/wex/tpdlg.h +++ b/include/wex/tpdlg.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/uiform.h b/include/wex/uiform.h index e127367a..894368a7 100644 --- a/include/wex/uiform.h +++ b/include/wex/uiform.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/wex/utils.h b/include/wex/utils.h index 615acfcd..97f76502 100644 --- a/include/wex/utils.h +++ b/include/wex/utils.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/codeedit.cpp b/src/codeedit.cpp index bf7ff558..18426c71 100644 --- a/src/codeedit.cpp +++ b/src/codeedit.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/csv.cpp b/src/csv.cpp index 37681cbc..b4a6d1cf 100644 --- a/src/csv.cpp +++ b/src/csv.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/diurnal.cpp b/src/diurnal.cpp index 17070558..dabebaa7 100644 --- a/src/diurnal.cpp +++ b/src/diurnal.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/dview/dvautocolourassigner.cpp b/src/dview/dvautocolourassigner.cpp index 7a544b31..05ce1bc1 100644 --- a/src/dview/dvautocolourassigner.cpp +++ b/src/dview/dvautocolourassigner.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/dview/dvdcctrl.cpp b/src/dview/dvdcctrl.cpp index 2cefc111..9146b4f2 100644 --- a/src/dview/dvdcctrl.cpp +++ b/src/dview/dvdcctrl.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/dview/dvdmapctrl.cpp b/src/dview/dvdmapctrl.cpp index 1c8cbb8e..cdda3292 100644 --- a/src/dview/dvdmapctrl.cpp +++ b/src/dview/dvdmapctrl.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/dview/dvfilereader.cpp b/src/dview/dvfilereader.cpp index cf013dec..04bb9491 100644 --- a/src/dview/dvfilereader.cpp +++ b/src/dview/dvfilereader.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without @@ -1013,7 +1013,7 @@ bool wxDVFileReader::ReadSQLFile(wxDVPlotCtrl *plotWin, const wxString &filename dictionaryIndex = sqlite3_column_int(sqlStmtPtr, 0); name = ColumnText(sqlite3_column_text(sqlStmtPtr, 1)); keyValue = ColumnText(sqlite3_column_text(sqlStmtPtr, 2)).length() ? ColumnText( - sqlite3_column_text(sqlStmtPtr, 2)) : "Site"; + sqlite3_column_text(sqlStmtPtr, 2)) : wxString("Site"); rf = ColumnText(sqlite3_column_text(sqlStmtPtr, 3)); units = ColumnText(sqlite3_column_text(sqlStmtPtr, 4)); @@ -1409,7 +1409,7 @@ bool wxDVFileReader::IsDate(wxString stringToCheck) { // Conversion factors from Energy+.idd void wxDVFileReader::InitUnitConversions() { // NOTE: tuple format (SI unit string, IP unit string, SI to IP conversion factor) - // See SetupUnitConversions method in https://github.com/NREL/EnergyPlus/blob/develop/src/EnergyPlus/OutputReportTabular.cc + // See SetupUnitConversions method in https://github.com/NatLabRockies/EnergyPlus/blob/develop/src/EnergyPlus/OutputReportTabular.cc m_unitConversions.emplace_back("$/(m3/s)", "$/(ft3/min)", 0.000472000059660808); m_unitConversions.emplace_back("$/(W/K)", "$/(Btu/h-F)", 0.52667614683731); m_unitConversions.emplace_back("$/kW", "$/(kBtuh/h)", 0.293083235638921); diff --git a/src/dview/dvplotctrl.cpp b/src/dview/dvplotctrl.cpp index d93c6aee..9c382458 100644 --- a/src/dview/dvplotctrl.cpp +++ b/src/dview/dvplotctrl.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/dview/dvplotctrlsettings.cpp b/src/dview/dvplotctrlsettings.cpp index 97cfda25..13a1cfc2 100644 --- a/src/dview/dvplotctrlsettings.cpp +++ b/src/dview/dvplotctrlsettings.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/dview/dvplothelper.cpp b/src/dview/dvplothelper.cpp index 4ad3169e..4cd0c998 100644 --- a/src/dview/dvplothelper.cpp +++ b/src/dview/dvplothelper.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/dview/dvpncdfctrl.cpp b/src/dview/dvpncdfctrl.cpp index 622f2c48..efe8c7fc 100644 --- a/src/dview/dvpncdfctrl.cpp +++ b/src/dview/dvpncdfctrl.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/dview/dvprofilectrl.cpp b/src/dview/dvprofilectrl.cpp index ed30d621..6d3d4f17 100644 --- a/src/dview/dvprofilectrl.cpp +++ b/src/dview/dvprofilectrl.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without @@ -202,7 +202,7 @@ wxDVProfileCtrl::wxDVProfileCtrl(wxWindow *parent, wxWindowID id, const wxPoint : wxPanel(parent, id, pos, size, style, name), m_timer(nullptr), m_counter(0) { - //wxFileConfig configFile("DView", "NREL"); + //wxFileConfig configFile("DView", "NLR"); m_srchCtrl = NULL; wxScrolledWindow *monthSelector = new wxScrolledWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL); diff --git a/src/dview/dvscatterplotctrl.cpp b/src/dview/dvscatterplotctrl.cpp index fe156ccb..b768f0d1 100644 --- a/src/dview/dvscatterplotctrl.cpp +++ b/src/dview/dvscatterplotctrl.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/dview/dvselectionlist.cpp b/src/dview/dvselectionlist.cpp index 699612eb..8efc4338 100644 --- a/src/dview/dvselectionlist.cpp +++ b/src/dview/dvselectionlist.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/dview/dvstatisticstablectrl.cpp b/src/dview/dvstatisticstablectrl.cpp index 185eccb4..565a6c4a 100644 --- a/src/dview/dvstatisticstablectrl.cpp +++ b/src/dview/dvstatisticstablectrl.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/dview/dvtimeseriesctrl.cpp b/src/dview/dvtimeseriesctrl.cpp index d02c93e1..5f259e81 100644 --- a/src/dview/dvtimeseriesctrl.cpp +++ b/src/dview/dvtimeseriesctrl.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without @@ -863,7 +863,7 @@ void wxDVTimeSeriesCtrl::ReadState(std::string filename) { // Note: on Mac, these settings are stored in a plist file, // "DView Preferences" in folder ~/Library/Preferences. // On Windows, these settings are stored in the registry - // in key HKEY_CURRENT_USER/Software/NREL/DView + // in key HKEY_CURRENT_USER/Software/NLR/DView wxString s; bool success; diff --git a/src/dview/dvtimeseriesdataset.cpp b/src/dview/dvtimeseriesdataset.cpp index a0cb2e68..3692c399 100644 --- a/src/dview/dvtimeseriesdataset.cpp +++ b/src/dview/dvtimeseriesdataset.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/easycurl.cpp b/src/easycurl.cpp index ee1d005a..1cff8682 100644 --- a/src/easycurl.cpp +++ b/src/easycurl.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/extgrid.cpp b/src/extgrid.cpp index 92154cd8..03c8e4c7 100644 --- a/src/extgrid.cpp +++ b/src/extgrid.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/exttext.cpp b/src/exttext.cpp index d9b5f5bd..e4397e75 100644 --- a/src/exttext.cpp +++ b/src/exttext.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/exttextstream.cpp b/src/exttextstream.cpp index d85859cb..93e16906 100644 --- a/src/exttextstream.cpp +++ b/src/exttextstream.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/exttree.cpp b/src/exttree.cpp index 068ee389..cc8d8567 100644 --- a/src/exttree.cpp +++ b/src/exttree.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/gleasy.cpp b/src/gleasy.cpp index 2ee7577a..8a0d0e96 100644 --- a/src/gleasy.cpp +++ b/src/gleasy.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/label.cpp b/src/label.cpp index dc20ce28..e8e12e1f 100644 --- a/src/label.cpp +++ b/src/label.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/lkscript.cpp b/src/lkscript.cpp index 98870358..ab070e48 100644 --- a/src/lkscript.cpp +++ b/src/lkscript.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/metro.cpp b/src/metro.cpp index 68153990..692fd66d 100644 --- a/src/metro.cpp +++ b/src/metro.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without @@ -1724,577 +1724,31 @@ void wxMetroPopupMenu::Popup(wxWindow *parent, const wxPoint &pos, int origin) { menu->Popup(pos, origin); } -//------------------------------------------------------------------------------------ -wxMetroDataViewTreeStoreNode::wxMetroDataViewTreeStoreNode( - wxMetroDataViewTreeStoreNode* parent, - const wxString& text, wxClientData* data) - : m_text(text) -{ - m_parent = parent; - m_data = data; -} - -wxMetroDataViewTreeStoreNode::~wxMetroDataViewTreeStoreNode() -{ - delete m_data; -} - -wxMetroDataViewTreeStoreContainerNode::wxMetroDataViewTreeStoreContainerNode( - wxMetroDataViewTreeStoreNode* parent, const wxString& text, wxClientData* data) - : wxMetroDataViewTreeStoreNode(parent, text, data) -{ - m_isExpanded = false; -} - -wxMetroDataViewTreeStoreContainerNode::~wxMetroDataViewTreeStoreContainerNode() -{ - DestroyChildren(); -} - -wxMetroDataViewTreeStoreNodes::iterator -wxMetroDataViewTreeStoreContainerNode::FindChild(wxMetroDataViewTreeStoreNode* node) -{ - wxMetroDataViewTreeStoreNodes::iterator iter; - for (iter = m_children.begin(); iter != m_children.end(); ++iter) - { - if (*iter == node) - break; - } - - return iter; -} - -void wxMetroDataViewTreeStoreContainerNode::DestroyChildren() -{ - wxMetroDataViewTreeStoreNodes::const_iterator iter; - for (iter = m_children.begin(); iter != m_children.end(); ++iter) - { - delete* iter; - } - - m_children.clear(); -} - -//----------------------------------------------------------------------------- - -wxMetroDataViewTreeStore::wxMetroDataViewTreeStore() -{ - m_root = new wxMetroDataViewTreeStoreContainerNode(NULL, wxEmptyString); -} - -wxMetroDataViewTreeStore::~wxMetroDataViewTreeStore() -{ - delete m_root; -} - -wxDataViewItem wxMetroDataViewTreeStore::AppendItem(const wxDataViewItem& parent, - const wxString& text, wxClientData* data) -{ - wxMetroDataViewTreeStoreContainerNode* parent_node = FindContainerNode(parent); - if (!parent_node) return wxDataViewItem(0); - - wxMetroDataViewTreeStoreNode* node = - new wxMetroDataViewTreeStoreNode(parent_node, text, data); - parent_node->GetChildren().push_back(node); - - return node->GetItem(); -} - -wxDataViewItem wxMetroDataViewTreeStore::PrependItem(const wxDataViewItem& parent, - const wxString& text, wxClientData* data) -{ - wxMetroDataViewTreeStoreContainerNode* parent_node = FindContainerNode(parent); - if (!parent_node) return wxDataViewItem(0); - - wxMetroDataViewTreeStoreNode* node = - new wxMetroDataViewTreeStoreNode(parent_node, text, data); - wxMetroDataViewTreeStoreNodes& children = parent_node->GetChildren(); - children.insert(children.begin(), node); - - return node->GetItem(); -} - -wxDataViewItem -wxMetroDataViewTreeStore::InsertItem(const wxDataViewItem& parent, - const wxDataViewItem& previous, - const wxString& text, - wxClientData* data) -{ - wxMetroDataViewTreeStoreContainerNode* parent_node = FindContainerNode(parent); - if (!parent_node) return wxDataViewItem(0); - - wxMetroDataViewTreeStoreNode* previous_node = FindNode(previous); - wxMetroDataViewTreeStoreNodes& children = parent_node->GetChildren(); - const wxMetroDataViewTreeStoreNodes::iterator iter = parent_node->FindChild(previous_node); - if (iter == children.end()) return wxDataViewItem(0); - - wxMetroDataViewTreeStoreNode* node = - new wxMetroDataViewTreeStoreNode(parent_node, text, data); - children.insert(iter, node); - - return node->GetItem(); -} - -wxDataViewItem wxMetroDataViewTreeStore::PrependContainer(const wxDataViewItem& parent, - const wxString& text, wxClientData* data) -{ - wxMetroDataViewTreeStoreContainerNode* parent_node = FindContainerNode(parent); - if (!parent_node) return wxDataViewItem(0); - - wxMetroDataViewTreeStoreContainerNode* node = - new wxMetroDataViewTreeStoreContainerNode(parent_node, text, data); - wxMetroDataViewTreeStoreNodes& children = parent_node->GetChildren(); - children.insert(children.begin(), node); - - return node->GetItem(); -} - -wxDataViewItem -wxMetroDataViewTreeStore::AppendContainer(const wxDataViewItem& parent, - const wxString& text, - wxClientData* data) -{ - wxMetroDataViewTreeStoreContainerNode* parent_node = FindContainerNode(parent); - if (!parent_node) return wxDataViewItem(0); - - wxMetroDataViewTreeStoreContainerNode* node = - new wxMetroDataViewTreeStoreContainerNode(parent_node, text, data); - parent_node->GetChildren().push_back(node); - - return node->GetItem(); -} - -wxDataViewItem -wxMetroDataViewTreeStore::InsertContainer(const wxDataViewItem& parent, - const wxDataViewItem& previous, - const wxString& text, - wxClientData* data) -{ - wxMetroDataViewTreeStoreContainerNode* parent_node = FindContainerNode(parent); - if (!parent_node) return wxDataViewItem(0); - - wxMetroDataViewTreeStoreNode* previous_node = FindNode(previous); - wxMetroDataViewTreeStoreNodes& children = parent_node->GetChildren(); - const wxMetroDataViewTreeStoreNodes::iterator iter = parent_node->FindChild(previous_node); - if (iter == children.end()) return wxDataViewItem(0); - - wxMetroDataViewTreeStoreContainerNode* node = - new wxMetroDataViewTreeStoreContainerNode(parent_node, text, data); - children.insert(iter, node); - - return node->GetItem(); -} - -bool wxMetroDataViewTreeStore::IsContainer(const wxDataViewItem& item) const -{ - wxMetroDataViewTreeStoreNode* node = FindNode(item); - if (!node) return false; - - return node->IsContainer(); -} -/* -bool wxMetroDataViewTreeStore::HasContainerColumns(const wxDataViewItem& item) const -{ - if (IsContainer(item)) - return true; - else - return false; -} - -bool wxMetroDataViewTreeStore::IsEnabled(const wxDataViewItem& item, unsigned int col) const -{ - if (IsContainer(item)) - return false; - else - return true; - -} -*/ - -wxDataViewItem wxMetroDataViewTreeStore::GetNthChild(const wxDataViewItem& parent, unsigned int pos) const -{ - wxMetroDataViewTreeStoreContainerNode* parent_node = FindContainerNode(parent); - if (!parent_node) return wxDataViewItem(0); - - wxMetroDataViewTreeStoreNode* const node = parent_node->GetChildren()[pos]; - if (node) - return node->GetItem(); - - return wxDataViewItem(0); -} - -int wxMetroDataViewTreeStore::GetChildCount(const wxDataViewItem& parent) const -{ - wxMetroDataViewTreeStoreNode* node = FindNode(parent); - if (!node) return -1; - - if (!node->IsContainer()) - return 0; - - wxMetroDataViewTreeStoreContainerNode* container_node = (wxMetroDataViewTreeStoreContainerNode*)node; - return (int)container_node->GetChildren().size(); -} - -void wxMetroDataViewTreeStore::SetItemText(const wxDataViewItem& item, const wxString& text) -{ - wxMetroDataViewTreeStoreNode* node = FindNode(item); - if (!node) return; - - node->SetText(text); -} - -wxString wxMetroDataViewTreeStore::GetItemText(const wxDataViewItem& item) const -{ - wxMetroDataViewTreeStoreNode* node = FindNode(item); - if (!node) return wxEmptyString; - - return node->GetText(); -} - -void wxMetroDataViewTreeStore::SetItemData(const wxDataViewItem& item, wxClientData* data) -{ - wxMetroDataViewTreeStoreNode* node = FindNode(item); - if (!node) return; - - node->SetData(data); -} - -wxClientData* wxMetroDataViewTreeStore::GetItemData(const wxDataViewItem& item) const -{ - wxMetroDataViewTreeStoreNode* node = FindNode(item); - if (!node) return NULL; - - return node->GetData(); -} - -void wxMetroDataViewTreeStore::DeleteItem(const wxDataViewItem& item) -{ - if (!item.IsOk()) return; - - wxDataViewItem parent_item = GetParent(item); - - wxMetroDataViewTreeStoreContainerNode* parent_node = FindContainerNode(parent_item); - if (!parent_node) return; - - const wxMetroDataViewTreeStoreNodes::iterator - iter = parent_node->FindChild(FindNode(item)); - if (iter != parent_node->GetChildren().end()) - { - delete* iter; - parent_node->GetChildren().erase(iter); - } -} - -void wxMetroDataViewTreeStore::DeleteChildren(const wxDataViewItem& item) -{ - wxMetroDataViewTreeStoreContainerNode* node = FindContainerNode(item); - if (!node) return; - - node->DestroyChildren(); -} - -void wxMetroDataViewTreeStore::DeleteAllItems() -{ - DeleteChildren(wxDataViewItem(m_root)); -} - -void -wxMetroDataViewTreeStore::GetValue(wxVariant& variant, - const wxDataViewItem& item, - unsigned int WXUNUSED(col)) const -{ - // if (col != 0) return; - - wxMetroDataViewTreeStoreNode* node = FindNode(item); - if (!node) return; - - variant = node->GetText(); -} - -bool -wxMetroDataViewTreeStore::SetValue(const wxVariant& variant, - const wxDataViewItem& item, - unsigned int WXUNUSED(col)) -{ - // if (col != 0) return false; - - wxMetroDataViewTreeStoreNode* node = FindNode(item); - if (!node) return false; - - wxDataViewIconText data; - - data << variant; - - node->SetText(data.GetText()); - - return true; -} - -wxDataViewItem wxMetroDataViewTreeStore::GetParent(const wxDataViewItem& item) const -{ - wxMetroDataViewTreeStoreNode* node = FindNode(item); - if (!node) return wxDataViewItem(0); - - wxMetroDataViewTreeStoreNode* parent = node->GetParent(); - if (!parent) return wxDataViewItem(0); - - if (parent == m_root) - return wxDataViewItem(0); - - return parent->GetItem(); -} - -unsigned int wxMetroDataViewTreeStore::GetChildren(const wxDataViewItem& item, wxDataViewItemArray& children) const -{ - wxMetroDataViewTreeStoreContainerNode* node = FindContainerNode(item); - if (!node) return 0; - - wxMetroDataViewTreeStoreNodes::iterator iter; - for (iter = node->GetChildren().begin(); iter != node->GetChildren().end(); ++iter) - { - wxMetroDataViewTreeStoreNode* child = *iter; - children.Add(child->GetItem()); - } - - return node->GetChildren().size(); -} - -int wxMetroDataViewTreeStore::Compare(const wxDataViewItem& item1, const wxDataViewItem& item2, - unsigned int WXUNUSED(column), bool WXUNUSED(ascending)) const -{ - wxMetroDataViewTreeStoreNode* node1 = FindNode(item1); - wxMetroDataViewTreeStoreNode* node2 = FindNode(item2); - - if (!node1 || !node2 || (node1 == node2)) - return 0; - - wxMetroDataViewTreeStoreContainerNode* const parent = - (wxMetroDataViewTreeStoreContainerNode*)node1->GetParent(); - - wxCHECK_MSG(node2->GetParent() == parent, 0, - wxS("Comparing items with different parent.")); -/* - if (node1->IsContainer() && !node2->IsContainer()) - return -1; - - if (node2->IsContainer() && !node1->IsContainer()) - return 1; -*/ - wxMetroDataViewTreeStoreNodes::const_iterator iter; - for (iter = parent->GetChildren().begin(); iter != parent->GetChildren().end(); ++iter) - { - if (*iter == node1) - return -1; - - if (*iter == node2) - return 1; - } - - wxFAIL_MSG(wxS("Unreachable")); - return 0; -} - -wxMetroDataViewTreeStoreNode* wxMetroDataViewTreeStore::FindNode(const wxDataViewItem& item) const -{ - if (!item.IsOk()) - return m_root; - - return (wxMetroDataViewTreeStoreNode*)item.GetID(); -} - -wxMetroDataViewTreeStoreContainerNode* wxMetroDataViewTreeStore::FindContainerNode(const wxDataViewItem& item) const -{ - if (!item.IsOk()) - return (wxMetroDataViewTreeStoreContainerNode*)m_root; - - wxMetroDataViewTreeStoreNode* node = (wxMetroDataViewTreeStoreNode*)item.GetID(); - - if (!node->IsContainer()) - return NULL; - - return (wxMetroDataViewTreeStoreContainerNode*)node; -} //----------------------------------------------------------------------------- // wxMetroDataViewTreeCtrl //----------------------------------------------------------------------------- -wxIMPLEMENT_DYNAMIC_CLASS(wxMetroDataViewTreeCtrl, wxDataViewCtrl); +wxIMPLEMENT_DYNAMIC_CLASS(wxMetroDataViewTreeCtrl, wxDataViewTreeCtrl); -wxBEGIN_EVENT_TABLE(wxMetroDataViewTreeCtrl, wxDataViewCtrl) -EVT_DATAVIEW_ITEM_EXPANDED(-1, wxMetroDataViewTreeCtrl::OnExpanded) -EVT_DATAVIEW_ITEM_COLLAPSED(-1, wxMetroDataViewTreeCtrl::OnCollapsed) +wxBEGIN_EVENT_TABLE(wxMetroDataViewTreeCtrl, wxDataViewTreeCtrl) +EVT_DATAVIEW_ITEM_EXPANDED(wxID_ANY, wxMetroDataViewTreeCtrl::OnExpanded) +EVT_DATAVIEW_ITEM_COLLAPSED(wxID_ANY, wxMetroDataViewTreeCtrl::OnCollapsed) EVT_SIZE(wxMetroDataViewTreeCtrl::OnSize) +EVT_DATAVIEW_ITEM_START_EDITING(wxID_ANY, wxMetroDataViewTreeCtrl::OnItemStartEditing) + wxEND_EVENT_TABLE() bool wxMetroDataViewTreeCtrl::Create(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator) { - if (!wxDataViewCtrl::Create(parent, id, pos, size, style, validator)) + if (!wxDataViewTreeCtrl::Create(parent, id, pos, size, style, validator)) return false; SetBackgroundStyle(wxBG_STYLE_CUSTOM); SetBackgroundColour(*wxWHITE); SetFont(wxMetroTheme::Font(wxMT_LIGHT, 15)); - - // create the standard model and a column in the tree - wxMetroDataViewTreeStore* store = new wxMetroDataViewTreeStore; - AssociateModel(store); - store->DecRef(); - - AppendTextColumn - ( - wxString(), // no label (header is not shown anyhow) - 0, // the only model column - wxDATAVIEW_CELL_INERT, - -1, // default width - wxALIGN_NOT, // and alignment - 0 // not resizable - ); - return true; } -wxDataViewItem wxMetroDataViewTreeCtrl::AppendItem(const wxDataViewItem& parent, - const wxString& text, wxClientData* data) -{ - wxDataViewItem res = GetStore()-> - AppendItem(parent, text, data); - - GetStore()->ItemAdded(parent, res); - return res; -} - -wxDataViewItem wxMetroDataViewTreeCtrl::PrependItem(const wxDataViewItem& parent, - const wxString& text, wxClientData* data) -{ - wxDataViewItem res = GetStore()-> - PrependItem(parent, text, data); - - GetStore()->ItemAdded(parent, res); - - return res; -} - -wxDataViewItem wxMetroDataViewTreeCtrl::InsertItem(const wxDataViewItem& parent, const wxDataViewItem& previous, - const wxString& text, wxClientData* data) -{ - wxDataViewItem res = GetStore()-> - InsertItem(parent, previous, text, data); - - GetStore()->ItemAdded(parent, res); - - return res; -} - -wxDataViewItem wxMetroDataViewTreeCtrl::PrependContainer(const wxDataViewItem& parent, - const wxString& text, wxClientData* data) -{ - wxDataViewItem res = GetStore()-> - PrependContainer(parent, text, data); - - GetStore()->ItemAdded(parent, res); - - return res; -} - -wxDataViewItem wxMetroDataViewTreeCtrl::AppendContainer(const wxDataViewItem& parent, - const wxString& text, wxClientData* data) -{ - wxDataViewItem res = GetStore()-> - AppendContainer(parent, text, data); - - GetStore()->ItemAdded(parent, res); - - return res; -} - -wxDataViewItem wxMetroDataViewTreeCtrl::InsertContainer(const wxDataViewItem& parent, const wxDataViewItem& previous, - const wxString& text, wxClientData* data) -{ - wxDataViewItem res = GetStore()-> - InsertContainer(parent, previous, text, data); - - GetStore()->ItemAdded(parent, res); - - return res; -} - -void wxMetroDataViewTreeCtrl::SetItemText(const wxDataViewItem& item, const wxString& text) -{ - GetStore()->SetItemText(item, text); - - // notify control - GetStore()->ValueChanged(item, 0); -} - - -void wxMetroDataViewTreeCtrl::DeleteItem(const wxDataViewItem& item) -{ - wxDataViewItem parent_item = GetStore()->GetParent(item); - - GetStore()->DeleteItem(item); - - // notify control - GetStore()->ItemDeleted(parent_item, item); -} - -void wxMetroDataViewTreeCtrl::DeleteChildren(const wxDataViewItem& item) -{ - wxMetroDataViewTreeStoreContainerNode* node = GetStore()->FindContainerNode(item); - if (!node) return; - - wxDataViewItemArray array; - wxMetroDataViewTreeStoreNodes::iterator iter; - for (iter = node->GetChildren().begin(); iter != node->GetChildren().end(); ++iter) - { - wxMetroDataViewTreeStoreNode* child = *iter; - array.Add(child->GetItem()); - } - - GetStore()->DeleteChildren(item); - - // notify control - GetStore()->ItemsDeleted(item, array); -} - -void wxMetroDataViewTreeCtrl::DeleteAllItems() -{ - GetStore()->DeleteAllItems(); - - GetStore()->Cleared(); -} - -void wxMetroDataViewTreeCtrl::OnExpanded(wxDataViewEvent& event) -{ - wxMetroDataViewTreeStoreContainerNode* container = GetStore()->FindContainerNode(event.GetItem()); - if (!container) return; - - container->SetExpanded(true); - - GetStore()->ItemChanged(event.GetItem()); -} - -void wxMetroDataViewTreeCtrl::OnCollapsed(wxDataViewEvent& event) -{ - wxMetroDataViewTreeStoreContainerNode* container = GetStore()->FindContainerNode(event.GetItem()); - if (!container) return; - - container->SetExpanded(false); - - GetStore()->ItemChanged(event.GetItem()); -} - -void wxMetroDataViewTreeCtrl::OnSize(wxSizeEvent& event) -{ -#if defined(wxHAS_GENERIC_DATAVIEWCTRL) - // automatically resize our only column to take the entire control width - if (GetColumnCount()) - { - wxSize size = GetClientSize(); - GetColumn(0)->SetWidth(size.x); - } -#endif - event.Skip(true); -} diff --git a/src/numeric.cpp b/src/numeric.cpp index 92377b58..34eea26f 100644 --- a/src/numeric.cpp +++ b/src/numeric.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/ole/iehtmlwin.cpp b/src/ole/iehtmlwin.cpp index 1aa0d355..5446ed16 100644 --- a/src/ole/iehtmlwin.cpp +++ b/src/ole/iehtmlwin.cpp @@ -120,7 +120,7 @@ void wxIEHtmlWin::SetupBrowser() { m_webBrowser->put_RegisterAsBrowser(VARIANT_TRUE); m_webBrowser->put_RegisterAsDropTarget(VARIANT_TRUE); - m_webBrowser->Navigate(L"about:blank", NULL, NULL, NULL, NULL); + m_webBrowser->Navigate((BSTR)"about:blank", NULL, NULL, NULL, NULL); } diff --git a/src/pagelayout.cpp b/src/pagelayout.cpp index 4053fdfa..aa96f752 100644 --- a/src/pagelayout.cpp +++ b/src/pagelayout.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/pageobjects.cpp b/src/pageobjects.cpp index 3f9e67fb..64fa289d 100644 --- a/src/pageobjects.cpp +++ b/src/pageobjects.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/plot/mplcontour.cpp b/src/plot/mplcontour.cpp index 9ce4c7d1..34d3cbd8 100644 --- a/src/plot/mplcontour.cpp +++ b/src/plot/mplcontour.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/plot/mplcontour.h b/src/plot/mplcontour.h index ef81fc2e..fb0948ac 100644 --- a/src/plot/mplcontour.h +++ b/src/plot/mplcontour.h @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/plot/plannotation.cpp b/src/plot/plannotation.cpp index e57d950b..52f30421 100644 --- a/src/plot/plannotation.cpp +++ b/src/plot/plannotation.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/plot/plaxis.cpp b/src/plot/plaxis.cpp index 47021d33..21965839 100644 --- a/src/plot/plaxis.cpp +++ b/src/plot/plaxis.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/plot/plbarplot.cpp b/src/plot/plbarplot.cpp index 30dd03ff..b54a5b44 100644 --- a/src/plot/plbarplot.cpp +++ b/src/plot/plbarplot.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/plot/plcolourmap.cpp b/src/plot/plcolourmap.cpp index 85af32af..7135e0ee 100644 --- a/src/plot/plcolourmap.cpp +++ b/src/plot/plcolourmap.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/plot/plcontourplot.cpp b/src/plot/plcontourplot.cpp index 7769ac00..8a4d7453 100644 --- a/src/plot/plcontourplot.cpp +++ b/src/plot/plcontourplot.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/plot/plhistplot.cpp b/src/plot/plhistplot.cpp index b483cbce..66b54c7c 100644 --- a/src/plot/plhistplot.cpp +++ b/src/plot/plhistplot.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/plot/pllineplot.cpp b/src/plot/pllineplot.cpp index 2ac87b85..1c21582b 100644 --- a/src/plot/pllineplot.cpp +++ b/src/plot/pllineplot.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/plot/ploutdev.cpp b/src/plot/ploutdev.cpp index e5ce771f..6a9df29b 100644 --- a/src/plot/ploutdev.cpp +++ b/src/plot/ploutdev.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/plot/plplot.cpp b/src/plot/plplot.cpp index 566e9f3c..b26a1a26 100644 --- a/src/plot/plplot.cpp +++ b/src/plot/plplot.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/plot/plplotctrl.cpp b/src/plot/plplotctrl.cpp index 8f0535dc..4bedb86f 100644 --- a/src/plot/plplotctrl.cpp +++ b/src/plot/plplotctrl.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/plot/plscatterplot.cpp b/src/plot/plscatterplot.cpp index d99905d6..69a252f6 100644 --- a/src/plot/plscatterplot.cpp +++ b/src/plot/plscatterplot.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/plot/plsectorplot.cpp b/src/plot/plsectorplot.cpp index 00bbda46..a71f7a6f 100644 --- a/src/plot/plsectorplot.cpp +++ b/src/plot/plsectorplot.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/plot/pltext.cpp b/src/plot/pltext.cpp index 22818d9a..2e96cc73 100644 --- a/src/plot/pltext.cpp +++ b/src/plot/pltext.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/plot/plwindrose.cpp b/src/plot/plwindrose.cpp index 62d74478..331d1c84 100644 --- a/src/plot/plwindrose.cpp +++ b/src/plot/plwindrose.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/radiochoice.cpp b/src/radiochoice.cpp index 2403f9fd..ac889a75 100644 --- a/src/radiochoice.cpp +++ b/src/radiochoice.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/registration.cpp b/src/registration.cpp index 5ce936f3..2e18a7b9 100644 --- a/src/registration.cpp +++ b/src/registration.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without @@ -289,7 +289,7 @@ END_EVENT_TABLE() wxOnlineRegistration::wxOnlineRegistration(wxWindow *parent) : wxDialog(parent, wxID_ANY, - gs_regData ? gs_regData->GetAppName() + " Registration" : "Software Registration", + gs_regData ? gs_regData->GetAppName() + wxString(" Registration") : wxString("Software Registration"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE) { wxFont font(wxMetroTheme::Font(wxMT_LIGHT, 12)); SetBackgroundColour(wxMetroTheme::Colour(wxMT_FOREGROUND)); @@ -424,7 +424,7 @@ void wxOnlineRegistration::OnRegister(wxCommandEvent &) { rapidjson::Document reader; if (m_register->GetLabel() == "Resend key") { - // https://developer.nrel.gov/api/sam/v1/tracker/resend_key?api_key=SAMAPIKEY&email=someusersemail@somedomain.com + // https://developer.nlr.gov/api/sam/v1/tracker/resend_key?api_key=SAMAPIKEY&email=someusersemail@somedomain.com wxString url, post; gs_regData->GetApi(wxOnlineRegistrationData::RESEND_KEY, &url, &post); curl.SetPostData(post); diff --git a/src/snaplay.cpp b/src/snaplay.cpp index 4fd3df80..e0dfccf5 100644 --- a/src/snaplay.cpp +++ b/src/snaplay.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/tpdlg.cpp b/src/tpdlg.cpp index a42e0361..4e7dd4fb 100644 --- a/src/tpdlg.cpp +++ b/src/tpdlg.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/uiform.cpp b/src/uiform.cpp index 5ee1150f..daf441b9 100644 --- a/src/uiform.cpp +++ b/src/uiform.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 51816fba..da07882a 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -19,6 +19,7 @@ set(DVIEW_SRC # CMake Targets # ##################################################################################################################### +set(CMAKE_CXX_STANDARD 20) # wexsandbox add_executable(wexsandbox ${WEX_SRC} ${wexsandbox_SRC}) @@ -90,6 +91,13 @@ else () target_link_libraries(wexsandbox optimized ${LK_LIB}) endif() endif () + +if (wxWidgets_FOUND) + include(${wxWidgets_USE_FILE}) +endif () +add_compile_options(${wxWidgets_CXX_FLAGS}) +add_definitions(-DLK_USE_WXWIDGETS ) + if (UNIX AND NOT APPLE) target_link_libraries(wexsandbox wex ${wxWidgets_LIBRARIES} ${FONTCONFIG_LIBRARY}) else () diff --git a/tools/cdev/cdev.cpp b/tools/cdev/cdev.cpp index 1d38267e..8970dcff 100644 --- a/tools/cdev/cdev.cpp +++ b/tools/cdev/cdev.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/tools/dview/dview.cpp b/tools/dview/dview.cpp index f4984db6..69c41760 100644 --- a/tools/dview/dview.cpp +++ b/tools/dview/dview.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/tools/lkscript/lkscript.cpp b/tools/lkscript/lkscript.cpp index 6e9ee1b3..7982a0b8 100644 --- a/tools/lkscript/lkscript.cpp +++ b/tools/lkscript/lkscript.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/tools/sandbox/sandbox.cpp b/tools/sandbox/sandbox.cpp index 152d0c75..3e71e01c 100644 --- a/tools/sandbox/sandbox.cpp +++ b/tools/sandbox/sandbox.cpp @@ -1,7 +1,7 @@ /* BSD 3-Clause License -Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/wex/blob/develop/LICENSE +Copyright (c) Alliance for Energy Innovation, LLC. See also https://github.com/NatLabRockies/wex/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without