BC_TextBox Class Reference

#include <bctextbox.h>

Inherits BC_SubWindow.

Inherited by ADeviceIntBox, ADeviceTextBox, AssetEditFRate, AssetEditHeader, AssetEditILaceautofixoption, AssetEditILacefixmethod, AssetEditILacemode, AssetEditPathText, AssetEditRate, AssetEditReelName, AssetEditReelNumber, AssetEditTCStartTextBox, AVIVAttribute, BatchRenderEDLPath, BC_FileBoxDirectoryText, BC_FileBoxFilterText, BC_FileBoxTextBox, BC_PopupTextBoxText, BC_ScrollTextBoxText, BC_TumbleTextBoxText, BitsPopupText, ByteOrderText, CDRipTextValue, CDRipWindowDevice, ChannelEditEditSource, ChannelEditEditTitle, ClipEditComments, ClipEditTitle, CompressorDecay, CompressorReaction, CompressorTrigger, CompressorX, CompressorY, DayText, DBXGain, DBXSize, DecimateRate, DelayAudioTextBox, DelayVideoSlider, DenoiseVideoThreshold, EditPopupTitleText, ExportEDLPathText, FeatherEditsTextBox, FileFormatHeader, FileFormatRate, FormatChannels, FormatPathText, FormatPresetsText, FromTextBox, GammaText, IndexCount, IndexPathText, IndexSize, InterpolateVideoRate, IVTCAutoThreshold, IVTCOffset, LabelEditComments, LabelEditTitle, LengthTextBox, LoopAudioSamples, LoopVideoFrames, ManualGotoNumber, MaxText, MeterMaxDB, MeterMinDB, MotionBlockXText, MotionBlockYText, MPEGBitrate, NewAChannels, NewAspectH, NewAspectW, NewATracks, NewFrameRate, NewOutputH, NewOutputW, NewPresetsText, NewSampleRate, NewTrackH, NewTrackW, NewVChannels, NewVTracks, NormalizeWindowOverload, NudgePatch, OGGTheoraBitrate, OGGVorbisAvgBitrate, OGGVorbisMaxBitrate, OGGVorbisMinBitrate, PlaybackPreload, PluginGlobalPathText, PluginLocalPathText, PrefsRenderFarmEditNode, PrefsRenderFarmMountpoint, RecordFrameRate, RecordFrameRateText, RecordGUIDCOffsetText, RecordH, RecordNews, RecordPath, RecordSampleRate, RecordW, RecordWriteLength, ReFrameOutput, ResampleFraction, ResizeTrackHeight, ResizeTrackScaleH, ResizeTrackScaleW, ResizeTrackWidth, RotateText, ScaleAspectH, ScaleAspectText, ScaleAspectW, ScaleOffsetText, ScaleRatioText, ScaleRatioText, ScaleSizeText, ScaleSizeText, SelTempAvgGainValue, SelTempAvgOffsetValue, SelTempAvgThreshSlider, SetChannelsTextBox, SetFrameRateTextBox, SetSampleRateTextBox, ShapeWipeFilename, StillImageDuration, SynthBaseFreq, TimecodeOffset, TimeFormatFeetSetting, TimeTextBox, TitleFade, TitlePatch, TitlePatchOld, ToTextBox, TrackFrameNumber, VDeviceIntBox, VDeviceTextBox, VideoCaptureLength, VideoWriteLength, VorbisAvgBitrate, VorbisMaxBitrate, VorbisMinBitrate, and ZoomTextBox.

Collaboration diagram for BC_TextBox:

Collaboration graph
[legend]

Public Member Functions

 BC_TextBox (int x, int y, int w, int rows, char *text, int has_border=1, int font=MEDIUMFONT)
 BC_TextBox (int x, int y, int w, int rows, int64_t text, int has_border=1, int font=MEDIUMFONT)
 BC_TextBox (int x, int y, int w, int rows, int text, int has_border=1, int font=MEDIUMFONT)
 BC_TextBox (int x, int y, int w, int rows, float text, int has_border=1, int font=MEDIUMFONT, int precision=4)
virtual ~BC_TextBox ()
virtual int handle_event ()
virtual int motion_event ()
void set_selection (int char1, int char2, int ibeam)
int update (char *text)
int update (int64_t value)
int update (float value)
void disable ()
void enable ()
int get_enabled ()
int initialize ()
int focus_in_event ()
int focus_out_event ()
int cursor_enter_event ()
int cursor_leave_event ()
int cursor_motion_event ()
virtual int button_press_event ()
int button_release_event ()
int repeat_event (int64_t repeat_id)
int keypress_event ()
int activate ()
int deactivate ()
char * get_text ()
int get_text_rows ()
void set_text_row (int row)
int get_text_row ()
int reposition_window (int x, int y, int w=-1, int rows=-1)
int uses_text ()
void set_precision (int precision)
void set_keypress_draw (int value)
int get_ibeam_letter ()
void set_ibeam_letter (int number, int redraw=1)
int get_last_keypress ()
void set_separators (char *separators)
int select_whole_text (int select)
void cycle_textboxes (int amout)

Static Public Member Functions

static int calculate_h (BC_WindowBase *gui, int font, int has_border, int rows)
static int calculate_row_h (int rows, BC_WindowBase *parent_window, int has_border=1, int font=MEDIUMFONT)
static int pixels_to_rows (BC_WindowBase *window, int font, int pixels)

Private Member Functions

int reset_parameters (int rows, int has_border, int font)
void draw ()
void draw_border ()
void draw_cursor ()
void copy_selection (int clipboard_num)
void paste_selection (int clipboard_num)
void delete_selection (int letter1, int letter2, int text_len)
void insert_text (char *string)
void do_separators (int ibeam_left)
void get_ibeam_position (int &x, int &y)
void find_ibeam (int dispatch_event)
void select_word (int &letter1, int &letter2, int ibeam_letter)
int get_cursor_letter (int cursor_x, int cursor_y)
int get_row_h (int rows)
void default_keypress (int &dispatch_event, int &result)

Private Attributes

int text_x
int text_y
int ibeam_x
int ibeam_y
int ibeam_letter
int highlight_letter1
int highlight_letter2
int highlight_letter3
int highlight_letter4
int text_x1
int text_start
int text_end
int text_selected
int word_selected
int text_ascent
int text_descent
int text_height
int left_margin
int right_margin
int top_margin
int bottom_margin
int has_border
int font
int rows
int highlighted
int high_color
int back_color
int background_color
char text [BCTEXTLEN]
char text_row [BCTEXTLEN]
char temp_string [2]
int active
int enabled
int precision
int keypress_draw
Timerskip_cursor
int last_keypress
char * separators

Detailed Description

Definition at line 14 of file bctextbox.h.


Constructor & Destructor Documentation

BC_TextBox::BC_TextBox ( int  x,
int  y,
int  w,
int  rows,
char *  text,
int  has_border = 1,
int  font = MEDIUMFONT 
)

Definition at line 22 of file bctextbox.C.

References reset_parameters(), and skip_cursor.

Referenced by FormatTools::create_objects().

Here is the call graph for this function:

BC_TextBox::BC_TextBox ( int  x,
int  y,
int  w,
int  rows,
int64_t  text,
int  has_border = 1,
int  font = MEDIUMFONT 
)

Definition at line 36 of file bctextbox.C.

References reset_parameters(), and skip_cursor.

Here is the call graph for this function:

BC_TextBox::BC_TextBox ( int  x,
int  y,
int  w,
int  rows,
int  text,
int  has_border = 1,
int  font = MEDIUMFONT 
)

Definition at line 66 of file bctextbox.C.

References reset_parameters(), and skip_cursor.

Here is the call graph for this function:

BC_TextBox::BC_TextBox ( int  x,
int  y,
int  w,
int  rows,
float  text,
int  has_border = 1,
int  font = MEDIUMFONT,
int  precision = 4 
)

Definition at line 50 of file bctextbox.C.

References reset_parameters(), and skip_cursor.

Here is the call graph for this function:

BC_TextBox::~BC_TextBox (  )  [virtual]

Definition at line 80 of file bctextbox.C.

References skip_cursor.


Member Function Documentation

virtual int BC_TextBox::handle_event (  )  [inline, virtual]

Reimplemented in ADeviceTextBox, ADeviceIntBox, AssetEditPathText, AssetEditRate, AssetEditFRate, AssetEditILaceautofixoption, AssetEditILacemode, AssetEditILacefixmethod, AssetEditHeader, AssetEditReelName, AssetEditReelNumber, AssetEditTCStartTextBox, BatchRenderEDLPath, BitsPopupText, ByteOrderText, ChannelEditEditTitle, ChannelEditEditSource, ClipEditTitle, ClipEditComments, EditPopupTitleText, ExportEDLPathText, FeatherEditsTextBox, AVIVAttribute, FileFormatRate, FileFormatHeader, MPEGBitrate, OGGVorbisMinBitrate, OGGVorbisMaxBitrate, OGGVorbisAvgBitrate, OGGTheoraBitrate, VorbisMinBitrate, VorbisMaxBitrate, VorbisAvgBitrate, FormatPresetsText, FormatPathText, FormatChannels, IndexPathText, IndexSize, IndexCount, TimeFormatFeetSetting, MeterMinDB, MeterMaxDB, LabelEditTitle, LabelEditComments, ManualGotoNumber, NewATracks, NewAChannels, NewSampleRate, NewVTracks, NewVChannels, NewFrameRate, NewTrackW, NewTrackH, NewOutputW, NewOutputH, NewAspectW, NewAspectH, NewPresetsText, TitlePatchOld, TitlePatch, NudgePatch, PrefsRenderFarmMountpoint, PrefsRenderFarmEditNode, PlaybackPreload, TimecodeOffset, PluginGlobalPathText, PluginLocalPathText, RecordPath, RecordNews, RecordGUIDCOffsetText, RecordWriteLength, RecordSampleRate, VideoWriteLength, VideoCaptureLength, RecordW, RecordH, RecordFrameRate, RecordFrameRateText, StillImageDuration, ResizeTrackWidth, ResizeTrackHeight, ResizeTrackScaleW, ResizeTrackScaleH, ScaleSizeText, ScaleOffsetText, ScaleRatioText, ScaleAspectW, ScaleAspectH, SetSampleRateTextBox, SetChannelsTextBox, SetFrameRateTextBox, ScaleSizeText, ScaleRatioText, ScaleAspectText, DayText, TimeTextBox, VDeviceTextBox, VDeviceIntBox, ZoomTextBox, FromTextBox, LengthTextBox, ToTextBox, BC_FileBoxTextBox, BC_FileBoxDirectoryText, BC_FileBoxFilterText, BC_ScrollTextBoxText, BC_PopupTextBoxText, BC_TumbleTextBoxText, CDRipTextValue, CDRipWindowDevice, CompressorReaction, CompressorX, CompressorY, CompressorTrigger, CompressorDecay, DecimateRate, DelayAudioTextBox, DelayVideoSlider, SelTempAvgThreshSlider, SelTempAvgOffsetValue, SelTempAvgGainValue, DenoiseVideoThreshold, MaxText, GammaText, InterpolateVideoRate, IVTCOffset, IVTCAutoThreshold, LoopAudioSamples, LoopVideoFrames, TrackFrameNumber, MotionBlockXText, MotionBlockYText, NormalizeWindowOverload, ReFrameOutput, ResampleFraction, RotateText, ShapeWipeFilename, SynthBaseFreq, and TitleFade.

Definition at line 49 of file bctextbox.h.

Referenced by BC_FTumbler::handle_down_event(), BC_ITumbler::handle_down_event(), CaptureLengthTumbler::handle_down_event(), BC_RecentList::handle_event(), AspectPulldown::handle_event(), FrameSizePulldown::handle_event(), FrameRatePulldown::handle_event(), SampleRatePulldown::handle_event(), BC_FTumbler::handle_up_event(), BC_ITumbler::handle_up_event(), CaptureLengthTumbler::handle_up_event(), keypress_event(), and BrowseButton::run().

virtual int BC_TextBox::motion_event (  )  [inline, virtual]

Reimplemented in BC_ScrollTextBoxText.

Definition at line 51 of file bctextbox.h.

Referenced by find_ibeam().

void BC_TextBox::set_selection ( int  char1,
int  char2,
int  ibeam 
)

Definition at line 169 of file bctextbox.C.

References draw(), highlight_letter1, highlight_letter2, and ibeam_letter.

Referenced by ClipEditWindow::create_objects(), and FormatTools::update_extension().

Here is the call graph for this function:

int BC_TextBox::update ( char *  text  ) 

Definition at line 177 of file bctextbox.C.

References draw(), highlight_letter1, highlight_letter2, and ibeam_letter.

Referenced by AssetEditInterlacemodePulldown::AssetEditInterlacemodePulldown(), CompressorTrigger::button_press_event(), CompressorDecay::button_press_event(), CompressorReaction::button_press_event(), BatchRenderGUI::change_job(), ChannelEditEditThread::change_source(), ColormodelPulldown::ColormodelPulldown(), FileYUV::get_parameters(), BC_FTumbler::handle_down_event(), BC_ITumbler::handle_down_event(), DayTumbler::handle_down_event(), CaptureLengthTumbler::handle_down_event(), SynthFreqPot::handle_event(), ShapeWipeBrowseButton::handle_event(), MotionBlockY::handle_event(), MotionBlockX::handle_event(), InterpolateVideoRateMenu::handle_event(), GammaColorPicker::handle_event(), GammaSlider::handle_event(), MaxSlider::handle_event(), DecimateRateMenu::handle_event(), BC_PopupTextBoxList::handle_event(), BC_RecentList::handle_event(), BC_FileBoxFilterMenu::handle_event(), BC_FileBoxDirectoryText::handle_event(), FormatSwapExtents::handle_event(), ResizeTrackSwap::handle_event(), DeleteRenderProfileButton::handle_event(), RenderProfileListBox::handle_event(), PrefsRenderFarmNodes::handle_event(), NewSwapExtents::handle_event(), InterlacemodePulldown::handle_event(), ColormodelPulldown::handle_event(), AspectPulldown::handle_event(), FrameSizePulldown::handle_event(), FrameRatePulldown::handle_event(), SampleRatePulldown::handle_event(), LoadModeListBox::handle_event(), FormatFormat::handle_event(), FormatPresetsPulldown::handle_event(), PipePreset::handle_event(), ChannelEditEditInputItem::handle_event(), ByteOrderList::handle_event(), BitsPopupMenu::handle_event(), AssetEditInterlacemodePulldown::handle_event(), InterlacefixmethodPulldown::handle_event(), BC_FTumbler::handle_up_event(), BC_ITumbler::handle_up_event(), DayTumbler::handle_up_event(), CaptureLengthTumbler::handle_up_event(), InterlacefixmethodPulldown::InterlacefixmethodPulldown(), InterlacemodePulldown::InterlacemodePulldown(), Patch::load(), ManualGotoNumber::reshape_update(), DC_Offset::run(), BrowseButton::run(), BC_FileBoxListBox::selection_changed(), ChannelEditEditThread::set_freqtable(), Patch::set_title(), Interlaceautofix::showhideotherwidgets(), ChannelEditEditThread::source_down(), ChannelEditEditThread::source_up(), BC_FileBox::submit_dir(), BC_FileBox::submit_file(), TitleWindow::update(), GammaWindow::update(), BC_TumbleTextBox::update(), BC_PopupTextBox::update(), update(), TimeEntry::update(), SetFormatThread::update(), ResizeTrackWindow::update(), NudgePatch::update(), PatchGUI::update(), InterlacemodePulldown::update(), NewWindow::update(), FormatTools::update(), SetFormatThread::update_aspect(), ScaleThread::update_aspect(), NewThread::update_aspect(), AVIConfigVideo::update_attribute(), ZoomBar::update_autozoom(), RecordGUI::update_batch_tools(), FormatTools::update_driver(), FormatTools::update_extension(), SynthWindow::update_gui(), DelayVideoWindow::update_gui(), DelayAudioWindow::update_gui(), ToTextBox::update_position(), LengthTextBox::update_position(), FromTextBox::update_position(), RotateWindow::update_text(), CompressorWindow::update_textboxes(), SetFormatThread::update_window(), and ScaleThread::update_window().

Here is the call graph for this function:

int BC_TextBox::update ( int64_t  value  ) 

Definition at line 193 of file bctextbox.C.

References BCTEXTLEN, and update().

Here is the call graph for this function:

int BC_TextBox::update ( float  value  ) 

Definition at line 203 of file bctextbox.C.

References BCTEXTLEN, precision, and update().

Here is the call graph for this function:

void BC_TextBox::disable (  ) 

void BC_TextBox::enable (  )