Back to index

texmacs  1.0.7.15
Classes | Defines | Functions
file_chooser_widget.cpp File Reference
#include "Widkit/basic_widget.hpp"
#include "Widkit/attribute_widget.hpp"
#include "Widkit/layout.hpp"
#include "bitmap_font.hpp"
#include "font.hpp"
#include "window.hpp"
#include "file.hpp"
#include "image_files.hpp"
#include "analyze.hpp"
#include "scheme.hpp"
#include "dictionary.hpp"

Go to the source code of this file.

Classes

class  file_chooser_command_rep
class  file_list_widget_rep
class  image_widget_rep
class  file_chooser_widget_rep

Defines

#define CHANGE_FILE   0
#define CHANGE_DIR   1
#define BUTTON_HOME   2
#define BUTTON_TEXTS   3
#define BUTTON_FILE_OK   4
#define BUTTON_DIR_OK   5
#define BUTTON_CANCEL   6
#define IMAGE_HSIZE   7
#define IMAGE_VSIZE   8
#define IMAGE_XPOS   9
#define IMAGE_YPOS   10
#define CHANGE_SUFFIXES   11

Functions

command file_chooser_command (wk_widget fch, int type)
static bool has_suffix (string name, array< string > suffix)
static bool list_in_directory (string dir, string name, array< string > suffix, bool dir_flag)
wk_widget file_chooser_wk_widget (command cmd, string type)

Define Documentation

#define BUTTON_CANCEL   6

Definition at line 39 of file file_chooser_widget.cpp.

#define BUTTON_DIR_OK   5

Definition at line 38 of file file_chooser_widget.cpp.

#define BUTTON_FILE_OK   4

Definition at line 37 of file file_chooser_widget.cpp.

#define BUTTON_HOME   2

Definition at line 35 of file file_chooser_widget.cpp.

#define BUTTON_TEXTS   3

Definition at line 36 of file file_chooser_widget.cpp.

#define CHANGE_DIR   1

Definition at line 34 of file file_chooser_widget.cpp.

#define CHANGE_FILE   0

Definition at line 33 of file file_chooser_widget.cpp.

#define CHANGE_SUFFIXES   11

Definition at line 44 of file file_chooser_widget.cpp.

#define IMAGE_HSIZE   7

Definition at line 40 of file file_chooser_widget.cpp.

#define IMAGE_VSIZE   8

Definition at line 41 of file file_chooser_widget.cpp.

#define IMAGE_XPOS   9

Definition at line 42 of file file_chooser_widget.cpp.

#define IMAGE_YPOS   10

Definition at line 43 of file file_chooser_widget.cpp.


Function Documentation

command file_chooser_command ( wk_widget  fch,
int  type 
)

Definition at line 127 of file file_chooser_widget.cpp.

                                               {
  return tm_new<file_chooser_command_rep> (fch, type);
}

Here is the caller graph for this function:

Definition at line 704 of file file_chooser_widget.cpp.

                                                  {
  return tm_new<file_chooser_widget_rep> (cmd, type);
}

Here is the caller graph for this function:

static bool has_suffix ( string  name,
array< string suffix 
) [static]

Definition at line 177 of file file_chooser_widget.cpp.

                                               {
  int i;
  for (i=0; i<N(suffix); i++)
    if (ends (locase_all (name), suffix[i])) return true;
  return false;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static bool list_in_directory ( string  dir,
string  name,
array< string suffix,
bool  dir_flag 
) [static]

Definition at line 185 of file file_chooser_widget.cpp.

{
  if (name == "") return false;
  if (name == "..") return dir_flag;
  if (name[0]=='.') return false;
  if (dir_flag) return is_directory (url_system (dir, name));
  else return is_regular (url_system (dir, name)) && has_suffix (name, suffix);
}

Here is the call graph for this function:

Here is the caller graph for this function: