1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
5
* Copyright 2007 Novell, Inc. (http://www.novell.com)
7
* See the LICENSE file included with the distribution for details.
11
#ifndef __MOON_TRIGGER_H__
12
#define __MOON_TRIGGER_H__
16
#include "dependencyobject.h"
19
class TriggerAction : public DependencyObject {
21
/* @GenerateCBinding,GeneratePInvoke */
24
virtual Type::Kind GetObjectType () { return Type::TRIGGERACTION; }
26
/* @GenerateCBinding */
27
virtual void Fire () {}
30
virtual ~TriggerAction () {}
34
/* @ContentProperty="Actions" */
35
/* @Namespace=System.Windows */
36
class EventTrigger : public DependencyObject {
37
int registered_event_id;
39
static void event_trigger_fire_actions (EventObject *sender, EventArgs *calldata, gpointer closure);
42
virtual ~EventTrigger ();
45
/* @PropertyType=TriggerActionCollection,ManagedFieldAccess=Internal,ManagedSetterAccess=Internal,GenerateAccessors */
46
static DependencyProperty *ActionsProperty;
47
/* @PropertyType=string,ManagedPropertyType=RoutedEvent,ManagedFieldAccess=Internal,GenerateAccessors */
48
static DependencyProperty *RoutedEventProperty;
50
/* @GenerateCBinding,GeneratePInvoke */
53
virtual Type::Kind GetObjectType () { return Type::EVENTTRIGGER; }
55
void SetTarget (DependencyObject *target);
56
void RemoveTarget (DependencyObject *target);
61
void SetActions (TriggerActionCollection *value);
62
TriggerActionCollection *GetActions ();
64
void SetRoutedEvent (const char *event);
65
const char *GetRoutedEvent ();
69
void event_trigger_action_add (EventTrigger *trigger, TriggerAction *action);
72
#endif /* __MOON_TRIGGER_H__ */