diff options
author | joye <joye> | 2014-05-27 18:35:27 (GMT) |
---|---|---|
committer | joye <joye> | 2014-05-27 18:35:27 (GMT) |
commit | f422626ec026ba304de53f22c4966da0b47acea7 (patch) | |
tree | 8b0857a8beeb05bf87e0e0fddca90e442557e5aa | |
parent | 627698108e3835c367d295f4b5cad40a1f06c657 (diff) | |
download | blt-f422626ec026ba304de53f22c4966da0b47acea7.zip blt-f422626ec026ba304de53f22c4966da0b47acea7.tar.gz blt-f422626ec026ba304de53f22c4966da0b47acea7.tar.bz2 |
*** empty log message ***
-rwxr-xr-x | configure | 4 | ||||
-rwxr-xr-x | configure.in | 4 | ||||
-rw-r--r-- | src/bltGrAxis.h | 1 | ||||
-rw-r--r-- | src/bltGrAxisOp.C | 2 | ||||
-rw-r--r-- | src/bltGrBind.C | 50 | ||||
-rw-r--r-- | src/bltGrElemOp.C | 2 | ||||
-rw-r--r-- | src/bltGrLegd.C | 2 | ||||
-rw-r--r-- | src/bltGrLegdOp.C | 2 | ||||
-rw-r--r-- | src/bltGrMarker.C | 1 | ||||
-rw-r--r-- | src/bltGrMarkerOp.C | 2 | ||||
-rw-r--r-- | src/bltGraph.C | 1 | ||||
-rw-r--r-- | src/bltGraph.h | 2 |
12 files changed, 43 insertions, 30 deletions
@@ -5526,13 +5526,12 @@ done #----------------------------------------------------------------------- vars=" - bltBind.C bltChain.C bltConfig.C bltGrAxis.C bltGrAxisOp.C bltGrAxisOption.C - bltGrXAxisOp.C + bltGrBind.C bltGrElemOp.C bltGrElemOption.C bltGrElem.C @@ -5558,6 +5557,7 @@ done bltGrPenBar.C bltGrPenLine.C bltGrText.C + bltGrXAxisOp.C bltGraph.C bltGraphBar.C bltGraphLine.C diff --git a/configure.in b/configure.in index 0934cf9..25df213 100755 --- a/configure.in +++ b/configure.in @@ -71,13 +71,12 @@ TEA_SETUP_COMPILER # and PKG_TCL_SOURCES. #----------------------------------------------------------------------- TEA_ADD_SOURCES([ - bltBind.C bltChain.C bltConfig.C bltGrAxis.C bltGrAxisOp.C bltGrAxisOption.C - bltGrXAxisOp.C + bltGrBind.C bltGrElemOp.C bltGrElemOption.C bltGrElem.C @@ -103,6 +102,7 @@ TEA_ADD_SOURCES([ bltGrPenBar.C bltGrPenLine.C bltGrText.C + bltGrXAxisOp.C bltGraph.C bltGraphBar.C bltGraphLine.C diff --git a/src/bltGrAxis.h b/src/bltGrAxis.h index 02276ae..7b2cca0 100644 --- a/src/bltGrAxis.h +++ b/src/bltGrAxis.h @@ -42,7 +42,6 @@ extern "C" { class Graph; class PageSetup; -#include "bltBind.h" #include "bltGrMisc.h" #include "bltGrText.h" #include "bltPs.h" diff --git a/src/bltGrAxisOp.C b/src/bltGrAxisOp.C index 0006ae1..374aaff 100644 --- a/src/bltGrAxisOp.C +++ b/src/bltGrAxisOp.C @@ -30,7 +30,7 @@ #include <math.h> #include <string.h> -#include "bltBind.h" +#include "bltGrBind.h" #include "bltGraph.h" #include "bltGrAxis.h" #include "bltGrAxisOp.h" diff --git a/src/bltGrBind.C b/src/bltGrBind.C index 2a1a463..c0fbe76 100644 --- a/src/bltGrBind.C +++ b/src/bltGrBind.C @@ -34,7 +34,7 @@ #include <iomanip> using namespace std; -#include "bltBind.h" +#include "bltGrBind.h" static Tk_EventProc BindProc; typedef struct _Blt_BindTable BindTable; @@ -42,10 +42,8 @@ typedef struct _Blt_BindTable BindTable; #define REPICK_IN_PROGRESS (1<<0) #define LEFT_GRABBED_ITEM (1<<1) -static int buttonMasks[] = {0, Button1Mask, Button2Mask, Button3Mask, Button4Mask, Button5Mask}; - -static void DoEvent(BindTable* bindPtr, XEvent* eventPtr, - ClientData item, ClientData context) +static void BltDoEvent(BindTable* bindPtr, XEvent* eventPtr, + ClientData item, ClientData context) { if (!bindPtr->tkwin || !bindPtr->bindingTable) return; @@ -150,7 +148,7 @@ static void PickCurrentItem(BindTable *bindPtr, XEvent *eventPtr) event.xcrossing.detail = NotifyAncestor; bindPtr->flags |= REPICK_IN_PROGRESS; - DoEvent(bindPtr, &event, bindPtr->currentItem, bindPtr->currentContext); + BltDoEvent(bindPtr, &event, bindPtr->currentItem, bindPtr->currentContext); bindPtr->flags &= ~REPICK_IN_PROGRESS; // Note: during DoEvent above, it's possible that bindPtr->newItem got @@ -173,7 +171,7 @@ static void PickCurrentItem(BindTable *bindPtr, XEvent *eventPtr) event.type = LeaveNotify; event.xcrossing.detail = NotifyVirtual; // Ancestor bindPtr->currentItem = bindPtr->newItem; - DoEvent(bindPtr, &event, bindPtr->newItem, bindPtr->newContext); + BltDoEvent(bindPtr, &event, bindPtr->newItem, bindPtr->newContext); } bindPtr->newItem = newItem; @@ -182,7 +180,7 @@ static void PickCurrentItem(BindTable *bindPtr, XEvent *eventPtr) event.type = EnterNotify; event.xcrossing.detail = NotifyVirtual; // Ancestor bindPtr->currentItem = newItem; - DoEvent(bindPtr, &event, newItem, newContext); + BltDoEvent(bindPtr, &event, newItem, newContext); } bindPtr->currentItem = savedItem; @@ -201,7 +199,7 @@ static void PickCurrentItem(BindTable *bindPtr, XEvent *eventPtr) event = bindPtr->pickEvent; event.type = EnterNotify; event.xcrossing.detail = NotifyAncestor; - DoEvent(bindPtr, &event, newItem, newContext); + BltDoEvent(bindPtr, &event, newItem, newContext); } done: @@ -224,9 +222,24 @@ static void BindProc(ClientData clientData, XEvent *eventPtr) case ButtonRelease: { int mask = 0; - if ((eventPtr->xbutton.button >= Button1) && - (eventPtr->xbutton.button <= Button5)) { - mask = buttonMasks[eventPtr->xbutton.button]; + switch (eventPtr->xbutton.button) { + case Button1: + mask = Button1Mask; + break; + case Button2: + mask = Button2Mask; + break; + case Button3: + mask = Button3Mask; + break; + case Button4: + mask = Button4Mask; + break; + case Button5: + mask = Button5Mask; + break; + default: + break; } // For button press events, repick the current item using the button @@ -242,7 +255,8 @@ static void BindProc(ClientData clientData, XEvent *eventPtr) bindPtr->state = eventPtr->xbutton.state; PickCurrentItem(bindPtr, eventPtr); bindPtr->state ^= mask; - DoEvent(bindPtr, eventPtr,bindPtr->currentItem,bindPtr->currentContext); + BltDoEvent(bindPtr, eventPtr, bindPtr->currentItem, + bindPtr->currentContext); } else { @@ -250,8 +264,8 @@ static void BindProc(ClientData clientData, XEvent *eventPtr) // considered to be down. Then repick the current item under the // assumption that the button is no longer down. bindPtr->state = eventPtr->xbutton.state; - DoEvent(bindPtr, eventPtr, bindPtr->currentItem, - bindPtr->currentContext); + BltDoEvent(bindPtr, eventPtr, bindPtr->currentItem, + bindPtr->currentContext); eventPtr->xbutton.state ^= mask; bindPtr->state = eventPtr->xbutton.state; PickCurrentItem(bindPtr, eventPtr); @@ -269,14 +283,16 @@ static void BindProc(ClientData clientData, XEvent *eventPtr) case MotionNotify: bindPtr->state = eventPtr->xmotion.state; PickCurrentItem(bindPtr, eventPtr); - DoEvent(bindPtr, eventPtr, bindPtr->currentItem, bindPtr->currentContext); + BltDoEvent(bindPtr, eventPtr, bindPtr->currentItem, + bindPtr->currentContext); break; case KeyPress: case KeyRelease: bindPtr->state = eventPtr->xkey.state; PickCurrentItem(bindPtr, eventPtr); - DoEvent(bindPtr, eventPtr, bindPtr->currentItem, bindPtr->currentContext); + BltDoEvent(bindPtr, eventPtr, bindPtr->currentItem, + bindPtr->currentContext); break; } diff --git a/src/bltGrElemOp.C b/src/bltGrElemOp.C index a5d2344..491ece6 100644 --- a/src/bltGrElemOp.C +++ b/src/bltGrElemOp.C @@ -27,7 +27,7 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "bltBind.h" +#include "bltGrBind.h" #include "bltGraph.h" #include "bltGrAxis.h" #include "bltGrElem.h" diff --git a/src/bltGrLegd.C b/src/bltGrLegd.C index 659b9df..0169f94 100644 --- a/src/bltGrLegd.C +++ b/src/bltGrLegd.C @@ -32,7 +32,7 @@ #include <tkInt.h> #endif -#include "bltBind.h" +#include "bltGrBind.h" #include "bltGraph.h" #include "bltGrLegd.h" #include "bltGrElem.h" diff --git a/src/bltGrLegdOp.C b/src/bltGrLegdOp.C index d167c0b..669aef1 100644 --- a/src/bltGrLegdOp.C +++ b/src/bltGrLegdOp.C @@ -32,7 +32,7 @@ #include <tkInt.h> #endif -#include "bltBind.h" +#include "bltGrBind.h" #include "bltGraph.h" #include "bltGrLegd.h" #include "bltGrLegdOp.h" diff --git a/src/bltGrMarker.C b/src/bltGrMarker.C index ccf5ec1..012419f 100644 --- a/src/bltGrMarker.C +++ b/src/bltGrMarker.C @@ -31,7 +31,6 @@ #include <math.h> #include <float.h> -#include "bltBind.h" #include "bltGraph.h" #include "bltGrMarker.h" #include "bltGrAxis.h" diff --git a/src/bltGrMarkerOp.C b/src/bltGrMarkerOp.C index 2b0684a..a59569b 100644 --- a/src/bltGrMarkerOp.C +++ b/src/bltGrMarkerOp.C @@ -29,7 +29,7 @@ #include <string.h> -#include "bltBind.h" +#include "bltGrBind.h" #include "bltGraph.h" #include "bltGrElem.h" #include "bltGrMarkerOp.h" diff --git a/src/bltGraph.C b/src/bltGraph.C index 30c8d05..c14165e 100644 --- a/src/bltGraph.C +++ b/src/bltGraph.C @@ -29,7 +29,6 @@ #include <float.h> -#include "bltBind.h" #include "bltGraph.h" #include "bltGraphOp.h" diff --git a/src/bltGraph.h b/src/bltGraph.h index 247f9b2..6f2eb24 100644 --- a/src/bltGraph.h +++ b/src/bltGraph.h @@ -36,7 +36,7 @@ extern "C" { #include "bltChain.h" }; -#include "bltBind.h" +#include "bltGrBind.h" #include "bltGrMisc.h" #include "bltGrText.h" |