Skip to content

Commit

Permalink
Merge pull request #11 from chrschroeder/upstream
Browse files Browse the repository at this point in the history
New upstream version 1.12.105B
  • Loading branch information
aderbenev authored May 16, 2019
2 parents dee1065 + 8f6ecf9 commit a22c12d
Show file tree
Hide file tree
Showing 79 changed files with 25,583 additions and 746 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ifdef EPICS_HOST_ARCH
DIRS += lib
DIRS += epicsPv
DIRS += logPv
DIRS += proxyPv
DIRS += calcPv
DIRS += locPv
DIRS += baselib
Expand Down
1 change: 1 addition & 0 deletions archivePlot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ else
include $(EPICS)/config/RULES_ARCHS
endif

USR_CXXFLAGS += -std=c++0x -fpermissive -Wno-narrowing -Wno-write-strings -Wno-unused-but-set-variable
3 changes: 3 additions & 0 deletions baselib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ ifdef EPICS_HOST_ARCH

SHARED_LIBRARIES = YES

USR_CXXFLAGS += -std=c++0x -fpermissive -Wno-narrowing -Wno-write-strings -Wno-unused-but-set-variable

USR_CXXFLAGS_Linux += -DSINGLE_THREADED=1 -D__epics__=1

USR_CXXFLAGS_Darwin += -DSINGLE_THREADED=1 -D__epics__=1 -Wno-long-long
Expand Down Expand Up @@ -78,6 +80,7 @@ ifdef EPICS_HOST_ARCH
LIB_SRCS += radio_button.cc
LIB_SRCS += xygraph.cc
LIB_SRCS += pip.cc
LIB_SRCS += include_widget.cc
LIB_SRCS += pv_inspector.cc
LIB_SRCS += table.cc
LIB_SRCS += coefTable.cc
Expand Down
29 changes: 23 additions & 6 deletions baselib/bar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1320,6 +1320,8 @@ int clipStat = 0;

if ( !enabled || !activeMode || !init ) return 1;

actWin->executeGc.saveFg();

actWin->executeGc.setFG( bgColor.getColor() );

if ( bufInvalid ) {
Expand All @@ -1340,15 +1342,23 @@ int clipStat = 0;
}
else {

clipStat = actWin->drawGc.addNormXClipRectangle( xR );
clipStat = actWin->executeGc.addNormXClipRectangle( xR );

actWin->executeGc.setLineWidth( 1 );
actWin->executeGc.setLineStyle( LineSolid );

XDrawRectangle( actWin->d, drawable(actWin->executeWidget),
actWin->executeGc.normGC(), oldBarX, barY, oldBarW, barH );

XFillRectangle( actWin->d, drawable(actWin->executeWidget),
actWin->executeGc.normGC(), oldBarX, barY, oldBarW, barH );

if ( clipStat & 1 ) actWin->drawGc.removeNormXClipRectangle();
if ( clipStat & 1 ) actWin->executeGc.removeNormXClipRectangle();

}

actWin->executeGc.restoreFg();

return 1;

}
Expand Down Expand Up @@ -1484,15 +1494,15 @@ int clipStat = 0;

if ( !init ) {
if ( needToDrawUnconnected ) {
clipStat = actWin->drawGc.addNormXClipRectangle( xR );
clipStat = actWin->executeGc.addNormXClipRectangle( xR );
actWin->executeGc.saveFg();
actWin->executeGc.setFG( bgColor.getDisconnected() );
actWin->executeGc.setLineWidth( 1 );
actWin->executeGc.setLineStyle( LineSolid );
XDrawRectangle( actWin->d, drawable(actWin->executeWidget),
actWin->executeGc.normGC(), x, y, w, h );
actWin->executeGc.restoreFg();
if ( clipStat & 1 ) actWin->drawGc.removeNormXClipRectangle();
if ( clipStat & 1 ) actWin->executeGc.removeNormXClipRectangle();
needToEraseUnconnected = 1;
}
}
Expand All @@ -1508,7 +1518,11 @@ int clipStat = 0;

if ( !enabled || !activeMode || !init ) return 1;

clipStat = actWin->drawGc.addNormXClipRectangle( xR );
//printf( "x=%-d, y=%-d, w=%-d, h=%-d\n", x, y, w, h );
//printf( "oldBarX=%-d, oldBarY=%-d, oldBarW=%-d, oldBarH=%-d\n", oldBarX, oldBarY, oldBarW, oldBarH );
//printf( "barX=%-d, barY=%-d, barW=%-d, barH=%-d\n", barX, barY, barW, barH );

clipStat = actWin->executeGc.addNormXClipRectangle( xR );

actWin->executeGc.saveFg();

Expand All @@ -1531,6 +1545,8 @@ int clipStat = 0;

XFillRectangle( actWin->d, drawable(actWin->executeWidget),
actWin->executeGc.normGC(), barX, barY, barW, barH );
XDrawRectangle( actWin->d, drawable(actWin->executeWidget),
actWin->executeGc.normGC(), barX, barY, barW, barH );

if ( horizontal ) {

Expand Down Expand Up @@ -1559,7 +1575,7 @@ int clipStat = 0;

}

if ( clipStat & 1 ) actWin->drawGc.removeNormXClipRectangle();
if ( clipStat & 1 ) actWin->executeGc.removeNormXClipRectangle();

if ( bufInvalid ) { // draw scale, label, etc ...

Expand Down Expand Up @@ -1605,6 +1621,7 @@ int clipStat = 0;
}

if ( border ) {
actWin->executeGc.setFG( fgColor.getColor() );
actWin->executeGc.setLineWidth( 1 );
actWin->executeGc.setLineStyle( LineSolid );
XDrawRectangle( actWin->d, drawable(actWin->executeWidget),
Expand Down
2 changes: 1 addition & 1 deletion baselib/bar.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#define BARC_MAJOR_VERSION 4
#define BARC_MINOR_VERSION 1
#define BARC_RELEASE 1
#define BARC_RELEASE 2

#define BARC_K_PV_NAME 0
#define BARC_K_LITERAL 1
Expand Down
14 changes: 14 additions & 0 deletions baselib/button.cc
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ activeButtonClass::activeButtonClass ( void ) {
strcpy( maxVisString, "" );
connection.setMaxPvs( 4 );
activeMode = 0;
buttonIsDown = 0;

controlIsBit = readIsBit = 0;
prevControlBit = prevReadBit = 0;
Expand Down Expand Up @@ -578,6 +579,7 @@ activeGraphicClass *bto = (activeGraphicClass *) this;
strncpy( minVisString, source->minVisString, 39 );
strncpy( maxVisString, source->maxVisString, 39 );
activeMode = 0;
buttonIsDown = 0;

prevControlBit = prevReadBit = 0;
initControlBit = initReadBit = 0;
Expand Down Expand Up @@ -2436,6 +2438,8 @@ unsigned int uival;

if ( !controlPvId->have_write_access() ) return;

buttonIsDown = 0;

if ( toggle ) return;

value = 0;
Expand Down Expand Up @@ -2484,6 +2488,8 @@ unsigned int uival;

if ( buttonNumber != 1 ) return;

buttonIsDown = 1;

if ( controlExists && controlIsBit ) {

curControlBit = ( ( controlV & ( 1 << controlBitPos ) ) > 0 );
Expand Down Expand Up @@ -3037,6 +3043,10 @@ int activeButtonClass::setProperty (

char *activeButtonClass::firstDragName ( void ) {

// If the button is down and we use the middle-click to drag the PV name, the toggle does not seem to reset.
// Ignore the drag event in case the button is down
if(buttonIsDown) return NULL;

if ( !enabled ) return NULL;

dragIndex = 0;
Expand All @@ -3046,6 +3056,10 @@ char *activeButtonClass::firstDragName ( void ) {

char *activeButtonClass::nextDragName ( void ) {

// If the button is down and we use the middle-click to drag the PV name, the toggle does not seem to reset.
// Ignore the drag event in case the button is down
if(buttonIsDown) return NULL;

if ( !enabled ) return NULL;

if ( dragIndex < (int) ( sizeof(dragName) / sizeof(char *) ) - 1 ) {
Expand Down
1 change: 1 addition & 0 deletions baselib/button.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ int controlBitPos, readBitPos; // 0-31
int prevControlBit, prevReadBit;
int controlBit, readBit;
int initControlBit, initReadBit;
int buttonIsDown; // boolean that indicates if we have received the buttonDown event and not yet received the corresponding buttonUp event.

public:

Expand Down
Loading

0 comments on commit a22c12d

Please sign in to comment.