ARB
Classes | Macros | Typedefs | Functions | Variables
item_shader.cxx File Reference
#include "item_shader.h"
#include <arbdb.h>
#include "field_shader.h"
#include <awt_config_manager.hxx>
#include <aw_root.hxx>
#include <aw_window.hxx>
#include <aw_awar.hxx>
#include <aw_preset.hxx>
#include <aw_select.hxx>
#include <aw_msg.hxx>
#include <vector>
#include <string>
#include <algorithm>
Include dependency graph for item_shader.cxx:

Go to the source code of this file.

Classes

class  FINAL_TYPE< SEQTYPE >
 xml element More...
 
struct  has_id
 

Macros

#define is_assert(cond)   arb_assert(cond)
 
#define AWAR_SELECTED_PLUGIN   shader_awar("plugin")
 
#define AWAR_SHOW_DIMENSION   tmp_shader_awar("dimension")
 
#define AWAR_GUI_RANGE   tmp_shader_awar("range")
 
#define AWAR_GUI_OVERLAY_GROUPS   tmp_shader_awar("groups")
 
#define AWAR_GUI_OVERLAY_MARKED   tmp_shader_awar("marked")
 
#define AWAR_GUI_PHASE_FREQ   tmp_shader_awar("phase")
 
#define AWAR_GUI_PHASE_ALTER   tmp_shader_awar("alternate")
 
#define AWAR_GUI_PHASE_PRESHIFT   tmp_shader_awar("preshift")
 
#define AWAR_GUI_PHASE_POSTSHIFT   tmp_shader_awar("postshift")
 
#define AWAR_PLUGIN_RANGE   plugin_awar("range")
 
#define AWAR_PLUGIN_OVERLAY_GROUPS   plugin_awar("groups")
 
#define AWAR_PLUGIN_OVERLAY_MARKED   plugin_awar("marked")
 
#define AWAR_PLUGIN_PHASE_FREQ   plugin_awar("phase")
 
#define AWAR_PLUGIN_PHASE_ALTER   plugin_awar("alternate")
 
#define AWAR_PLUGIN_PHASE_PRESHIFT   plugin_awar("preshift")
 
#define AWAR_PLUGIN_PHASE_POSTSHIFT   plugin_awar("postshift")
 
#define SKIP_TMP_PREFIX   4
 

Typedefs

typedef vector< ShaderPluginPtrPlugins
 
typedef vector< ItemShader_impl > Shaders
 

Functions

static const ItemShaderfindItemShader (const char *id)
 
static void global_colorgroup_use_changed_cb (AW_root *awr, ItemShader_impl *shader)
 
ItemShaderregisterItemShader (AW_root *awr, AW_gc_manager *gcman, BoundItemSel &itemtype, const char *unique_id, const char *description, const char *help_id, ReshadeCallback reshade_cb, int undef_gc)
 

Variables

static Shaders registered
 

Macro Definition Documentation

#define is_assert (   cond)    arb_assert(cond)
#define AWAR_SELECTED_PLUGIN   shader_awar("plugin")

Definition at line 103 of file item_shader.cxx.

Referenced by FINAL_TYPE< SEQTYPE >::selected_plugin_changed_cb().

#define AWAR_SHOW_DIMENSION   tmp_shader_awar("dimension")

Definition at line 104 of file item_shader.cxx.

#define AWAR_GUI_RANGE   tmp_shader_awar("range")

Definition at line 106 of file item_shader.cxx.

Referenced by FINAL_TYPE< SEQTYPE >::selected_range_changed_cb().

#define AWAR_GUI_OVERLAY_GROUPS   tmp_shader_awar("groups")

Definition at line 107 of file item_shader.cxx.

#define AWAR_GUI_OVERLAY_MARKED   tmp_shader_awar("marked")

Definition at line 108 of file item_shader.cxx.

#define AWAR_GUI_PHASE_FREQ   tmp_shader_awar("phase")
#define AWAR_GUI_PHASE_ALTER   tmp_shader_awar("alternate")
#define AWAR_GUI_PHASE_PRESHIFT   tmp_shader_awar("preshift")
#define AWAR_GUI_PHASE_POSTSHIFT   tmp_shader_awar("postshift")
#define AWAR_PLUGIN_RANGE   plugin_awar("range")

Definition at line 114 of file item_shader.cxx.

Referenced by ShaderPlugin::init_awars().

#define AWAR_PLUGIN_OVERLAY_GROUPS   plugin_awar("groups")
#define AWAR_PLUGIN_OVERLAY_MARKED   plugin_awar("marked")

Definition at line 116 of file item_shader.cxx.

Referenced by ShaderPlugin::init_awars(), and ShaderPlugin::overlay_marked().

#define AWAR_PLUGIN_PHASE_FREQ   plugin_awar("phase")

Definition at line 117 of file item_shader.cxx.

Referenced by ShaderPlugin::init_awars().

#define AWAR_PLUGIN_PHASE_ALTER   plugin_awar("alternate")

Definition at line 118 of file item_shader.cxx.

Referenced by ShaderPlugin::init_awars().

#define AWAR_PLUGIN_PHASE_PRESHIFT   plugin_awar("preshift")

Definition at line 119 of file item_shader.cxx.

Referenced by ShaderPlugin::init_awars().

#define AWAR_PLUGIN_PHASE_POSTSHIFT   plugin_awar("postshift")

Definition at line 120 of file item_shader.cxx.

Referenced by ShaderPlugin::init_awars().

#define SKIP_TMP_PREFIX   4

Definition at line 153 of file item_shader.cxx.

Referenced by FINAL_TYPE< SEQTYPE >::shader_awar().

Typedef Documentation

typedef vector<ShaderPluginPtr> Plugins

Definition at line 101 of file item_shader.cxx.

typedef vector<ItemShader_impl> Shaders

Definition at line 611 of file item_shader.cxx.

Function Documentation

static const ItemShader * findItemShader ( const char id)
static

Definition at line 641 of file item_shader.cxx.

References NULp.

Referenced by registerItemShader().

static void global_colorgroup_use_changed_cb ( AW_root awr,
ItemShader_impl *  shader 
)
static
ItemShader* registerItemShader ( AW_root awr,
AW_gc_manager gcman,
BoundItemSel itemtype,
const char unique_id,
const char description,
const char help_id,
ReshadeCallback  reshade_cb,
int  undef_gc 
)

create a new ItemShader

Parameters
awrthe application root
gcmangc-manager used for shading
itemtypetype of item
unique_idunique ID
descriptionshort description used ia. as title of config window (eg. "Tree shading")
help_idhelpfile
reshade_cbcallback which updates the shading + refreshes the display
undef_gcGC reported for undefined ShadedValue

(Note: the reshade_cb may be called very often! best is to trigger a temp. DB-awar like AWAR_TREE_RECOMPUTE)

Definition at line 615 of file item_shader.cxx.

References findItemShader(), is_assert, makeItemFieldShader(), and NULp.

Variable Documentation

Shaders registered
static

Definition at line 613 of file item_shader.cxx.

Referenced by findPlugin(), get_itemfield_type_awarname(), and openMaskWindowByType().