Skip to content

Commit 7842074

Browse files
author
Fraser J. Gordon
committed
[[ Better themes ]] Add property getter hooks for themed properties
1 parent 355bd66 commit 7842074

34 files changed

+80
-55
lines changed

engine/src/aclip.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ void MCAudioClip::timer(MCNameRef mptr, MCParameter *params)
178178
}
179179
}
180180

181-
Exec_stat MCAudioClip::getprop(uint4 parid, Properties which, MCExecPoint &ep, Boolean effective)
181+
Exec_stat MCAudioClip::getprop(uint4 parid, Properties which, MCExecPoint &ep, Boolean effective, bool recursive)
182182
{
183183
switch (which)
184184
{
@@ -198,7 +198,7 @@ Exec_stat MCAudioClip::getprop(uint4 parid, Properties which, MCExecPoint &ep, B
198198
break;
199199
#endif /* MCAudioClip::getprop */
200200
default:
201-
return MCObject::getprop(parid, which, ep, effective);
201+
return MCObject::getprop(parid, which, ep, effective, recursive);
202202
}
203203
return ES_NORMAL;
204204
}

engine/src/aclip.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class MCAudioClip : public MCObject
7373
virtual Chunk_term gettype() const;
7474
virtual const char *gettypestring();
7575
virtual void timer(MCNameRef mptr, MCParameter *params);
76-
virtual Exec_stat getprop(uint4 parid, Properties which, MCExecPoint &, Boolean effective);
76+
virtual Exec_stat getprop(uint4 parid, Properties which, MCExecPoint &, Boolean effective, bool recursive = false);
7777
virtual Exec_stat setprop(uint4 parid, Properties which, MCExecPoint &, Boolean effective);
7878

7979
virtual Boolean del();

engine/src/button.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,7 @@ void MCButton::setrect(const MCRectangle &nrect)
16561656
}
16571657
}
16581658

1659-
Exec_stat MCButton::getprop(uint4 parid, Properties which, MCExecPoint& ep, Boolean effective)
1659+
Exec_stat MCButton::getprop(uint4 parid, Properties which, MCExecPoint& ep, Boolean effective, bool recursive)
16601660
{
16611661
uint2 fheight;
16621662
uint2 j = 0;
@@ -1934,7 +1934,7 @@ Exec_stat MCButton::getprop(uint4 parid, Properties which, MCExecPoint& ep, Bool
19341934
break;
19351935
#endif /* MCButton::getprop */
19361936
default:
1937-
return MCControl::getprop(parid, which, ep, effective);
1937+
return MCControl::getprop(parid, which, ep, effective, recursive);
19381938
}
19391939
return ES_NORMAL;
19401940
}

engine/src/button.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class MCButton : public MCControl
177177

178178
virtual uint2 gettransient() const;
179179
virtual void setrect(const MCRectangle &nrect);
180-
virtual Exec_stat getprop(uint4 parid, Properties which, MCExecPoint &, Boolean effective);
180+
virtual Exec_stat getprop(uint4 parid, Properties which, MCExecPoint &, Boolean effective, bool recursive = false);
181181
virtual Exec_stat setprop(uint4 parid, Properties which, MCExecPoint &, Boolean effective);
182182
virtual void closemenu(Boolean kfocus, Boolean disarm);
183183

engine/src/card.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ void MCCard::timer(MCNameRef mptr, MCParameter *params)
924924
MCObject::timer(mptr, params);
925925
}
926926

927-
Exec_stat MCCard::getprop(uint4 parid, Properties which, MCExecPoint& ep, Boolean effective)
927+
Exec_stat MCCard::getprop(uint4 parid, Properties which, MCExecPoint& ep, Boolean effective, bool recursive)
928928
{
929929
MCRectangle minrect;
930930
uint2 num;
@@ -1065,7 +1065,7 @@ Exec_stat MCCard::getprop(uint4 parid, Properties which, MCExecPoint& ep, Boolea
10651065
return ES_ERROR;
10661066
#endif /* MCCard::getprop */
10671067
default:
1068-
return MCObject::getprop(parid, which, ep, effective);
1068+
return MCObject::getprop(parid, which, ep, effective, recursive);
10691069
}
10701070
return ES_NORMAL;
10711071
}

engine/src/card.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class MCCard : public MCObject
7171
virtual Boolean doubledown(uint2 which);
7272
virtual Boolean doubleup(uint2 which);
7373
virtual void timer(MCNameRef mptr, MCParameter *params);
74-
virtual Exec_stat getprop(uint4 parid, Properties which, MCExecPoint &, Boolean effective);
74+
virtual Exec_stat getprop(uint4 parid, Properties which, MCExecPoint &, Boolean effective, bool recursive = false);
7575
virtual Exec_stat setprop(uint4 parid, Properties which, MCExecPoint &, Boolean effective);
7676

7777
virtual Boolean del();

engine/src/control.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ uint2 MCControl::gettransient() const
385385
return 0;
386386
}
387387

388-
Exec_stat MCControl::getprop(uint4 parid, Properties which, MCExecPoint& ep, Boolean effective)
388+
Exec_stat MCControl::getprop(uint4 parid, Properties which, MCExecPoint& ep, Boolean effective, bool recursive)
389389
{
390390
switch (which)
391391
{
@@ -453,7 +453,7 @@ Exec_stat MCControl::getprop(uint4 parid, Properties which, MCExecPoint& ep, Boo
453453
break;
454454
#endif /* MCControl::getprop */
455455
default:
456-
return MCObject::getprop(parid, which, ep, effective);
456+
return MCObject::getprop(parid, which, ep, effective, recursive);
457457
}
458458
return ES_NORMAL;
459459
}

engine/src/control.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class MCControl : public MCObject
107107
virtual uint2 gettransient() const;
108108

109109
// MW-2011-11-23: [[ Array Chunk Props ]] Add 'effective' param to arrayprop access.
110-
virtual Exec_stat getprop(uint4 parid, Properties which, MCExecPoint &, Boolean effective);
110+
virtual Exec_stat getprop(uint4 parid, Properties which, MCExecPoint &, Boolean effective, bool recursive = false);
111111
virtual Exec_stat getarrayprop(uint4 parid, Properties which, MCExecPoint &, MCNameRef key, Boolean effective);
112112
virtual Exec_stat setprop(uint4 parid, Properties which, MCExecPoint &, Boolean effective);
113113
virtual Exec_stat setarrayprop(uint4 parid, Properties which, MCExecPoint&, MCNameRef key, Boolean effective);

engine/src/cpalette.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Boolean MCColors::mup(uint2 which, bool p_release)
174174
return True;
175175
}
176176

177-
Exec_stat MCColors::getprop(uint4 parid, Properties which, MCExecPoint& ep, Boolean effective)
177+
Exec_stat MCColors::getprop(uint4 parid, Properties which, MCExecPoint& ep, Boolean effective, bool recursive)
178178
{
179179
switch (which)
180180
{
@@ -187,7 +187,7 @@ Exec_stat MCColors::getprop(uint4 parid, Properties which, MCExecPoint& ep, Bool
187187
break;
188188
#endif /* MCColors::getprop */
189189
default:
190-
return MCControl::getprop(parid, which, ep, effective);
190+
return MCControl::getprop(parid, which, ep, effective, recursive);
191191
}
192192
return ES_NORMAL;
193193
}

engine/src/cpalette.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class MCColors : public MCControl
3535
virtual Boolean mfocus(int2 x, int2 y);
3636
virtual Boolean mdown(uint2 which);
3737
virtual Boolean mup(uint2 which, bool p_release);
38-
virtual Exec_stat getprop(uint4 parid, Properties which, MCExecPoint &, Boolean effective);
38+
virtual Exec_stat getprop(uint4 parid, Properties which, MCExecPoint &, Boolean effective, bool recursive = false);
3939
virtual Exec_stat setprop(uint4 parid, Properties which, MCExecPoint &, Boolean effective);
4040
virtual Boolean count(Chunk_term type, MCObject *stop, uint2 &num);
4141
// virtual functions from MCControl

0 commit comments

Comments
 (0)