Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add egs_view egsinp editor with autocompletion #885

Open
wants to merge 32 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3c4b021
Add a text editor to egs_view
rtownson Aug 3, 2019
b078a07
Non-working temporary commit
rtownson Dec 13, 2019
94ef2bd
Add a text editor to egs_view
rtownson Aug 3, 2019
b026cbf
Non-working temporary commit
rtownson Dec 13, 2019
a9dfcc3
Add editor autocomplete and input checking
rtownson Feb 4, 2020
426dadf
Improve egs_view editor input checking
rtownson Feb 22, 2020
20d2a2e
Add egs_view editor input dependency checking
rtownson Mar 13, 2020
7dd58d2
Start adding egs_view editor definition blocks
rtownson Mar 13, 2020
115d583
Add egs_view editor source and shape support
rtownson Mar 31, 2020
6357129
Add egs_editor input example menu bar
rtownson Apr 3, 2020
8e6da9a
Temp
rtownson May 13, 2020
aac039e
Add egs_editor support for transformations
rtownson Jul 7, 2020
23ff823
Start adding egs_editor run control support
rtownson Jul 20, 2020
797b6f4
Finish adding run control inputs to egs_editor
rtownson Jul 23, 2020
0213a4e
Improve egs_editor undo history
rtownson Jul 30, 2020
7e30d5a
Add Geometry Input Validation
Feb 2, 2021
1be4948
Add sources, ausgab, other egs_view editor support
hcgallop Feb 10, 2021
b651660
Add support for shapes in egs_view editor
hcgallop Feb 15, 2021
8137b50
Add keystroke seletion to egs_editor
hcgallop Feb 26, 2021
0c1b4d9
Add support for applications in egs_view editor
hcgallop Apr 26, 2021
2e6d1fc
Add support for red line comments
hcgallop Apr 30, 2021
d7e2e74
Fix the recent egs_view ui changes
May 19, 2021
99f9606
Fix the egs_view dso link to be a relative path
rtownson May 20, 2021
1034f44
Add iaea_phsp_source editor inputs
rtownson Apr 6, 2022
9b43606
Remove old egs_view debug messages
rtownson Apr 7, 2022
63747c1
Improve egs_editor support for shapes
rtownson May 2, 2022
bc104aa
Run astyle to fix formatting
rtownson May 10, 2022
9af4800
Fix a few typos in the egs_editor additions
rtownson Jun 28, 2022
7494d3c
Update egs_input_struct documentation
rtownson Jul 4, 2022
4121af2
Tidy up egs_view debug output
rtownson Jul 5, 2022
dbe2985
Fix egs_view image scaling when reloading or saving
rtownson Nov 9, 2023
1546410
Add the library auto complete for ausgab objects
rtownson Nov 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions HEN_HOUSE/egs++/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ egspp_files = egs_input egs_base_geometry egs_library egs_transformations \
egs_base_source egs_functions egs_application egs_run_control \
egs_scoring egs_interpolator egs_atomic_relaxations \
egs_ausgab_object egs_particle_track egs_fortran_geometry \
egs_ensdf
egs_ensdf egs_input_struct

egspp_objects = $(addprefix $(DSO1), $(addsuffix .$(obje), $(egspp_files)))
config1h = $(IEGS1)$(DSEP)egs_config1.h egs_libconfig.h egs_functions.h
Expand Down Expand Up @@ -74,6 +74,7 @@ lib_objects = $(addprefix $(DSO1), $(addsuffix .$(obje), $(all_libs)))

#******************************************************************************

#all: $(EGS_BINDIR)egspp$(EXE) $(ABS_DSO)$(libpre)egspp$(libext) $(ABS_DSO)$(libpre)egs_input_struct$(libext) glibs slibs shapes aobjects gtest
all: $(EGS_BINDIR)egspp$(EXE) $(ABS_DSO)$(libpre)egspp$(libext) glibs slibs shapes aobjects gtest

$(EGS_BINDIR)egspp$(EXE): $(dso) $(DSO1)egspp.$(obje) $(ABS_DSO)$(libpre)egspp$(libext)
Expand All @@ -86,6 +87,9 @@ $(DSO1)egspp.$(obje): egspp.cpp egs_application.h egs_base_geometry.h egs_vector
egs_math.h egs_library.h $(config1h)
$(CXX) $(INC1) $(DEF1) $(opt) -c $(COUT)$@ $(notdir $(basename $@)).cpp

#$(ABS_DSO)$(libpre)egs_input_struct$(libext): $(dso) $(DSO1)egs_input_struct.$(obje) $(egspp_objects)
# $(CXX) $(INC1) $(DEFS) $(opt) $(shared) $(DSO1)egs_input_struct.$(obje) $(egspp_objects) $(extra)

$(DSO1)egs_interpolator.$(obje): egs_interpolator.cpp egs_interpolator.h \
$(config1h)

Expand Down Expand Up @@ -130,7 +134,10 @@ $(DSO1)egs_base_source.$(obje): egs_base_source.cpp egs_base_source.h \
egs_vector.h $(config1h) egs_object_factory.h egs_input.h

$(DSO1)egs_ensdf.$(obje): egs_ensdf.cpp egs_ensdf.h \
$(config1h) egs_functions.h egs_math.h egs_alias_table.h egs_atomic_relaxations.h
$(config1h) egs_math.h egs_alias_table.h egs_atomic_relaxations.h

$(DSO1)egs_input_struct.$(obje): egs_input_struct.cpp egs_input_struct.h \
$(config1h)

$(DSO1)egs_geometry_tester.$(obje): egs_geometry_tester.cpp \
egs_geometry_tester.h egs_input.h egs_vector.h egs_base_geometry.h \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
# Reid Townson
# Hubert Ho
# Blake Walters
# Hannah Gallop
#
###############################################################################
#
Expand Down Expand Up @@ -96,6 +97,8 @@
#include "egs_input.h"
#include "egs_functions.h"

static bool EGS_DOSE_SCORING_LOCAL inputSet = false;

EGS_DoseScoring::EGS_DoseScoring(const string &Name,
EGS_ObjectFactory *f) :
EGS_AusgabObject(Name,f), dose(0), doseM(0), doseF(0),
Expand Down Expand Up @@ -589,6 +592,39 @@ void EGS_DoseScoring::resetCounter() {
//**********************************************************************
extern "C" {

static void setInputs() {
inputSet = true;

setBaseAusgabObjectInputs();

ausBlockInput->getSingleInput("library")->setValues({"EGS_Dose_Scoring"});

// Format: name, isRequired, description, vector string of allowed values
ausBlockInput->addSingleInput("medium dose", false, "Requests the dose deposited in each medium to be scored, default is no", {"yes", "no"});
ausBlockInput->addSingleInput("region dose", false, "Requests the dose deposited in each region to be scored, default is yes", {"yes", "no"});
ausBlockInput->addSingleInput("volume", false, "Either a unique volume, which will be the same for all regions or a list of individual volumes for each region, default is 1g/cm3");
auto dosePtr = ausBlockInput->addSingleInput("dose regions", false, "A list of individual regions");
auto startPtr = ausBlockInput->addSingleInput("dose start region", false, "A list of starts for regions");
auto stopPtr = ausBlockInput->addSingleInput("dose stop region", false, "A list of stops for regions");

dosePtr->addDependency(startPtr, "", true);
dosePtr->addDependency(stopPtr, "", true);
startPtr->addDependency(dosePtr, "", true);
stopPtr->addDependency(dosePtr, "", true);

// This can only be used if one of the geometries is an EGS_XYZGeometry
auto blockPtr = ausBlockInput->addBlockInput("output dose file");
blockPtr->addSingleInput("geometry name", true, "The name of a predefined EGS_XYZGeometry");
blockPtr->addSingleInput("file type", true, "The type of file", {"3ddose"});
}

EGS_DOSE_SCORING_EXPORT shared_ptr<EGS_BlockInput> getInputs() {
if (!inputSet) {
setInputs();
}
return ausBlockInput;
}

EGS_DOSE_SCORING_EXPORT EGS_AusgabObject *createAusgabObject(EGS_Input *input,
EGS_ObjectFactory *f) {
const static char *func = "createAusgabObject(dose_scoring)";
Expand Down
Loading